X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=js%2Ft%2Fkivi%2Fparse_amount.js;h=8df776736021e15db7fcb0da076dd54a540dc617;hb=11aeaa07186197c61dfe610d2a5c981754fd2e9d;hp=9b7d2aa074e498e96be44d98c8fd278b1d4edeb8;hpb=3ad2bb35a5e16e2c4937ef03c0bd303924f3c485;p=kivitendo-erp.git diff --git a/js/t/kivi/parse_amount.js b/js/t/kivi/parse_amount.js index 9b7d2aa07..8df776736 100644 --- a/js/t/kivi/parse_amount.js +++ b/js/t/kivi/parse_amount.js @@ -109,3 +109,15 @@ QUnit.test("kivi.parse_amount function numbers with leading 0 should still be pa assert.equal(kivi.parse_amount('0123456789'), 123456789, '0123456789'); assert.equal(kivi.parse_amount('000123456789'), 123456789, '000123456789'); }); + +QUnit.test("kivi.parse_amount function German number style with thousand separator & contains invalid characters", function( assert ) { + kivi.setup_formats({ numbers: '1.000,00' }); + + assert.equal(kivi.parse_amount('iuh !@#$% 10,00'), undefined, 'iuh !@#$% 10,00'); +}); + +QUnit.test("kivi.parse_amount function German number style with thousand separator & invalid math expression", function( assert ) { + kivi.setup_formats({ numbers: '1.000,00' }); + + assert.equal(kivi.parse_amount('54--42'), undefined, '54--42'); +});