BR-KSA-73: Prepaid amount (BT-113) requires full prepayment reference on lines

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Warning: accepted with a warningConditional, see belowFields: BT-113, KSA-26, BT-1, KSA-28, BT-2, KSA-29, KSA-25, KSA-30, BT-3

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

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