kivi.js: parse_amount darf "00" nicht ablehnen.
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 13 Oct 2017 13:20:56 +0000 (15:20 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 13 Oct 2017 13:45:45 +0000 (15:45 +0200)
js/kivi.js

index 4215a2e..ca9c1cb 100644 (file)
@@ -103,7 +103,7 @@ namespace("kivi", function(ns) {
     if (!amount.match(/^[0-9 ()\-+*/.]*$/))
       return 0;
 
-    amount = amount.replace(/^0+/, '');
+    amount = amount.replace(/^0+(\d+)/, '$1');
 
     /* jshint -W061 */
     try {