Overview
Saudi e-invoicing accepts monetary amounts with at most two decimals, but a currency configured with more decimals makes the generated XML fail validation. This module patches the ZATCA UBL export in the Saudi e-invoicing localization so amounts are rounded only inside the XML. Accountants keep their higher internal precision in the database and journal entries. It is used by companies issuing e-invoices in Saudi Arabia.
Usage steps
- 1
Install on top of the Saudi e-invoicing localization
The administrator installs this module on a database where the Saudi e-invoicing localization is already configured. It adds no menu, view or field. It inherits the ZATCA UBL 2.1 XML builder in the background. Existing invoices and settings are not modified.
- Requires the Saudi e-invoicing localization
- No new menu or field
- Existing invoices untouched
- 2
Generate the ZATCA invoice XML as usual
The user posts an invoice and generates or sends it through the normal ZATCA flow. The module intervenes only while the XML is built. It applies to currencies configured above two decimals, and leaves 0, 1 and 2 decimal currencies on the standard path. No new button is needed.
- Post the invoice
- Use the standard ZATCA send action
- Only currencies above 2 decimals are affected
- 3
Amounts rounded to two decimals in the XML only
A transient currency object with two decimals is used while building the XML, so line, tax and total amounts are rounded to 0.01. The real currency record is never written to. The database precision of prices and journal items stays unchanged. Rounding uses standard float rounding helpers.
- Line, tax and total amounts rounded to 0.01
- Currency record not modified
- Database precision preserved
- 4
Tax reported equals tax booked
The module reads the posted tax journal items and passes them to the standard tax-detail rounding, so the VAT declared in the XML matches the journal entry, including any amount an accountant adjusted by hand. This keeps the VAT return consistent with what was sent to the authority. The accountant reviews the invoice as usual.
- Posted tax lines feed the XML
- Manual tax adjustments are honoured
- VAT return stays consistent
Screens
Illustrative mockups with placeholder data.
Roles
| Role |
|---|
| Accountants |
| Billing users |
Dependencies
Want to know more or try this app? Contact us
We can arrange a demo or a trial and answer your questions about ZATCA Decimal Fix.
