From 65ae53ad86f50edd84b7703c6c391b68c31bbfd7 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 4 Sep 2005 16:08:07 +0000 Subject: [PATCH] In some situations, the rounded amount in jrn was wrong --- include/form_input.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/form_input.php b/include/form_input.php index 7acac1608..3ee1d8cf3 100644 --- a/include/form_input.php +++ b/include/form_input.php @@ -765,7 +765,6 @@ function RecordInvoice($p_cn,$p_array,$p_user,$p_jrn) * gen : * - * return: string with the form - * TODO Add in parameters the infos about the company for making the invoice */ function FormAch($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$pview_only=true,$p_article=3,$saved=false) { @@ -1122,7 +1121,7 @@ function RecordAchat($p_cn,$p_array,$p_user,$p_jrn) echo_debug(__FILE__,__LINE__,"echeance = $e_ech"); echo_debug(__FILE__,__LINE__,"comment = $e_comment"); if ( ($amount+$sum_vat) != 0 ){ - if ( InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,$e_comment,$amount+$sum_vat,$seq,$periode) == false ) { + if ( InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,$e_comment,round($amount+$sum_vat,2),$seq,$periode) == false ) { $Rollback($p_cn);exit("error __FILE__ __LINE__"); } // Set Internal code and Comment