82 if (! in_array(
$type, [
"ALL",
"VEN",
"ACH",
"ODS",
"FIN"]))
114 $bledger_param=json_encode(array(
117 'all_type'=>$this->all,
123 $bledger->label=_(
"choix des journaux");
124 $bledger->javascript=
" show_ledger_choice($bledger_param)";
125 $f_ledger=$bledger->input();
127 if (isset(
$_REQUEST[$this->div.
'nb_jrn']))
142 $period=
$g_user->get_periode();
152 $f_date_start=
new IDate(
'date_start',
'', $this->div.
"date_start");
158 $f_date_end=
new IDate(
'date_end',
'', $this->div.
"date_end");
164 $f_date_paid_start=
new IDate(
'date_paid_start',
'',
165 $this->div.
"date_paid_start");
166 $f_date_paid_end=
new IDate(
'date_paid_end',
'',
167 $this->div.
"date_paid_end");
169 $f_date_paid_start->value=
$http->request(
"date_paid_start",
"string",
"");
170 $f_date_paid_end->value=
$http->request(
"date_paid_end",
"string",
"");
173 $f_descript=
new IText(
'desc',
"", $this->div.
"desc");
174 $f_descript->size=40;
175 $f_descript->value=
$http->request(
'desc',
"string",
"");
178 $f_amount_min=
new INum(
'amount_min',
'0', $this->div.
"amount_min");
179 $f_amount_min->value=
$http->request(
"amount_min",
"string",0);
180 $f_amount_max=
new INum(
'amount_max',
'0', $this->div.
"amount_max");
181 $f_amount_max->value=
$http->request(
"amount_max",
"string",0);
185 $f_qcode=
new ICard($this->div.
'qcode');
187 $f_qcode->set_attribute(
'typecard',
'all');
192 $f_qcode->set_dblclick(
"fill_ipopcard(this);");
195 $f_qcode->set_function(
'fill_data');
196 $f_qcode->javascript=sprintf(
' onchange="fill_data_onchange(%s);" ',
198 $f_qcode->value=
$http->request($this->div.
'qcode',
"string",
"");
205 $f_accounting=
new IPoste(
'accounting',
"", $this->div.
"accounting");
206 $f_accounting->value=
$http->request(
'accounting',
"string",
"");
213 $f_accounting->set_attribute(
'jrn', 0);
214 $f_accounting->set_attribute(
'ipopup',
'ipop_account');
215 $f_accounting->set_attribute(
'label',
'ld');
216 $f_accounting->set_attribute(
'account', $this->div.
'accounting');
220 $f_paid=
new ISelect(
'operation_filter',
null, $this->div.
'operation_filter');
221 $f_paid->value=array([
"value"=>
'all',
"label"=>_(
"Toutes")],
222 [
"value"=>
'unpaid',
"label"=>_(
"Non payées")],
223 [
"value"=>
'paid',
"label"=>_(
"Payées")]
225 $f_paid->selected=
$http->request(
"operation_filter",
"string",
"all");
227 $r.=dossier::hidden();
229 $this->div.
"ledger_type");
236 if (isset(
$_REQUEST[
'single_operation']))
242 $currency_id=
$http->request(
"p_currency_code",
"string",-1);
245 $sCurrency=$acc_currency->select_currency();
246 $sCurrency->id=$this->div.
"p_currency_code";
247 $sCurrency->value[]=array(
"label"=>_(
"Toutes"),
"value"=>-1);
248 $sCurrency->selected=$currency_id;
249 $tva_id_search=
new ITva_Popup(
"tva_id_search",
250 $http->request(
"tva_id_search",
"string",
null),
251 $this->div.
"tva_id_search");
254 require_once NOALYSS_TEMPLATE.
'/ledger_search.php';
255 $r.=ob_get_contents();
271 $json=json_encode([
"div"=>$this->div,
"ledger_type"=>$this->
type,
"all_type"=>$this->all,
274 $r=sprintf(
'manage_search_filter(%s)', $json);
284 $name->placeholder=_(
"Nom de la recherche");
286 $bt=
new IButton($this->div.
"save_ok",_(
"Ajout"));
287 $bt->javascript=sprintf(
"save_filter('%s','%s')",$this->div,
Dossier::id());
322 select distinct jr_id
324 join jrnx on (jr_grpt_id=j_grpt)
326 exists(select 1 from operation_analytique where j_id=jrnx.j_id) )
329 substr(jr_comment,1,60) as jr_comment,
330 to_char(jr_ech,'DD.MM.YY') as str_jr_ech,
331 to_char(jr_date,'DD.MM.YY') as str_jr_date,
332 jr_date as jr_date_order,
346 (select string_agg(a,' ')
347 from (select '<span style=\"font-size:80%\" class=\"tagcell tagcell-color'||t.t_color::text||'\">'||t_tag||'</span>' a
348 from operation_tag ot join tags t on(ot.tag_id=t.t_id)
349 where ot.jrn_id=X.jr_id
354 when jrn_def_type='VEN' then
355 (select ad_value from fiche_detail where ad_id=1
356 and f_id=(select max(qs_client) from quant_sold join jrnx
357 using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt)
358 where e.jr_id=x.jr_id))
359 when jrn_def_type = 'ACH' then
363 and f_id=(select max(qp_supplier) from quant_purchase
364 join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id))
365 when jrn_def_type = 'FIN' then
366 (select ad_value from fiche_detail where ad_id=1
367 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id))
370 when jrn_def_type='VEN' then
371 (select ad_value from fiche_detail
373 and f_id=(select max(qs_client)
375 join jrnx using (j_id)
376 join jrn as e on (e.jr_grpt_id=j_grpt)
377 where e.jr_id=x.jr_id))
378 when jrn_def_type = 'ACH' then (select ad_value
381 and f_id=(select max(qp_supplier)
383 join jrnx using (j_id)
384 join jrn as e on (e.jr_grpt_id=j_grpt)
385 where e.jr_id=x.jr_id))
386 when jrn_def_type = 'FIN' then (select ad_value
389 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id))
392 when jrn_def_type='VEN' then
396 and f_id=(select max(qs_client)
398 join jrnx using (j_id)
399 join jrn as e on (e.jr_grpt_id=j_grpt)
400 where e.jr_id=x.jr_id))
401 when jrn_def_type = 'ACH' then (select ad_value
404 and f_id=(select max(qp_supplier)
406 join jrnx using (j_id)
407 join jrn as e on (e.jr_grpt_id=j_grpt)
408 where e.jr_id=x.jr_id))
409 when jrn_def_type = 'FIN' then (select ad_value
412 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id))
415 when jrn_def_type='VEN' then
416 (select sum(qs_price)+sum(vat) from
417 (select qs_internal,qs_price,case when qs_vat_sided<>0 then 0
418 else qs_vat end as vat
420 where qs_internal=X.jr_internal) as ven_invoice
422 when jrn_def_type = 'ACH' then
423 (select sum(qp_price)+sum(vat)+sum(qp_nd_tva)+sum(qp_nd_tva_recup)
425 (select qp_internal,qp_price,qp_nd_tva,qp_nd_tva_recup,qp_vat-qp_vat_sided as vat
427 where qp_internal=X.jr_internal) as invoice_purchase
431 coalesce( case when jrn_def_type='VEN' then
432 (select sum(case when j102.j_debit is true then 0-j102.J_montant else j102.j_montant end)
433 from jrnx j102 join jrn_tax using(j_id) where j102.j_grpt =X.jr_grpt_id)
434 when jrn_def_type='ACH' then
435 (select sum(case when j103.j_debit is false then 0-j103.J_montant else j103.j_montant end)
436 from jrnx j103 join jrn_tax using(j_id) where j103.j_grpt =X.jr_grpt_id)
438 0 end ,0) ) as total_invoice,
440 to_char(jr_date_paid,'DD.MM.YY') as str_jr_date_paid,
441 cas.jr_id as analytic_op,
443 (select cr_code_iso from currency c where c.id=x.currency_id) cr_code_iso,
447 left join jrn_note using(jr_id)
448 left join cas using( jr_id)
449 join jrn_def on jrn_def_id=jr_def_id
450 join parm_periode on p_id=jr_tech_per
496 $fil_hide_operation=
'';
535 $fil_ledger=
' jrn_def_id in ('.$fil_ledger.
')';
552 $fil_tag=$and.
' jr_id in (select jrn_id from operation_tag where tag_id in ('.
sql_string($strTag).
')) ';
556 $sub_tag=
""; $nb_tag=count(
$aTag);
558 for ($x=0;$x < $nb_tag;$x++) {
559 $sub_tag =
" tag_id = ".sql_string(
$aTag[$x]);
560 $fil_tag=$and.
' jr_id in (select jrn_id from operation_tag where '.$sub_tag.
')' ;
567 $amount_min=abs(
toNumber($amount_min));
568 $amount_max=abs(
toNumber($amount_max));
569 if ($amount_min>0&&
isNumber($amount_min))
571 $fil_amount=$and.
' jr_montant >='.$amount_min;
574 if ($amount_max>0&&
isNumber($amount_max))
576 $fil_amount.=$and.
' jr_montant <='.$amount_max;
586 bccomp($amount_min, $amount_max, 2)==0)
588 $fil_amount=$and.
' ( ';
591 $fil_amount.=
'jr_grpt_id in ( select distinct j_grpt from jrnx where j_montant = '.$amount_min.
') ';
595 $fil_amount.=
' jr_montant = '.$amount_min;
603 $fil_date=$and.
" jr_date >= to_date('".
$date_start.
"','DD.MM.YYYY')";
608 $fil_date.=$and.
" jr_date <= to_date('".
$date_end.
"','DD.MM.YYYY')";
612 if (isset($date_paid_start)&&
isDate($date_paid_start)!=
null)
614 $fil_date_paid=$and.
" jr_date_paid >= to_date('".$date_paid_start.
"','DD.MM.YYYY')";
617 if (isset($date_paid_end)&&
isDate($date_paid_end)!=
null)
619 $fil_date_paid.=$and.
" jr_date_paid <= to_date('".$date_paid_end.
"','DD.MM.YYYY')";
626 $fil_desc=$and.
" ( upper(jr_comment) like upper('%".
$desc.
"%') or upper(jr_pj_number) like upper('%".
$desc.
"%') ".
627 " or upper(jr_internal) like upper('%".$desc.
"%')
628 or jr_grpt_id in (select j_grpt from jrnx where j_text ilike '%".
$desc.
"%')
629 or jr_id in (select jr_id from jrn_info where ji_value is not null and ji_value ilike '%$desc%')
630 or jr_id in (select jr_id from jrn_note where upper(n_text) ilike '%$desc%' )
637 $fil_account=$and.
" jr_grpt_id in (select j_grpt
645 $fil_qcode=$and.
" jr_grpt_id in ( select j_grpt from
651 if ( isset($operation_filter)) {
652 switch ($operation_filter) {
654 $fil_paid=$and.
"(jr_rapt is null or jr_rapt = '') and jr_valid = true ";
661 $fil_paid=$and.
"(jr_rapt is not null or jr_rapt = 'paid') and jr_valid = true ";
665 throw new Exception(_(
"ALS01 Etat inconnu"),10);
679 $fil_sec=$and.
" jr_def_id in ( select uj_jrn_id ".
680 " from user_sec_jrn where ".
681 " uj_login='".sql_string($_SESSION[SESSION_KEY.
'g_user']).
"'".
682 " and uj_priv in ('R','W'))";
685 if ( isset($p_currency_code) && $p_currency_code !=-1) {
686 $fil_currency=$and.
" x.currency_id = ".
sql_string($p_currency_code);
690 if ( isset($tva_id_search) && ! empty (trim($tva_id_search??
"")))
692 $fil_vat = $and.
" jr_internal in
693 ( select distinct qp_internal
695 where qp_vat_code=".
sql_string($tva_id_search).
697 select distinct qs_internal
699 where qs_vat_code=".sql_string($tva_id_search).
")";
702 $where=$fil_ledger.$fil_amount.$fil_date.$fil_desc.$fil_sec.
703 $fil_qcode.$fil_paid.$fil_account.$fil_date_paid.$fil_hide_operation.$fil_tag.$fil_currency.$fil_vat;
705 $sql.=
" where ".$where;
708 return array(
$sql, $where);
722 $r.=
'<div id="search_form" style="display:none">';
724 $r.=
'<FORM METHOD="GET" >';
756 $button->label=_(
"Chercher");
757 $button->javascript=
"toggleHideShow('search_form','tfs');";
758 $r.=$button->input();
800 $limit=($_SESSION[SESSION_KEY.
'g_pagesize']!=-1)?
" LIMIT ".$_SESSION[SESSION_KEY.
'g_pagesize']:
"";
801 $offset=($_SESSION[SESSION_KEY.
'g_pagesize']!=-1)?
" OFFSET ".Database::escape_string(
$offset):
"";
802 $order=
" order by jr_date_order asc,jr_internal asc";
807 'order by jr_date asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc',
808 'order by jr_date desc,substring(jr_pj_number,\'[0-9]+$\')::numeric desc',
810 $table->add(_(
'Echeance'),
$url,
" order by jr_ech asc",
811 " order by jr_ech desc",
'ea',
'ed');
812 $table->add(_(
'Paiement'),
$url,
" order by jr_date_paid asc",
813 " order by jr_date_paid desc",
'eap',
'edp');
815 ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric asc ',
816 ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric desc ',
818 $table->add(_(
'Tiers'),
$url,
" order by name asc",
819 " order by name desc",
'na',
'nd');
820 $table->add(_(
'Montant'),
$url,
" order by jr_montant asc",
821 " order by jr_montant desc",
"ma",
"md");
822 $table->add(_(
"Description"),
$url,
"order by jr_comment asc",
823 "order by jr_comment desc",
"ca",
"cd");
845 return array(0, _(
"Aucun enregistrement trouvé"));
848 $r.=
'<table class="result" id="history_operation_t">';
852 $r.=
'<th>'.$table->get_header(0).
'</th>';
855 $r.=
'<th>'.$table->get_header(1).
'</td>';
859 $r.=
'<th>'.$table->get_header(2).
'</th>';
861 $r.=
'<th>'.$table->get_header(3).
'</th>';
863 if ( $this->
type !=
"ODS")
865 $r.=
'<th>'.$table->get_header(4).
'</th>';
867 $r.=
"<th>"._(
"n° interne").
"</th>";
868 $r.=
'<th>'.$table->get_header(6).
'</th>';
869 $r.=
th(
'Notes',
' style="width:15%"');
870 $r.=
'<th>'.$table->get_header(5).
'</th>';
874 $r.=
"<th> "._(
'Payé').
"</th>";
876 $r.=
"<th>"._(
'Concerne').
"</th>";
877 $r.=
"<th>"._(
'Document').
"</th>";
890 $tr=
'<TR class="odd">';
894 $tr=
'<TR class="even">';
909 $r.=
$row[
'str_jr_date_paid'];
922 if ($this->
type !=
'ODS')
931 $r.=sprintf(
'<A class="detail" style="text-decoration:underline" HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
937 $tmp_jr_comment=
h(
$row[
'jr_comment']).$row[
'tag_operation'];
939 if (
$row[
'analytic_op'] !=
"")
940 $r.=sprintf(
'<span style="float:right;background:black;color:white;">∋</span>');
942 $r.=
td(
h(
$row[
'n_text']),
' style="font-size:0.87em%"');
949 if (
$row[
'jrn_def_type']==
'FIN')
951 $positive=$this->
cn->get_value(
"select qf_amount from quant_fin where jr_id=$1",
952 array(
$row[
'jr_id']));
953 if ($this->
cn->count()!=0)
955 $positive=($positive<0)?1:0;
958 $r.=
"<TD align=\"right\">";
959 $t_amount=
$row[
'jr_montant'];
960 if (
$row[
'total_invoice']!=
null&&
$row[
'total_invoice']!=
$row[
'jr_montant'])
961 $t_amount=
$row[
'total_invoice'];
962 $tot=($positive!=0)?bcsub(
$tot, $t_amount):bcadd(
$tot, $t_amount);
964 if (
$row [
'jrn_def_type']==
'FIN')
966 $r.=( $positive!=0 )?
"<font color=\"red\"> - ".
nbm($t_amount).
"</font>":
nbm($t_amount);
970 $r.=( $t_amount<0 )?
"<font color=\"red\"> ".
nbm($t_amount).
"</font>":
nbm($t_amount);
979 $w->set_range(
"paid_operation_ck");
980 $w->name=
"rd_paid".$row[
'jr_id'];
981 $w->selected=(
$row[
'jr_rapt']==
'paid')?
true:
false;
983 $w->readonly=( $p_paid==2)?
true:
false;
985 $h->name=
"set_jr_id".$row[
'jr_id'];
986 $r.=
'<TD>'.$w->input().$h->input().
'</TD>';
987 if (
$row[
'jr_rapt']==
'paid')
989 $amount_paid=bcadd($amount_paid, $t_amount);
993 $amount_unpaid=bcadd($amount_unpaid, $t_amount);
999 $rec->set_jr_id(
$row[
'jr_id']);
1005 foreach (
$a as $key=> $element)
1009 $l_amount=$this->
cn->get_value(
"select jr_montant from jrn ".
1010 " where jr_id=$1", array($element));
1011 $r.=
"<A class=\"detail\" HREF=\"javascript:modifyOperation('".$element.
"',".
$gDossier.
")\" > ".
$operation->get_internal().
"[".
nbm($l_amount).
"]</A>";
1016 if (
$row[
'jr_valid']==
'f')
1018 $r.=
"<TD>"._(
"Opération annulée").
"</TD>";
1025 if (
$row[
'jr_pj_name']!=
"")
1027 $r.=
'<td>'.HtmlInput::show_receipt_document(
$row[
'jr_id']).
'</td>';
1035 $amount_paid=round($amount_paid, 4);
1036 $amount_unpaid=round($amount_unpaid, 4);
1039 $r.=
'<TD COLSPAN="5">Total</TD>';
1041 $r.=
'<TD ALIGN="RIGHT">'.nbm(
$tot).
"</TD>";
1046 $r.=
'<TD COLSPAN="5">'._(
"Payé").
'</TD>';
1047 $r.=
td(
"").td(
"").td(
"").td(
'');
1048 $r.=
'<TD ALIGN="RIGHT">'.nbm($amount_paid).
"</TD>";
1052 $r.=
'<TD COLSPAN="5">'._(
"Non payé").
'</TD>';
1053 $r.=
td(
"").td(
"").td(
"").td(
'');
1054 $r.=
'<TD ALIGN="RIGHT">'.nbm($amount_unpaid).
"</TD>";
1096 $limit=
" LIMIT ".MAX_RECONCILE;
1101 $sql.=
" order by jr_date asc ".$limit;
1115 return array(0, _(
"Aucun enregistrement trouvé"));
1117 $r.=
'<table class="result">';
1121 $r.=
"<th>"._(
"Selection").
"</th>";
1122 $r.=
"<th>"._(
"Internal").
"</th>";
1124 if ($this->
type==
'ALL')
1126 $r.=
th(_(
'Journal'));
1129 $r.=
'<th>'._(
"Date").
'</th>';
1130 $r.=
'<th>'._(
"Pièce").
'</td>';
1132 $r.=
'<th>'._(
"Description").
'</th>';
1133 $r.=
th(_(
'Notes'),
' ');
1134 $r.=
'<th>'._(
"Montant").
'</th>';
1135 $r.=
"<th>"._(
'Concerne').
"</th>";
1148 $tr=
'<TR class="odd">';
1150 $tr=
'<TR class="even">';
1155 $r.=
'<td><INPUT TYPE="CHECKBOX" name="jr_concerned'.$row[
'jr_id'].
'" ID="jr_concerned'.
$row[
'jr_id'].
'" value="'.
$row[
'quick_code'].
'"> </td>';
1162 $href=basename($_SERVER[
'PHP_SELF']);
1165 $r.=sprintf(
'<A class="detail" style="text-decoration:underline" HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s </A>',
1168 if ($this->
type==
'ALL')
1177 $r.=
$row[
'jr_pj_number'];
1185 $tmp_jr_comment=
h(
$row[
'jr_comment']).$row[
'tag_operation'];
1186 $r.=$tmp_jr_comment;
1188 $r.=
td(
h(
$row[
'n_text']),
' style="font-size:0.87em"');
1195 if (
$row[
'jrn_def_type']==
'FIN')
1197 $positive=$this->
cn->get_value(
"select qf_amount from quant_fin where jr_id=$1",
1198 array(
$row[
'jr_id']));
1199 if ($this->
cn->count()!=0)
1200 $positive=($positive<0)?1:0;
1202 $r.=
"<TD align=\"right\">";
1204 $r.=( $positive!=0 )?
"<font color=\"red\"> - ".
nbm(
$row[
'total_invoice']).
"</font>":
nbm(
$row[
'total_invoice']);
1211 $rec->set_jr_id(
$row[
'jr_id']);
1217 foreach (
$a as $key=> $element)
1221 $l_amount=$this->
cn->get_value(
"select jr_montant from jrn ".
1222 " where jr_id=$1", array($element));
1223 $r.=
"<A class=\"detail\" HREF=\"javascript:modifyOperation('".$element.
"',".
$gDossier.
")\" > ".
$operation->get_internal().
"[".
nbm($l_amount).
"]</A>";
1228 if (
$row[
'jr_valid']==
'f')
1230 $r.=
"<TD>"._(
"Opération annulée").
"</TD>";
1257 echo
'<div id="div_jrn'.$p_div.
'" >';
1259 echo
'<div style="padding:5px">';
1260 echo
'<form method="GET" id="'.$p_div.
'search_frm" onsubmit="return hide_ledger_choice(\''.$p_div.
'search_frm\')">';
1263 echo _(
'Filtre ').HtmlInput::filter_table($p_div.
'tb_jrn',
'0,1,2', 2);
1264 echo
HtmlInput::anchor_action(_(
'Inverser sel'),
' toggle_checkbox(\''.
"{$p_div}search_frm".
'\')
','sel_
'.$p_div,"nav");
1266 echo HtmlInput::anchor_action(_('Effacer sel
'),' unselect_checkbox(\
''.
"{$p_div}search_frm".
'\')
','unsel_
'.$p_div,"nav");
1268 echo HtmlInput::anchor_action(_('Financier
'),' select_checkbox_attribute(\
''.
"{$p_div}search_frm".
'\',\
'ledger_type\',\'FIN\') ',
'selfin_'.$p_div,
"nav");
1270 echo
HtmlInput::anchor_action(_(
'Vente'),
' select_checkbox_attribute(\''.
"{$p_div}search_frm".
'\',\
'ledger_type\',\'VEN\') ',
'selfven_'.$p_div,
"nav");
1272 echo
HtmlInput::anchor_action(_(
'Achat'),
' select_checkbox_attribute(\''.
"{$p_div}search_frm".
'\',\
'ledger_type\',\'ACH\') ',
'selfach_'.$p_div,
"nav");
1274 echo
HtmlInput::anchor_action(_(
'Op.Diverses'),
' select_checkbox_attribute(\''.
"{$p_div}search_frm".
'\',\
'ledger_type\',\'ODS\') ',
'selfods_'.$p_div,
"nav");
1275 echo
'<table class="result" id="'.$p_div.
'tb_jrn">';
1278 echo
th(_(
'Description'));
1291 $r->set_attribute(
"ledger_type",
$row[
'jrn_def_type']);
1293 if ( $p_selected !=
null && in_array(
$row[
'jrn_def_id'],$p_selected))
1297 $class=(
$e%2==0)?
' class="even" ':
' class="odd" ';
1298 echo
'<tr '.$class.
'>';
1299 echo
'<td style="white-space: nowrap">'.$r->input().$row[
'jrn_def_name'].
'</td>';
1300 echo
'<td >'.$row[
'jrn_def_description'].
'</td>';
1301 echo
'<td >'.$row[
'jrn_def_type'].
'</td>';
1313 $ret=ob_get_contents();
1326 $record=$user_filter_sql->to_array();
1328 $record[
'desc']=$record[
'description'];
1329 $record[
'r_jrn']=explode(
",", $record[
'r_jrn']??
"");
1330 $record[
'tag']=explode(
",",$record[
'uf_tag']??
"");
1331 $record[
'tag_option']=$record[
"uf_tag_option"];
1332 $record[
'p_currency_code']=$record[
'uf_currency_code'];
1346 sprintf(
"display_list_filter('%s','%s','%s')"
1348 ,
$http->request(
"ac")
1350 ),uniqid(),
'smallbutton');
1359 require_once NOALYSS_TEMPLATE.
"/acc_ledger_search-display_list_filter.php";
th($p_string, $p_extra='', $raw='')
noalyss_str_replace($search, $replace, $string)
sql_string($p_string)
Fix the problem with the quote char for the database.
td($p_string='', $p_extra='')
surround the string with td
nbm($p_number, $p_dec=2)
format the number with a sep.
global $g_user
if no group available , then stop
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
h( $row[ 'oa_description'])
if(!headers_sent())
– pour utiliser unoconv démarrer un server libreoffice commande libreoffice –headless –accept="socket...
catch(Exception $e) $exercice
foreach($array as $idx=> $m) $w
if(! isset($_GET['submit_query'])) $p_action
display currency , convert to euro , and save them if used.
build_search_filter()
Build the button for managing the filter for search.
$type
type of ledger : FIN,ODS,VEN,ACH
list_operation($sql, $offset, $p_paid=0)
Show all the operation.
display_search_form()
return a html string with the search_form
display_list_filter()
display a list of saved search
button_propose_filter()
build an HTML string with a button to show the list of saved search
$all
Flag to indicate if all ledgers must searched (1 for yes)
build_search_sql($p_array, $p_order="", $p_where="")
this function will create a sql stmt to use to create the list for the ledger,
build_name_filter()
Build the button for saving the filter for search.
static build_array(User_Filter_SQL $user_filter_sql)
use a user_filter row and turns it into an array for javascript purpose
$id
prefix for id of DOM id id of the ledger
__construct($p_type, $p_all=1, $p_div="")
return a HTML string with the form for the search
select_ledger($p_selected, $p_div)
return the html code to create an hidden div and a button to show this DIV.
list_operation_to_reconcile($sql, $p_target)
Show all the operation.
this file match the tables jrn & jrnx the purpose is to remove or save accountant writing to these ta...
new class for managing the reconciliation it must be used instead of the function InsertRapt,...
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows
static id()
return the 'gDossier' value after a check
Input HTML for the card show buttons, in the file, you have to add card.js How to use :
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
This class handles only the numeric input, the input will call a javascript to change comma to period...
show a button, for selecting a account and a input text for manually inserting an account the differe...
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
Class to manage the company parameter (address, name...)
For the periode tables parm_periode and jrn_periode.
Description of class_syn_sort_table.
toNumber($p_num)
remove the useless space, change comma by period and try to return a number