From 36fa7fc941a8180515367538aff2d1d3b92d4ecb Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 2 Nov 2011 20:20:08 +0000 Subject: [PATCH] =?UTF-8?q?433:=20am=C3=A9lioration=20Compta=20Analytique?= =?UTF-8?q?=20:=20arrondi=20remaining?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/anc_script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html/js/anc_script.js b/html/js/anc_script.js index dea4e4258..8bc01c973 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -102,7 +102,12 @@ function anc_refresh_remain(p_table,p_seq) var tot_line=parseFloat(g('amount_t'+p_seq).value); var tot_table=compute_total_table(p_table,p_seq); var remain = tot_line-tot_table; + remain=Math.round(remain *100)/100; $('remain'+p_table).innerHTML=remain; + if (remain == 0) + {$('remain'+p_table).style.color="green"} + else + {$('remain'+p_table).style.color="red"} }catch (a) { alert(a.message);