fuadhasni / zatca-xml-js

An implementation of Saudi Arabia ZATCA's E-Invoicing requirements, processes, and standards in TypeScript.
MIT License
7 stars 5 forks source link

Validation Results warning if discounts item #2

Open workshop01 opened 1 year ago

workshop01 commented 1 year ago

When I'm tesing egs.checkInvoiceCompliance(signed_invoice_string, invoice_hash) ; I got this warning message but if I remove discounts from my line item it's fine

"Invoice line net amount (BT-131) must equal (Invoiced quantity (BT-129) * (Item net price (BT-146) / item price base quantity (BT-149))) + Sum of invoice line charge amount (BT-141) - Sum of invoice line allowance amount (BT-136)"

I've checked the xml and the result same to be correct

fuadhasni commented 1 year ago

Just make sure you don't have an empty line item array of an empty discounts array.