From 72cd601fb1adcb393e0d10a8a2f4058de942b2c3 Mon Sep 17 00:00:00 2001 From: Vincent Danjean Date: Thu, 24 Jul 2014 00:25:12 +0200 Subject: [PATCH] =?UTF-8?q?Fixe=20la=20pr=C3=A9cision=20des=20calculs=20da?= =?UTF-8?q?ns=20le=20grand=20livre=20analytique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La précision n'était pas toujours fixée. En rechargeant la page du grand livre analytique, les totaux étaient parfois systématiquement entier, parfois avec deux décimales. Je n'ai pas compris/trouvé d'où venait le bcscale(2) quand ça marche. Maintenant, il est là en permanence. --- include/class_anc_grandlivre.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/class_anc_grandlivre.php b/include/class_anc_grandlivre.php index e37525d06..ba2e478b5 100644 --- a/include/class_anc_grandlivre.php +++ b/include/class_anc_grandlivre.php @@ -169,6 +169,7 @@ class Anc_GrandLivre extends Anc_Print $idx = 0; $tot_deb = $tot_cred = 0; + bcscale(2); foreach ($array as $row) { if ($prev != $row['po_name']) @@ -305,4 +306,4 @@ class Anc_GrandLivre extends Anc_Print $aheader[]=array("title"=>'Credit','type'=>'num'); Impress::array_to_csv($array, $aheader); } -} \ No newline at end of file +}