From b6a3e488425b35ad9df18743c9fba58f4f902223 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2008 17:01:58 +0000 Subject: [PATCH] BUG rounded value --- html/compute.php | 2 +- include/compta_ach.inc.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/html/compute.php b/html/compute.php index c02d8b4d3..3fb6c93b2 100644 --- a/html/compute.php +++ b/html/compute.php @@ -56,7 +56,7 @@ $tva_rate->load(); $total=new Acc_Compute(); bcscale(4); -$amount=bcmul($p,$q); +$amount=round(bcmul($p,$q),2); $total->set_parameter('amount',$amount); $total->set_parameter('amount_vat_rate',$tva_rate->get_parameter('rate')); $total->compute_vat(); diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index c04566bc7..62e2768ad 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -146,6 +146,7 @@ if ( $def==1 || $def == 4 ) { } // ------------------------------ /* Display a blank form or a form with predef operation */ + /* or a form for correcting */ // ------------------------------ echo '
'; @@ -183,9 +184,10 @@ if ( $def==1 || $def == 4 ) { echo ''; } else { + echo $Ledger->display_form($array); echo widget::hidden("p_action","ach"); echo widget::hidden("sa","p"); - echo $Ledger->display_form($array); + echo '';