In our ERP system, we do not issue separate invoices for prepayments. Instead, customers make advance payments, and we record the prepayment amount directly during invoice generation in the frontend. The prepayment is subtracted from the total amount to calculate the net payable amount.
For example, consider the calculation shown below:
- Invoice Details:
- Description: “Laptop”
- Quantity: 2
- Unit Price: 500
- Amount (Excl. VAT): 1000
- VAT @ 15%: 150
- Amount (Incl. VAT): 1150
- Prepayment Handling:
- Total Amount: 1000.00
- Discount: 50.00
- Total Before VAT: 950.00
- VAT Amount: 142.50
- Amount with VAT: 1092.50
- Advance Amount: 100.00
- Net Amount Payable: 992.50
My Understanding and Approach:
From my research, it seems I need to structure the XML as follows for the prepayment:
Invoice Line for Prepaid Amount:
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">0.000000</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">0.00</cbc:LineExtensionAmount>
<cac:DocumentReference>
<cbc:ID>46531</cbc:ID>
<cbc:UUID>a79760f7-2f48-4da9-85a5-40459a147c80</cbc:UUID>
<cbc:IssueDate>2022-08-15</cbc:IssueDate>
<cbc:IssueTime>12:28:17</cbc:IssueTime>
<cbc:DocumentTypeCode>386</cbc:DocumentTypeCode>
</cac:DocumentReference>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">0</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">0</cbc:RoundingAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">1000</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">150</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>15.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>Laptop | حاسوب محمول</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>15.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">0.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
Prepaid Amount in LegalMonetaryTotal:
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="SAR">2000</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="SAR">1900</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="SAR">2185</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="SAR">100</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID="SAR">1150</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="SAR">1035</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
My Question:
Since we do not generate separate prepayment invoices, we simply deduct the advance amount during the invoice generation. In this scenario, how should the XML structure look to comply with ZATCA regulations?
Could you confirm if the above XML structure is correct for such cases? If not, how should we handle the advance payment in the XML to ensure compliance?