1114 |
// First we add in jrnx |
// First we add in jrnx |
1115 |
|
|
1116 |
// Compute the j_grpt |
// Compute the j_grpt |
1117 |
|
// NOTE STAN: pourquoi "+1" à la ligne suivante? Je pense que le GetNextId retourne déja un truc incrémenté, non? |
1118 |
|
// en effet non, car je vois dans la table "jrnx" que le j_grpt n'est incrémenté que de un. |
1119 |
$seq=GetNextId($p_cn,'j_grpt')+1; |
$seq=GetNextId($p_cn,'j_grpt')+1; |
1120 |
|
|
1121 |
|
|
1124 |
StartSql($p_cn); |
StartSql($p_cn); |
1125 |
InsertJrnx($p_cn,'c',$p_user,$p_jrn,$poste,$e_date,$amount+$sum_vat,$seq,$periode); |
InsertJrnx($p_cn,'c',$p_user,$p_jrn,$poste,$e_date,$amount+$sum_vat,$seq,$periode); |
1126 |
|
|
1127 |
// Credit = goods |
// Credit = goods |
1128 |
for ( $i = 0; $i < $nb_item;$i++) { |
for ( $i = 0; $i < $nb_item;$i++) { |
1129 |
if ( ! isset ( $a_good[$i]) ) continue; |
if ( ! isset ( $a_good[$i]) ) continue; |
1130 |
$poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT); |
$poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT); |