65 $this->
user=$_SESSION[SESSION_KEY.
'g_user'];
66 $this->periode=
$g_user->get_periode();
68 $this->jr_optype=
"NOR";
70 $this->currency_rate=1;
71 $this->currency_rate_ref=1;
72 $this->currency_id=NULL;
83 periode {$this->periode}
85 jr_optype {$this->jr_optype}
86 amount {$this->amount}
87 currency_rate {$this->amount}
88 currency_rate_ref {$this->amount}
89 currency_id {$this->amount}
102 $ret=$this->
db->get_value(
'select jr_grpt_id from jrn where jr_id=$1',
103 array($this->
jr_id));
114 $this->
db->prepare(
'prep_tiers',
"select fiche_detail.f_id,ad_value from
116 join (select qf_other as f_id
121 select qp_supplier as f_id
123 where quant_purchase.j_id=$2
125 select qs_client as f_id
127 where quant_sold.j_id=$2 ) as v_fiche on (fiche_detail.f_id=v_fiche.f_id) where ad_id=23 ");
137 $this->
db->prepare(
'prep_counterpart',
"select fiche_detail.f_id,ad_value from
139 join (select qf_bank as f_id
144 select qp_fiche as f_id
146 where quant_purchase.j_id=$2
148 select qs_fiche as f_id
150 where quant_sold.j_id=$2 ) as v_fiche on (fiche_detail.f_id=v_fiche.f_id) where ad_id=23 ");
169 $res_tiers=$this->
db->execute(
'prep_tiers',
170 array($pn_jrn_id,$pn_jrnx_id));
173 $tiers=$atiers[
'ad_value'];
178 $res_counterpart=$this->
db->execute(
'prep_counterpart',
179 array($pn_jrn_id,$pn_jrnx_id));
183 $tiers=$atiers[
'ad_value'];
209 if ( $this->poste ==
"") {
throw new Exception (__FILE__.
':'.__LINE__.
' Poste comptable vide');
return false; }
211 if ( $this->amount < 0 )
213 $this->
type=($this->
type==
'd')?
'c':
'd';
215 if ( DEBUGNOALYSS > 1 ) {
216 echo
"insert_jrnx = [{ $this->poste}] {$this->amount} rounded ".round($this->amount,2).
" type {$this->type}<br>";
218 $this->amount=abs($this->amount);
220 $this->desc=(isset($this->desc))?$this->desc:
'';
221 $this->amount=(trim($this->amount)==
''||$this->amount==NULL)?0:$this->amount;
222 $Res=$this->
db->exec_sql(
"select insert_jrnx
223 ($1::text,abs($2)::numeric,$3::account_type,$4::integer,$5::integer,$6::bool,$7::text,$8::integer,upper($9),$10::text)",
226 round($this->amount,2),
235 if (
$Res===FALSE)
return FALSE;
236 $this->jrnx_id=$this->
db->get_current_seq(
's_jrn_op');
245 if ( $this->
jr_id == 0 ) {
return 0;}
246 $sum=$this->
db->get_value(
"select
247 sum(case when j_debit is false and jrn_def.jrn_def_type='ACH'
248 then 0-j_montant when j_debit is true and jrn_def.jrn_def_type='VEN'
250 else j_montant end) sum_tax
252 jrn_tax join jrnx j1 using (j_id)
253 join jrn on (jr_grpt_id=j1.j_grpt)
254 join jrn_def on (jrn.jr_def_id=jrn_def.jrn_def_id)
256 jrn.jr_id=$1",[$this->
jr_id]);
258 if ( $this->
db->count()==0) {
return 0;}
269 echo __LINE__.
"debug {$this->pj} est vide";
270 $sql=
"update jrn set jr_pj_number=$1 where jr_id=$2";
271 $this->
db->exec_sql(
$sql,array(
null,$this->
jr_id));
275 if ( $this->
db->count_sql(
"select jr_id from jrn
276 where jr_pj_number=$1 and jr_def_id=$2
278 array($this->pj,$this->
jrn,$this->
jr_id)
282 $sql=
"update jrn set jr_pj_number=$1 where jr_id=$2";
283 $this->
db->exec_sql(
$sql,array($this->pj,$this->
jr_id));
288 $pref=$this->
db->get_value(
"select jrn_def_pj_pref from jrn_def where jrn_def_id=$1",
303 $seq=$this->
db->get_next_seq(
's_jrn_pj'.$this->
jrn);
304 $this->pj=$pref.$seq;
307 $c=$this->
db->count_sql(
"select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2
309 array($this->pj,$this->
jrn,$this->
jr_id)
321 $sql=
"update jrn set jr_pj_number=$1 where jr_id=$2";
322 $this->
db->exec_sql(
$sql,array($this->pj,$this->
jr_id));
339 if ( DEBUGNOALYSS > 1 ) {
340 echo
"insert_jrn = {$this->amount} <br>";
342 $diff=$this->
db->get_value(
"select check_balance ($1)",array($this->grpt));
346 printf (_(
"Erreur : balance incorrecte :diff = %s"),
$diff);
350 $echeance=( isset( $this->echeance) &&
noalyss_strlentrim($this->echeance) != 0)?$this->echeance:
null;
351 if ( ! isset($this->mt) )
353 $this->mt=microtime(
true);
358 $this->amount=(trim($this->amount)==
''||$this->amount==NULL)?0:$this->amount;
359 $Res=$this->
db->exec_sql(
"insert into jrn (jr_def_id,jr_montant,jr_comment,".
360 "jr_date,jr_ech,jr_grpt_id,jr_tech_per,jr_mt,jr_optype,currency_id,currency_rate,currency_rate_ref) values (".
362 "to_date($4,'DD.MM.YYYY'),to_date($5,'DD.MM.YYYY'),$6,$7,$8,$9,$10,$11,$12)",
363 array ($this->
jrn, $this->amount,$p_comment,
364 $this->date,$echeance,$this->grpt,$this->periode,$this->mt,$this->jr_optype,
365 $this->currency_id,$this->currency_rate,$this->currency_rate_ref)
371 $this->
jr_id=$this->
db->get_current_seq(
's_jrn');
382 if ( ! isset($this->
jr_id) )
383 throw new Exception(
'jr_id is not set',1);
384 $Res=$this->
db->exec_sql(
"select jr_internal from jrn where jr_id=".$this->
jr_id);
387 $this->jr_internal= $l_line[
'jr_internal'];
396 $res=$this->
db->exec_sql(
'select jr_id from jrn where jr_internal=$1',
409 $filter_sql=
$g_user->get_ledger_sql(
'ALL',3);
411 if ( $this->
jr_id==0 )
return;
412 $sql=
" select jr_id,j_id,jr_date,j_qcode,j_poste,j_montant,jr_internal,case when j_debit = 'f' then 'C' else 'D' end as debit,jr_comment as description,
413 vw_name,pcm_lib,j_debit,coalesce(comptaproc.get_letter_jnt(j_id),-1) as letter,jr_def_id ".
414 " from jrnx join jrn on (jr_grpt_id=j_grpt)
415 join tmp_pcmn on (j_poste=pcm_val)
416 left join vw_fiche_attr on (j_qcode=quick_code)
418 jr_id=$1 and $filter_sql order by j_debit desc";
427 $sql=
"update jrnx set j_text=$1 where j_id=$2";
428 $this->
db->exec_sql(
$sql,array($p_text,$this->jrnx_id));
433 $sql=
"update jrn set jr_comment=$1 where jr_id=$2";
434 $this->
db->exec_sql(
$sql,array($p_text,$this->
jr_id));
439 if (
isDate($p_text) ==
null )
443 $sql=
"update jrn set jr_ech=to_date($1,'DD.MM.YYYY') where jr_id=$2";
444 $this->
db->exec_sql(
$sql,array($p_text,$this->
jr_id));
449 $sql=
"select jr_def_id from jrn where jr_id=$1";
468 if (
$l[
'j_poste'] == $this->poste || (
$l[
'j_qcode']==$this->qcode && trim($this->qcode) !=
''))
469 $border=
' class="highlight"';
470 $r.=
'<tr '.$border.
'>';
479 $r.=
'<td '.$border.
'>';
486 $r.=
'<td '.$border.
'>';
494 $r.=
'<td '.$border.
'>';
501 $r.=
'<td '.$border.
'>';
509 $r.=
'<td '.$border.
'>';
510 $a=(
$l[
'letter']!=-1)?
$l[
'letter']:
'';
532 return "ERROR PARAMETRE";
568 $Res=$this->
db->exec_sql(
"select
569 to_char(j_date,'DD.MM.YYYY') as j_date,
573 coalesce(j_qcode,'-') as qcode,
577 to_char(jr_ech,'DD.MM.YYYY') as jr_ech,
578 to_char(jr_date,'DD.MM.YYYY') as jr_date,
579 jr_id,jr_internal,jr_def_id,jr_pj
580 from jrnx inner join jrn on j_grpt=jr_grpt_id where j_grpt=$1",array($p_grpt));
582 if ( $MaxLine == 0 )
return null;
585 for (
$i=0;
$i < $MaxLine;
$i++)
589 $l_array[
'op_date']=$l_line[
'j_date'];
590 if ( $l_line[
'j_debit'] ==
't' )
592 $l_class=sprintf(
"class_deb%d",
$deb);
593 $l_montant=sprintf(
"mont_deb%d",
$deb);
594 $l_text=sprintf(
"text_deb%d",
$deb);
595 $l_qcode=sprintf(
"qcode_deb%d",
$deb);
596 $l_array[$l_class]=$l_line[
'j_poste'];
597 $l_array[$l_montant]=$l_line[
'j_montant'];
598 $l_array[$l_text]=$l_line[
'j_text'];
599 $l_array[$l_qcode]=$l_line[
'qcode'];
600 $l_id=sprintf(
"op_deb%d",
$deb);
601 $l_array[$l_id]=$l_line[
'j_id'];
604 if ( $l_line[
'j_debit'] ==
'f' )
606 $l_class=sprintf(
"class_cred%d",
$cred);
607 $l_montant=sprintf(
"mont_cred%d",
$cred);
608 $l_array[$l_class]=$l_line[
'j_poste'];
609 $l_array[$l_montant]=$l_line[
'j_montant'];
610 $l_id=sprintf(
"op_cred%d",
$cred);
611 $l_array[$l_id]=$l_line[
'j_id'];
612 $l_text=sprintf(
"text_cred%d",
$cred);
613 $l_array[$l_text]=$l_line[
'j_text'];
614 $l_qcode=sprintf(
"qcode_cred%d",
$cred);
615 $l_array[$l_qcode]=$l_line[
'qcode'];
618 $l_array[
'jr_internal']=$l_line[
'jr_internal'];
619 $l_array[
'comment']=$l_line[
'jr_comment'];
620 $l_array[
'ech']=$l_line[
'jr_ech'];
621 $l_array[
'jr_id']=$l_line[
'jr_id'];
622 $l_array[
'jr_def_id']=$l_line[
'jr_def_id'];
650 if (
$ledger_id==
'')
throw new Exception(_(
'Journal non trouvé'));
656 switch($oledger->get_type())
672 if ( empty(
$ret->det->array))
687 if ( $this->det->currency_id == 0 ) {
691 if (
$ledger_id==
'')
throw new Exception(_(
'Journal non trouvé'));
697 switch($oledger->get_type())
702 sum(oc_amount)+sum(oc_vat_amount )
703 from operation_currency oc
704 join quant_sold qs using(j_id)
706 oc.j_id in (select j_id
707 from jrnx join jrn on (jr_grpt_id=j_grpt)
714 sum(oc_amount)+sum(oc_vat_amount )
715 from operation_currency oc
716 join quant_purchase qs using(j_id)
718 oc.j_id in (select j_id
719 from jrnx join jrn on (jr_grpt_id=j_grpt)
726 sum(oc_amount)+sum(oc_vat_amount )
727 from operation_currency oc
728 join quant_fin qs using(j_id)
730 oc.j_id in (select j_id
731 from jrnx join jrn on (jr_grpt_id=j_grpt)
738 sum(oc_amount)+sum(oc_vat_amount )
739 from operation_currency oc
740 join jrnx using(j_id)
741 join jrn on (jr_grpt_id=j_grpt)
743 jr_id=$1 and j_debit='t';
757 $this->info=
new stdClass();
759 $array=$this->
db->get_value(
"select ji_value from jrn_info where
760 jr_id=$1 and id_type=$2",array($this->
jr_id,
'OTHER'));
761 $this->info->other=
$array;
764 $array=$this->
db->get_value(
"select ji_value from jrn_info where
765 jr_id=$1 and id_type=$2",array($this->
jr_id,
'BON_COMMANDE'));
766 $this->info->command=
$array;
776 if ( ! in_array(
$p_type,array(
'OTHER',
'BON_COMMANDE')))
return;
777 if (trim($p_info)==
"") {
778 $this->
db->exec_sql(
'delete from jrn_info where jr_id=$1 and id_type=$2',array($this->
jr_id,
$p_type));
781 $exist=$this->
db->get_value(
'select count(ji_id) from jrn_info where jr_id=$1 and id_type=$2',array($this->
jr_id,
$p_type));
782 if ( $exist ==
"0" ) {
784 $this->
db->exec_sql(
'insert into jrn_info(jr_id,id_type,ji_value) values ($1,$2,$3)',
788 $this->
db->exec_sql(
'update jrn_info set ji_value=$3 where jr_id=$1 and id_type=$2',
795 if ($p_string ==
"")
return;
796 $a_action=explode(
',',$p_string);
797 for (
$i=0;
$i<count($a_action);
$i++)
811 throw new Exception(_(
'Acc_Operation::set_id , id invalide '));
821 if ( $this->
jr_id == 0 )
822 throw new Exception(_(
'Object invalide, id incorrect'));
824 $this->
db->get_value(
'select count(*) from jrn where jr_id=$1',
825 array($this->
jr_id)) == 0 )
826 throw new Exception(_(
'Object invalide, id incorrect'));
828 $this->
db->exec_sql(
"update jrn set jr_rapt = 'paid' where jr_id = $1",
829 array($this->
jr_id));
836 if ( $this->
jr_id == 0 )
837 throw new Exception(_(
'Object invalide, id incorrect'));
838 $amount=$this->
db->get_value(
'select jr_montant from jrn where jr_id=$1',
839 array($this->
jr_id));
845 $_SESSION[SESSION_KEY.
'g_pass']=
'dany';
865 $type_operation=
new ISelect(
"jr_optype");
866 $type_operation->value=array(
867 array((
"label")=>_(
"Normal"),
"value"=>
"NOR"),
868 array((
"label")=>_(
"Ouverture"),
"value"=>
"OPE"),
869 array((
"label")=>_(
"Fermeture"),
"value"=>
"CLO"),
870 array((
"label")=>_(
"Extourne"),
"value"=>
"EXT")
873 $type_operation->selected=$p_status;
874 return $type_operation;
886 $a_code=$this->
db->get_array(
"select code from v_menu_dependency vmd where me_code=$1 and p_id=$2",
888 if ( empty ($a_code)) {
889 $r=_(
"Menu invalide");
895 $r=sprintf(
'<form id="%s" method="POST" ACTION="%s">',
$p_id,NOALYSS_URL.
"/do.php?".http_build_query([
901 $r.=
"<ul style=\"margin-left:2rem;padding-left:0;list-style:none;\">";
902 $r.=sprintf(
"<li>%s</li>",
$operation->det->jr_pj_number);
907 if (count($a_code) == 1 ) {
909 $r.=sprintf(_(
"Voulez-vous aller à %s pour dupliquer cette opération ?"),$a_code[0][
'code']);
914 $nb_code=count($a_code);
916 for (
$i=0;
$i<$nb_code;
$i++) {
917 $select->value[]=array(
"label"=>$a_code[
$i][
'code'],
"value"=>$a_code[
$i][
'code']);
919 $r.=sprintf(_(
"Voulez-vous aller à %s pour dupliquer cette opération ?"),
$select->input());
938 if ( isset ($item[
'qs_vat_sided']) && $item[
'qs_vat_sided'] != 0 ) {
939 $array[
'e_march'.$idx.
'_tva_amount']=0;
940 }
elseif (isset ($item[
'qp_vat_sided']) && $item[
'qp_vat_sided'] != 0 ){
941 $array[
'e_march'.$idx.
'_tva_amount']=0;
945 if ( DEBUGNOALYSS>1) {
946 echo \Noalyss\Dbg::hidden_info(
"operation->det_array",
$operation->det->array);
947 echo \Noalyss\Dbg::hidden_info(
"array",
$array);
978 parent::__construct($p_cn);
979 $this->
jr_id=$p_jrid;
980 $this->det=
new stdClass();
988 $sql=
"SELECT jr_id, jr_def_id, jr_montant, jr_comment, jr_date, jr_grpt_id,
989 jr_internal, jr_tech_date, jr_tech_per, jrn_ech, jr_ech, jr_rapt,jr_ech,
990 jr_valid, jr_opid, jr_c_opid, jr_pj, jr_pj_name, jr_pj_type,
991 jr_pj_number, jr_mt,jr_rapt,jr_date_paid,jr_optype,currency_id,currency_rate,currency_rate_ref
992 FROM jrn where jr_id=$1";
994 if ( count(
$array) == 0 )
throw new Exception(
'Aucune ligne trouvée');
997 $this->det->$key=
$val;
999 $sql=
"select n_text from jrn_note where jr_id=$1";
1000 $this->det->note=$this->
db->get_value(
$sql,array($this->
jr_id));
1001 $this->det->note=strip_tags($this->det->note);
1009 $array[
'desc']=$this->det->jr_comment;
1012 $array[
'p_jrn']=$this->det->jr_def_id;
1030 parent::__construct($p_cn,$p_jrid);
1031 $this->signature=
'ODS';
1032 $this->det=
new stdClass();
1037 $sql=
"SELECT j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def,
1038 j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date,
1039 j_tech_per, j_qcode,f_id
1040 FROM jrnx where j_grpt = $1 order by j_debit desc,j_poste";
1041 $this->det->array=$this->
db->get_array(
$sql,array($this->det->jr_grpt_id));
1050 $array=parent::compute_array();
1055 $array[
"qc_".$i]=$this->det->array[
$i][
'j_qcode'];
1056 $array[
"poste".$i]=$this->det->array[
$i][
'j_poste'];
1057 $array[
"amount".$i]=$this->det->array[
$i][
'j_montant'];
1058 if ( $this->det->array[
$i][
'j_debit'] ==
't') {
1061 $array[
"ld".$i]=$this->det->array[
$i][
'j_text'];
1079 parent::__construct($p_cn,$p_jrid);
1080 $this->signature=
'VEN';
1081 $this->det=
new stdClass();
1086 $sql=
"SELECT qs_id, qs_internal, qs_fiche, qs_quantite, qs_price, qs_vat,
1087 qs_vat_code, qs_client, qs_valid, j_id,j_text,qs_vat_sided , qs_unit , j_debit
1088 FROM quant_sold join jrnx using(j_id) where j_grpt=$1 order by j_id";
1089 $this->det->array=$this->
db->get_array(
$sql,array($this->det->jr_grpt_id));
1098 $array=parent::compute_array();
1103 $array[
"e_client"]=$this->
db->get_value(
"select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1104 array($this->det->array[0][
'qs_client']));
1107 $array[
"e_march".$i]=$this->
db->get_value(
"select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1108 array($this->det->array[
$i][
'qs_fiche']));
1110 $array[
"e_march".$i.
"_price"]=$this->det->array[
$i][
'qs_unit'];
1111 $array[
"e_march".$i.
"_label"]=$this->det->array[
$i][
'j_text'];
1112 $array[
"e_march".$i.
"_tva_id"]=$this->det->array[
$i][
'qs_vat_code'];
1113 $array[
"e_march".$i.
"_tva_amount"]=$this->det->array[
$i][
'qs_vat'];
1114 $array[
"e_quant".$i]=$this->det->array[
$i][
'qs_quantite'];
1134 parent::__construct($p_cn,$p_jrid);
1135 $this->signature=
'ACH';
1141 $sql=
"SELECT qp_id, qp_internal, j_id, qp_fiche, qp_quantite, qp_price, qp_vat,
1142 qp_vat_code, qp_nd_amount, qp_nd_tva, qp_nd_tva_recup, qp_supplier,
1143 qp_valid, qp_dep_priv,j_text,qp_vat_sided,qp_unit , j_debit
1144 FROM quant_purchase join jrnx using(j_id) where j_grpt=$1 order by j_id";
1145 $this->det->array=$this->
db->get_array(
$sql,array($this->det->jr_grpt_id));
1154 $array=parent::compute_array();
1159 $array[
"e_client"]=$this->
db->get_value(
"select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1160 array($this->det->array[0][
'qp_supplier']));
1163 $array[
"e_march".$i]=$this->
db->get_value(
"select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1164 array($this->det->array[
$i][
'qp_fiche']));
1166 $array[
"e_march".$i.
"_price"]=$this->det->array[
$i][
'qp_unit'];
1167 $array[
"e_march".$i.
"_label"]=$this->det->array[
$i][
'j_text'];
1168 $array[
"e_march".$i.
"_tva_id"]=$this->det->array[
$i][
'qp_vat_code'];
1169 $array[
"e_march".$i.
"_tva_amount"]=$this->det->array[
$i][
'qp_vat'];
1170 $array[
"e_quant".$i]=$this->det->array[
$i][
'qp_quantite'];
1190 parent::__construct($p_cn,$p_jrid);
1191 $this->signature=
'FIN';
1197 $sql=
"SELECT qf_id, qf_bank, jr_id, qf_other, qf_amount,j_id
1198 FROM quant_fin where jr_id = $1";
1199 $this->det->array=$this->
db->get_array(
$sql,array($this->
jr_id));
1208 $array=parent::compute_array();
1214 $array[
"e_other".$i]=$this->
db->get_value(
"select ad_value from fiche_detail where f_id=$1 and ad_id=23",
1215 array($this->det->array[
$i][
'qf_other']));
1217 $array[
"e_other".$i.
"_amount"]=$this->det->array[
$i][
'qf_amount'];
1218 $array[
"e_other".$i.
"_comment"]=$this->det->jr_comment;
noalyss_strlentrim($p_string)
noalyss_str_replace($search, $replace, $string)
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'])
for($j=0;$j< $nb_row;$j++)($j%2==0)? 'even' $show
Contains the detail of an operation Acc_Operation.
__construct($p_cn, $p_jrid=0)
this class manage data from the QUANT_FIN table
__construct($p_cn, $p_jrid=0)
this class manage data from the JRNX and JRN table
__construct($p_cn, $p_jrid=0)
this file match the tables jrn & jrnx the purpose is to remove or save accountant writing to these ta...
prepare_sql_tiers()
prepare the query for getting the qcode of the tiers, when executing this SQL , an array of (jrn....
get_sum_other_tax()
get the sum of other tax linked to this operation
operation_update_comment($p_text)
add a comment to the operation (jrn.jr_text)
get_quant()
retrieve data from the table QUANT_*
form_clone_operation($p_id)
create a form to recreate the operation and returns it, just like a correct
insert_jrnx()
Insert into the table Jrn The needed data are :
static select_operation_type($p_status)
Return a select object to choose the type of operation.
get_internal()
Return the internal value, the property jr_id must be set before.
get_data($p_grpt)
Get data from jrnx where p_grpt=jrnx(j_grpt)
get_amount()
return amount of the jr_id
__construct($p_cn)
constructor set automatically the attributes user and periode
set_paid()
flag the operation as paid
get_ledger()
return the jrn_def_id from jrn
insert_jrn()
Insert into the table Jrn, the amount is computed from jrnx thanks the group id ($p_grpt)
operation_update_date_limit($p_text)
add a limit of payment to the operation (jrn.jr_ech)
update_comment($p_text)
add a comment to the line (jrnx.j_text)
set_pj()
set the pj of a operation in jrn. the jr_id must be set
save_info($p_info, $p_type)
Save into jrn_info.
get_jrnx_detail()
retrieve data from jrnx
prepare_sql_counterpart()
prepare the query for getting the qcode of the tiers, when executing this SQL , an array of (jrn....
get_currency_amount()
retrieve amount in currency for the operation
get_info()
retrieve info from the jrn_info, create 2 new arrays obj->info->command and obj->info->other the colu...
display_jrnx_detail($p_table)
display_jrnx_detail : get the data from get_jrnx_data and return a string with HTML code
find_tiers($pn_jrn_id, $pn_jrnx_id, $p_code)
Find the tiers of an operation , thanks the SQL prepared query prep_tiers and prep_counterpart.
set_id($p_id)
set the operation id (jrn.jr_id)
seek_internal($p_internal)
search an operation thankx it internal code
insert_related_action($p_string)
seek_group()
retrieve the grpt_id from jrn for a jr_id
this class manage data from the QUANT_PURCHASE table
__construct($p_cn, $p_jrid=0)
this class manage data from the QUANT_SOLD table
__construct($p_cn, $p_jrid=0)
static fetch_all($ret)
wrapper for the function pg_fetch_all
static fetch_result($ret, $p_row=0, $p_col=0)
wrapper for the function pg_fetch_all
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
static hidden()
return a string to set gDossier into a FORM
Html Input , create a tag <SELECT> ... </SELECT> if readonly == true then display the label correspon...
if( $delta< 0) elseif( $delta==0)
for($i=0;$i< $nb_jrn;$i++) $deb