BR-KSA-73: Prepaid amount (BT-113) requires full prepayment reference on lines
When cac:LegalMonetaryTotal/cbc:PrepaidAmount (BT-113) is greater than 0, at least one cac:InvoiceLine must carry a cac:DocumentReference, and every line cac:DocumentReference must contain cbc:ID (KSA-26), cbc:IssueDate (KSA-28), cbc:IssueTime (KSA-29) and cbc:DocumentTypeCode (KSA-30). The value '386' named in the official text is checked separately by BR-KSA-74.
How to fix it
On the prepayment adjustment line add <cac:DocumentReference><cbc:ID>…</cbc:ID><cbc:IssueDate>…</cbc:IssueDate><cbc:IssueTime>…</cbc:IssueTime><cbc:DocumentTypeCode>386</cbc:DocumentTypeCode></cac:DocumentReference> with the prepayment invoice's number, date and time.
ZATCA's official text
[BR-KSA-73]-If Pre-Paid amount (BT-113) is provided, then the following data is mandatory to provide as additional invoice line(s) -Prepayment ID (KSA-26) -Sequential invoice number (BT-1) of the prepayment invoice(s)-Prepayment Issue Date (KSA-28) -Issue date (BT-2) of the prepayment invoice(s) Prepayment Issue Time (KSA-29) - Issue time (KSA-25) of the prepayment invoice(s) Prepayment Document Type Code (KSA-30)- Invoice type code (BT-3) must be 386.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(exists(./cbc:ID) and exists(./cbc:IssueDate) and exists(./cbc:IssueTime) and exists(./cbc:DocumentTypeCode) )
Related rules
- BR-02 · Every invoice needs an invoice number (BT-1)
- BR-03 · Every invoice needs an issue date (BT-2)
- BR-04 · Every invoice needs an invoice type code (BT-3)
- BR-CO-16 · Amount due = total with VAT - prepaid amount + rounding amount
- BR-KSA-04 · Issue date must not be in the future
- BR-KSA-05 · Invoice type code must be 388, 383, 381 or 386
Validate your invoice against ZATCA's rules
Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.
Validate an invoice or try Matheel