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