From e7ce293c82ec59edace2e596b448c28fa8a3ef11 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sat, 10 Apr 2004 18:43:29 +0000 Subject: [PATCH] bug 8531 --- include/constant.php | 4 ++-- include/form_input.php | 11 ++++++++--- include/user_common.php | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/constant.php b/include/constant.php index 72e5a38ec..85ca84e13 100644 --- a/include/constant.php +++ b/include/constant.php @@ -253,12 +253,12 @@ function SetIt(p_value,p_ctl) { // One line calculator define ("JS_CALC_LINE"," -
+ Answer:
- +
diff --git a/include/form_input.php b/include/form_input.php index e3016d6b1..d4da11ea6 100644 --- a/include/form_input.php +++ b/include/form_input.php @@ -343,6 +343,7 @@ function FormVente($p_cn,$p_jrn,$p_user,$p_array=null,$view_only=true,$p_article $r.=""; $r.="
"; + $r.=JS_CALC_LINE; return $r; @@ -594,7 +595,7 @@ for ($o = 0;$o < $p_number; $o++) { if ( $p_doc == 'pdf' ) { // prob with pdf and the pdf pluggin // Cannot find a nice workaround for that - $r.='
'; + $r.=''; // $r.=''; $r.=$data; $r.=InputType("","HIDDEN","e_comment",$p_comment); @@ -1179,6 +1180,7 @@ function FormFin($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$view_only=true,$p if ( $view_only == true ) { $solde=GetSolde($p_cn,GetFicheAttribut($p_cn,$e_bank_account,ATTR_DEF_ACCOUNT)); $r.=" Solde = ".$solde." "; + $new_solde=$solde; } // Start the div for item to move money @@ -1235,7 +1237,7 @@ function FormFin($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$view_only=true,$p ${"e_concerned".$i}=(isset(${"e_concerned".$i}))?${"e_concerned".$i}:""; $r.=InputType("","js_concerned","e_concerned".$i,${"e_concerned".$i},$view_only); $r.=''; - if ( $view_only == true ) $solde+=$tiers_amount; + if ( $view_only == true ) $new_solde+=$tiers_amount; } $r.=""; @@ -1245,7 +1247,10 @@ $r.="
"; // if view_only is true //Put the new saldo here (old saldo - operation) -if ( $view_only==true) $r.=" Nouveau Solde = ".$solde." "; + if ( $view_only==true) { + $r.=" Ancien Solde = ".$solde."
"; + $r.=" Nouveau Solde = ".$new_solde."
"; + } return $r; diff --git a/include/user_common.php b/include/user_common.php index 0816b6d06..c05ea16bb 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -44,7 +44,7 @@ $r=pg_fetch_array($Res,0); return $r; } -/* function ComputeVat($p_cn, $a_good,$a_quant,$p_type); +/* function ComputeVat($p_cn,$a_fiche,$a_quant,$a_price,$ap_vat) ************************************************** * Purpose : Compute the vat, * the fiche.f_id are in a_fiche @@ -56,6 +56,7 @@ return $r; * - fiche id array * - quantity array * - price array + * - $ap_vat Array of tva id * gen : * - * return: array