@davoodmehraban89 / Factor-easy / commits / 66bb21a
Fork 0

سامانه صدور فاکتور و حسابداری

fix(stage3 audit): reject zero-net sale/purchase before declaring server-v1 compatibility

davoodmehraban89 committed Oct 23, 2026 at 11:17 UTC 66bb21af0487b9ef6b93ef806d910d95ce10efe2
1 file changed +1 -1
scripts/stage3-legacy-source-audit.mjs
+1 -1
@@ -57,7 +57,7 @@ const summarize=(rows)=>{
57 d.vatType==='percent'?Math.round(net*d.vatRate/100):d.vatRate;
58 if(!Number.isSafeInteger(subtotal)||!validLines||
59 subtotal<=0||d.subtotal!==subtotal||
60 - d.discount!==expectedDiscount||expectedDiscount>subtotal||
60 + d.discount!==expectedDiscount||expectedDiscount>subtotal||net<=0||
61 (d.discountType==='percent'&&d.discountInput>100)||
62 (d.vatType==='percent'&&d.vatRate>100)||
63 (row.collection==='invoices'&&d.kind==='non_formal'&&d.vat!==0)||