فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test: fix reorder threshold view contract and verify decimal VAT opt-in
davoodmehraban89 committed
Oct 31, 2026 at 18:16 UTC
62e0b8f3ccb5fb0bdaff72149d9737401b2b02a2
1 file changed
+3
-1
tests/number-input-fractions.test.mjs
+3
-1
@@ -82,10 +82,12 @@ test('native fractional step and large number input stay intact', () => {
82
test('invoice quantity, reorder threshold and stocktake adjustment opt in to three decimals', () => {
83
for (const [path, name] of [
84
['src/views/InvoiceFormView.js', 'item.qty'],
85
- ['src/views/ProductsView.js', 'data.minStock'],
85
+ ['src/views/ProductsView.js', 'data.minStock || 0'],
86
['src/views/StockKardexModal.js', 'currentStock']
87
]) {
88
const src = readFileSync(new URL('../' + path, import.meta.url), 'utf8');
89
assert.ok(src.includes('data-decimals="3" value="${NumberInput.format(' + name + ', 3)}"'), path);
90
}
91
+ const invoice = readFileSync(new URL('../src/views/InvoiceFormView.js', import.meta.url), 'utf8');
92
+ assert.ok(invoice.includes('data-decimals="2" value="${NumberInput.format(d.vatRate || 10, 2)}"'), 'VAT fractional input');
93
});