From 37b7df0f3a3f63cc162f05e081c6a333863452f3 Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Thu, 16 Apr 2020 20:37:33 +0200 Subject: [PATCH] #338 - Fixed: empty amount leads to error --- src/main/resources/static/js/transactions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/resources/static/js/transactions.js b/src/main/resources/static/js/transactions.js index 0fd73a8e9..04e6ee14b 100644 --- a/src/main/resources/static/js/transactions.js +++ b/src/main/resources/static/js/transactions.js @@ -249,8 +249,7 @@ function validateAmount(text, allowEmpty=false) if(allowEmpty && text.length === 0) { removeTooltip(id); - let amount = parseFloat(text.replace(",", ".")) * 100; - document.getElementById("hidden-" + id).value = amount.toFixed(0); + document.getElementById("hidden-" + id).value = 0; return true; } -- GitLab