From 3d90c5e0490e85d109c736d0c5241c81733a72f6 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 18 May 2016 09:47:38 +0200 Subject: [PATCH] Fix problem with orphan_lob_clean instead of clean_orphan_lob and fix problem when checking analytic when amount == 0 --- html/js/anc_script.js | 6 +++++- include/modele.inc.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/html/js/anc_script.js b/html/js/anc_script.js index 83ca95dea..7d4491fe7 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -158,7 +158,11 @@ function verify_ca(div) total_amount += parseFloat(array_value[i].value); } var amount = Math.abs(parseFloat(g('amount_t' + idx).value)); - amount = Math.round(amount*100)/100; + if (isNaN(amount)) { + amount=0; + } else { + amount = Math.round(amount*100)/100; + } var diff = amount - total_amount; if (Math.round(diff, 2) != 0.0) diff --git a/include/modele.inc.php b/include/modele.inc.php index b472cad8d..7c5f6da9f 100644 --- a/include/modele.inc.php +++ b/include/modele.inc.php @@ -234,7 +234,7 @@ if (isset($_POST["FMOD_NAME"])) } } // Clean orphan log - $cn_mod->orphan_lob_clean(); + $cn_mod->clean_orphan_lob(); } // Show all available templates