Advance payment xml

we encountered an error (“Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129)”) while attempting to send the advance payment information in the ZATCA XML.

cac:InvoiceLine
cbc:ID2</cbc:ID>
<cbc:InvoicedQuantity unitCode=“PCE”>0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID=“SAR”>0</cbc:LineExtensionAmount>
cac:DocumentReference
cbc:IDM-1865123454-33467-0037</cbc:ID>
cbc:UUID3a95ad85-e755-4dac-1975-08dd5a3ccf52</cbc:UUID>
cbc:IssueDate2025-03-03</cbc:IssueDate>
cbc:IssueTime13:18:58</cbc:IssueTime>
cbc:DocumentTypeCode386</cbc:DocumentTypeCode>
</cac:DocumentReference>

and when change to be 1 ZATCA status returned as cleared

cac:InvoiceLine
cbc:ID2</cbc:ID>
<cbc:InvoicedQuantity unitCode=“PCE”>1</cbc:InvoicedQuantity>

please note that the invoice Quantity should remain 0, as outlined in the ZATCA document.
What is the appropriate procedure and is it acceptable to keep the quantity 1?​

Dear @M.serhan

Thanks for reaching out,

Could you please elaborate further on your statement, “the invoice quantity should remain 0”? I would appreciate understanding the reasoning behind this, please note that InvoicedQuantity tag is represent the quantity of the soled item.

Thanks,
Ibrahem Daoud.

Dear @idaoud
this invoice line for advance payment not for sold item
and as ZATCA document mention in this invoice line (Advance payment ) the Qty set 0

when sent the document to be cleared we facing an error (“Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129)”)
but when change to be 1 the document cleared

Dear @M.serhan

Thanks for your response, Can I kindly ask you to share the XML for our investigation?

Additionally, Please refer to the following path in SDK
SDK\Java\zatca-einvoicing-sdk-Java-238-R3.4.0\Data\Samples\Standard\Invoice\ Advance Payment adjustments with foreign currency invoice.xml
Ensure that your XML comply with the sample XML.

Thanks,
Ibrahem Daoud.

@idaoud
Thanks for your response.
i send the XML was rejected by Email .
M.serhan@minerets.com