From f2e1c2dddf2f5480e42184800a397431889a93a8 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Mon, 10 Sep 2007 13:22:33 +0000 Subject: [PATCH] fix bug CA --- html/modify_op.php | 20 ++++++++++---------- include/jrn.php | 7 ++++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/html/modify_op.php b/html/modify_op.php index b50457f28..7774d172f 100644 --- a/html/modify_op.php +++ b/html/modify_op.php @@ -266,16 +266,16 @@ if ( isset($_POST['update_record']) ) { foreach( $array_jid as $row_ca) { echo_debug(__FILE__.':'.__LINE__,"array is ",$row_ca); if ( ereg("^[6,7]+",$row_ca['j_poste'])) { - echo_debug(__FILE__.':'.__LINE__,"count is ",$count); - $op=new operation($cn); - $op->delete_by_jid($row_ca['j_id']); - $op->j_id=$row_ca['j_id']; - $op->oa_debit=$row_ca['j_debit']; - $op->oa_date=$row_ca['j_date']; - $op->oa_group=$group; - $op->oa_description=$_POST['comment']; - $op->save_form_plan($_POST,$count); - $count++; + echo_debug(__FILE__.':'.__LINE__,"count is ",$count); + $op=new operation($cn); + $op->delete_by_jid($row_ca['j_id']); + $op->j_id=$row_ca['j_id']; + $op->oa_debit=$row_ca['j_debit']; + $op->oa_date=$row_ca['j_date']; + $op->oa_group=$group; + $op->oa_description=$_POST['comment']; + $op->save_form_plan($_POST,$count); + $count++; } //if ereg }//foreach }// if ( $own->MY_ANALYTIC != "un" ) diff --git a/include/jrn.php b/include/jrn.php index 3ae409265..818f72683 100644 --- a/include/jrn.php +++ b/include/jrn.php @@ -59,7 +59,7 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) $col_vide=""; $disable=($p_mode==0)?"disabled":""; $str_dossier=dossier::get(); - + $count=0; for ( $i =0 ; $i < sizeof($l_array); $i++) { $content=$l_array[$i] ; @@ -125,7 +125,8 @@ function ShowOperationExpert($p_cn,$p_jr_id,$p_mode=1) if ( $own->MY_ANALYTIC != "un" && ereg("^[6,7]+",$content['j_poste'])) { - $r.=display_table_ca($p_cn,$i,$content['j_id'],$own,$p_mode,$content['j_montant']); + $r.=display_table_ca($p_cn,$count,$content['j_id'],$own,$p_mode,$content['j_montant']); + $count++; } $r.=""; @@ -327,8 +328,8 @@ function ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) if ( $own->MY_ANALYTIC != "un" && ereg("^[6,7]+",$content['j_poste'])) { $r.=display_table_ca($p_cn,$i_march,$row->j_id,$own,$p_mode,$tot_tva); + $i_march++; } - $i_march++; }