Auftrags-Controller: Menge vor Preisquellenermittlung auf 1, wenn ungesetzt
[kivitendo-erp.git] / js / t / kivi / parse_amount.js
index 9b7d2aa..8df7767 100644 (file)
@@ -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');
+});