noalyss Version-9
preod.inc.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21
22/*!\file
23 * \brief included file for managing the predefined operation
24 */
25
26if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
27global $http;
28
30
32$operation_predef_mtable->set_json(json_encode(array( "ac"=>$http->request("ac"),
33 "op"=>"save_predf",
34 "gDossier"=>Dossier::id()
35 )));
36echo '<form method="GET">';
37echo Dossier::hidden();
38echo HtmlInput::hidden("ac",$http->request("ac"));
39$filter_ledger=new ISelect("f_ledger");
40
41
42$filter_ledger->selected=$http->request('f_ledger',"number",-1);
43$sql_filter='where '.$g_user->get_ledger_sql('ALL',2);
44
45
46$filter_ledger->value=$cn->make_array("select jrn_def_id ,jrn_def_name from jrn_def
47$sql_filter and jrn_def_type !='FIN' order by jrn_def_name",1);
48echo $filter_ledger->input();
49echo HtmlInput::submit('ledgerf',_("Filter par journal"));
50$operation_predef_mtable->display_button_add();
51
52echo '</form>';
53if ( $filter_ledger->selected != -1 && isNumber($filter_ledger->selected ) == 1 ) {
54 $sql_filter.= ' and jrn_Def_id = '.sql_string($filter_ledger->selected);
55}
56$operation_predef_mtable->create_js_script();
57echo '<p>';
58echo '</p>';
59 $operation_predef_mtable->display_table($sql_filter." and jrn_def_id not in "
60 . " ( select jrn_def_id from jrn_def where jrn_def_type ='FIN') ");
61echo '<p>';
62$operation_predef_mtable->display_button_add();
63echo '</p>';
isNumber($p_int)
Definition: ac_common.php:215
static id()
return the 'gDossier' value after a check
static hidden()
return a string to set gDossier into a FORM
static hidden($p_name, $p_value, $p_id="")
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
ORM abstract of the table public.op_predef.
Display a table and allow to change the predefined operation, insert or delete. Used the class Manage...
$filter_ledger
Definition: preod.inc.php:39
global $http
Definition: preod.inc.php:27
$sql_filter
Definition: preod.inc.php:43
$operation_predef_mtable
Definition: preod.inc.php:31
$prd_op
Definition: preod.inc.php:29