noalyss Version-9
acc_ledger_search-display_list_filter.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// Copyright Author Dany De Bontridder danydb@noalyss.eu
20
21/*!
22* \file
23* \brief display a list of saved search for accountancy (alias filter)
24*/
25global $g_user;
26$array=$this->cn->get_array("select id,filter_name,description,ledger_type
27from public.user_filter where login=$1 and ledger_type=$2",
28[$g_user->getLogin(),$this->type]);
31$div="search_op";
32?>
33<p>
34 Cliquez sur un lien pour affiche le résultat de la recherche
35</p>
36
37<?php
38echo \HtmlInput::filter_list("filter_list_acc_ul");
39
40?>
41<ul id="filter_list_acc_ul" class="list-group m-2" >
42
43<?php
44for ($i=0;$i<$nb_array;$i++):
45?>
46<li class="list-group-item-action" style="background-color: transparent">
47 <?php
48 $user_filter=new \User_filter_SQL($this->cn,$array[$i]["id"]);
49
50 $a_param=array();
51 $a_param["search_opnb_jrn"] = $user_filter->getp("nb_jrn");
52 if ($a_param["search_opnb_jrn"] > 0 ) {
53 $a_param['search_opr_jrn']=explode(",",$user_filter->getp("r_jrn"));
54 }
55 $a_param ["date_start"] = $user_filter->getp("date_start");
56 $a_param ["date_paid_start"] = $user_filter->getp("date_paid_start");
57 $a_param ["date_paid_end"] = $user_filter->getp("date_paid_end");
58 /*[search_opdate_start_hidden] => 01.01.2023
59 [search_opdate_end_hidden] => 31.12.2023*/
60 $a_param["desc"] =$user_filter->getp("description");
61 $a_param["amount_min"] = $user_filter->getp("amount_min");
62 $a_param["amount_max"] = $user_filter->getp("amount_max");
63 $a_param["search_opqcode"] =$user_filter->getp("qcode");
64 $a_param["accounting"] = $user_filter->getp("accounting");
65 $a_param["tva_id_search"] = $user_filter->getp("tva_id_search");
66 $a_param["operation_filter"] = $user_filter->getp("operation_filter");
67 $a_param["p_currency_code"] = $user_filter->getp("uf_currency_code");
68 $a_param["search_optag_option"] =$user_filter->getp("uf_tag_option");
69 if ( $user_filter->getp("uf_tag") != "") {
70 $a_param["search_optag"]=explode(",",$user_filter->getp("uf_tag"));
71 }
72 $a_param['search_opqcode']=$user_filter->getp('qcode');
73 $a_param['ledger_type']=$array[$i]['ledger_type'];
74
75 $a_param['ac']=$http->request("ac");
76 $a_param['gDossier']=$http->request("gDossier","number");
77 $url="do.php?".http_build_query($a_param);
78 ?>
79 <a class="line" href="<?=$url?>">
80 <span class="search-content">
81 <?=$array[$i]['filter_name']?> <?=h($array[$i]['description'])?>
82
83 </span>
84 </a>
85</li>
86<?php
88?>
89</ul>
90 <ul class="list-group m-2" >
91 <li class="list-group-item-action" style="background-color: transparent">
92 <?php
93 $a_param=array();
94 $a_param['ac']=$http->request("ac");
95 $a_param['gDossier']=$http->request("gDossier","number");
96 $url="do.php?".http_build_query($a_param);
97 ?>
98 <a class="line" href="<?=$url?>">
99 Aucun filtre
100 </a>
101 </li>
102
103</ul>
span($p_string, $p_extra='')
Definition: ac_common.php:43
p($p_string)
Definition: ac_common.php:39
h( $row[ 'oa_description'])
$opd_description style
$input_from cn
Definition: balance.inc.php:66
manage the http input (get , post, request) and extract from an array
ORM abstract of the table public.user_filter.