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

Hey can you share the solution for this issue with me to.
As facing it at my end to.

@idaoud @M.serhan

@mhaba @M.serhan thank you for highlighting this, it appears to be a bug returning a warning BR-22 when the value is precisely “0”. There is no warning when the value is “0.00”. It is unexpected behavior, this will be fixed going forward. For now, could you please use “0.00” in the value instead of “0”.

Noted. Thanks for your prompt response.