Document Level Allowance for multiple tax categories

I am encountering an issue with an invoice that includes various tax rates and categories, as well as a document-level allowance. Despite including a detailed VAT breakdown and ensuring the accuracy of the figures, the invoice is being rejected by ZATCA.
the response returns as below:

Errors

  • category : BR_ERROR
  • **code :**BR-CO-15
  • message : Invoice total amount with VAT (BT-112)

Warnings

  • category : BR_WARNING

  • **code :**BR-CO-16

  • message : Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Pre-Paid amount (BT-113) + Rounding amount (BT-114).

  • category : BR_WARNING

  • **code :**BR-CO-13

  • message : Invoice total amount without VAT (BT-109) = S Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).

  • category : BR_WARNING

  • **code :**BR-S-08

  • message : For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is “Standard Rated”, the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are “Standard Rate“. and the VAT rates (BT-152,BT-96,BT-103) equal the VAT category rate (BT-119)

  • category : BR_WARNING

  • **code :**BR-E-08

  • message : In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ’ Exempt from VAT’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are ‘Exempt from VAT’.

Dear @Lina-alrehaili1 , @idaoud , @Malik , @Ankit_Tiwari , @eCloud
need your help because we are facing same issue when we applied allowance and charges at document level .
can u please provide the examples with calculation containing all the scenerios like with standard vat and exmept

Morning @omar.ashraf @zahid

Thanks for reaching out,

Please find the below post for BR-S-08, I hope the post clarification will make it easier for you to fix the related warning

However, regarding the others error Kindly not that sharing your XML will be helpful for our investigation and providing comprehensive answer for you concerns based on your XML case.

Additionally, please note that if you receiving 200 response from ZATCA APIs this means that your invoice has been accepted, 202 this means that your invoice has been accepted with warning, you need to fix the warning in the further invoice to avoid the violations and fines.

For any further support, do not hesitate to reach out our support team via the below mail.

SP mail: sp_support@zatca.gov.sa

Thanks,
Ibrahem Daoud.

Dear @zahid

It is impossible to answer your question without seeing the Xml you created.

Share your xml, you can remove the supplier and customer sections if they are considered confidential. It would be better if you also include the invoice view generated by your erp.

Dear @eCloud , @Ankit_Tiwari , @idaoud , @Lina-alrehaili1

here is the generated xml section :

cac:AllowanceCharge
cbc:ChargeIndicatortrue</cbc:ChargeIndicator>
cbc:AllowanceChargeReasonCode95</cbc:AllowanceChargeReasonCode>
cbc:AllowanceChargeReasondiscount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID=“SAR”>100</cbc:Amount>
cac:TaxCategory
cbc:IDS</cbc:ID>
cbc:Percent15</cbc:Percent>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
cac:TaxTotal
<cbc:TaxAmount currencyID=“SAR”>43985.84</cbc:TaxAmount>
</cac:TaxTotal>
cac:TaxTotal
<cbc:TaxAmount currencyID=“SAR”>43985.84</cbc:TaxAmount>
cac:TaxSubtotal
<cbc:TaxableAmount currencyID=“SAR”>293572.29</cbc:TaxableAmount>
<cbc:TaxAmount currencyID=“SAR”>44035.84</cbc:TaxAmount>
cac:TaxCategory
cbc:IDS</cbc:ID>
cbc:Percent15.00</cbc:Percent>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
cac:TaxSubtotal
<cbc:TaxableAmount currencyID=“SAR”>293572.29</cbc:TaxableAmount>
<cbc:TaxAmount currencyID=“SAR”>0.00</cbc:TaxAmount>
cac:TaxCategory
cbc:IDE</cbc:ID>
cbc:Percent0</cbc:Percent>
cbc:TaxExemptionReasonCodeVATEX-SA-29-7</cbc:TaxExemptionReasonCode>
cbc:TaxExemptionReasonLife insurance services mentioned in Article 29 of the VAT Regulations</cbc:TaxExemptionReason>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
cac:LegalMonetaryTotal
<cbc:LineExtensionAmount currencyID=“SAR”>391429.72</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID=“SAR”>391429.72</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID=“SAR”>435465.56</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID=“SAR”>100</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID=“SAR”>0</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID=“SAR”>435465.56</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
cac:InvoiceLine
cbc:ID1251</cbc:ID>
<cbc:InvoicedQuantity unitCode=“PCE”>3.00</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID=“SAR”>293572.29</cbc:LineExtensionAmount>
cac:TaxTotal
<cbc:TaxAmount currencyID=“SAR”>44035.84</cbc:TaxAmount>
<cbc:RoundingAmount currencyID=“SAR”>337608.13</cbc:RoundingAmount>
</cac:TaxTotal>
cac:Item
cbc:NameMulti-Disciplinary Consultant for NEOM Lake Detailed Engineering services-overall project management, kickoff meeting &Project start progress Stat. 1A</cbc:Name>
cac:ClassifiedTaxCategory
cbc:IDS</cbc:ID>
cbc:Percent15.00</cbc:Percent>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
cac:Price
<cbc:PriceAmount currencyID=“SAR”>97857.43</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
cac:InvoiceLine
cbc:ID1174</cbc:ID>
<cbc:InvoicedQuantity unitCode=“PCE”>1.00</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID=“SAR”>97857.43</cbc:LineExtensionAmount>
cac:TaxTotal
<cbc:TaxAmount currencyID=“SAR”>0.00</cbc:TaxAmount>
<cbc:RoundingAmount currencyID=“SAR”>97857.43</cbc:RoundingAmount>
</cac:TaxTotal>
cac:Item
cbc:NameDesign Consultancy Services for NIC Site-Wide Infrastructure as per Progress Statement 001</cbc:Name>
cac:ClassifiedTaxCategory
cbc:IDE</cbc:ID>
cbc:Percent0</cbc:Percent>
cac:TaxScheme
cbc:IDVAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
cac:Price
<cbc:PriceAmount currencyID=“SAR”>97857.43</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>

Dear @zahid

Thanks for reaching out,

Can I kindly ask you to share the XML via the below mail?

SP mail: sp_support@zatca.gov.sa

Additionally, please share here the email you will sent from.

Thanks,
Ibrahem Daoud.

Dear @zahid

I asume, your Document level AllowanceCharge is Discount,

Xml should be like this

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2">
	<cbc:ProfileID>reporting:1.0</cbc:ProfileID>
	<cbc:ID>SME00010</cbc:ID>
	<cbc:UUID>8e6000cf-1a98-4174-b3e7-b5d5954bc10d</cbc:UUID>
	<cbc:IssueDate>2022-08-17</cbc:IssueDate>
	<cbc:IssueTime>17:41:08</cbc:IssueTime>
	<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>
	<cbc:Note languageID="ar">ABC</cbc:Note>
	<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
	<cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
	<cac:AdditionalDocumentReference>
		<cbc:ID>ICV</cbc:ID>
		<cbc:UUID>10</cbc:UUID>
	</cac:AdditionalDocumentReference>
	<cac:AdditionalDocumentReference>
		<cbc:ID>PIH</cbc:ID>
		<cac:Attachment>
			<cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ==</cbc:EmbeddedDocumentBinaryObject>
		</cac:Attachment>
	</cac:AdditionalDocumentReference>
	<cac:AccountingSupplierParty>
		<cac:Party>
			<cac:PartyIdentification>
				<cbc:ID schemeID="CRN">1010010000</cbc:ID>
			</cac:PartyIdentification>
			<cac:PostalAddress>
				<cbc:StreetName>الامير سلطان | Prince Sultan</cbc:StreetName>
				<cbc:BuildingNumber>2322</cbc:BuildingNumber>
				<cbc:CitySubdivisionName>المربع | Al-Murabba</cbc:CitySubdivisionName>
				<cbc:CityName>الرياض | Riyadh</cbc:CityName>
				<cbc:PostalZone>23333</cbc:PostalZone>
				<cac:Country>
					<cbc:IdentificationCode>SA</cbc:IdentificationCode>
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyTaxScheme>
				<cbc:CompanyID>399999999900003</cbc:CompanyID>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:PartyTaxScheme>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>شركة توريد التكنولوجيا بأقصى سرعة المحدودة | Maximum Speed Tech Supply LTD</cbc:RegistrationName>
			</cac:PartyLegalEntity>
		</cac:Party>
	</cac:AccountingSupplierParty>
	<cac:AccountingCustomerParty>
		<cac:Party>
			<cac:PostalAddress>
				<cbc:StreetName>صلاح الدين | Salah Al-Din</cbc:StreetName>
				<cbc:BuildingNumber>1111</cbc:BuildingNumber>
				<cbc:CitySubdivisionName>المروج | Al-Murooj</cbc:CitySubdivisionName>
				<cbc:CityName>الرياض | Riyadh</cbc:CityName>
				<cbc:PostalZone>12222</cbc:PostalZone>
				<cac:Country>
					<cbc:IdentificationCode>SA</cbc:IdentificationCode>
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyTaxScheme>
				<cbc:CompanyID>399999999800003</cbc:CompanyID>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:PartyTaxScheme>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>شركة نماذج فاتورة المحدودة | Fatoora Samples LTD</cbc:RegistrationName>
			</cac:PartyLegalEntity>
		</cac:Party>
	</cac:AccountingCustomerParty>
	<cac:Delivery>
        <cbc:ActualDeliveryDate>2022-08-17</cbc:ActualDeliveryDate>
    </cac:Delivery>
	<cac:PaymentMeans>
		<cbc:PaymentMeansCode>10</cbc:PaymentMeansCode>
	</cac:PaymentMeans>
	<cac:AllowanceCharge>
		<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
		<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
		<cbc:AllowanceChargeReason>discount</cbc:AllowanceChargeReason>
		<cbc:Amount currencyID="SAR">100</cbc:Amount>
		<cac:TaxCategory>
			<cbc:ID>S</cbc:ID>
			<cbc:Percent>15</cbc:Percent>
			<cac:TaxScheme>
				<cbc:ID>VAT</cbc:ID>
			</cac:TaxScheme>
		</cac:TaxCategory>
	</cac:AllowanceCharge>
	<cac:TaxTotal>
		<cbc:TaxAmount currencyID="SAR">44020.84</cbc:TaxAmount>
	</cac:TaxTotal>
	<cac:TaxTotal>
		<cbc:TaxAmount currencyID="SAR">44020.84</cbc:TaxAmount>
		<cac:TaxSubtotal>
			<cbc:TaxableAmount currencyID="SAR">293472.29</cbc:TaxableAmount>
			<cbc:TaxAmount currencyID="SAR">44020.84</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:TaxSubtotal>
			<cbc:TaxableAmount currencyID="SAR">97857.43</cbc:TaxableAmount>
			<cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>
			<cac:TaxCategory>
				<cbc:ID>E</cbc:ID>
				<cbc:Percent>0</cbc:Percent>
				<cbc:TaxExemptionReasonCode>VATEX-SA-29-7</cbc:TaxExemptionReasonCode>
				<cbc:TaxExemptionReason>Life insurance</cbc:TaxExemptionReason>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
	</cac:TaxTotal>
	<cac:LegalMonetaryTotal>
		<cbc:LineExtensionAmount currencyID="SAR">391429.72</cbc:LineExtensionAmount>
		<cbc:TaxExclusiveAmount currencyID="SAR">391329.72</cbc:TaxExclusiveAmount>
		<cbc:TaxInclusiveAmount currencyID="SAR">435350.56</cbc:TaxInclusiveAmount>
		<cbc:AllowanceTotalAmount currencyID="SAR">100</cbc:AllowanceTotalAmount>
		<cbc:PrepaidAmount currencyID="SAR">0</cbc:PrepaidAmount>
		<cbc:PayableAmount currencyID="SAR">435350.56</cbc:PayableAmount>
	</cac:LegalMonetaryTotal>
	<cac:InvoiceLine>
		<cbc:ID>1251</cbc:ID>
		<cbc:InvoicedQuantity unitCode="PCE">3.00</cbc:InvoicedQuantity>
		<cbc:LineExtensionAmount currencyID="SAR">293572.29</cbc:LineExtensionAmount>
		<cac:TaxTotal>
			<cbc:TaxAmount currencyID="SAR">44035.84</cbc:TaxAmount>
			<cbc:RoundingAmount currencyID="SAR">337608.13</cbc:RoundingAmount>
		</cac:TaxTotal>
		<cac:Item>
			<cbc:Name>Multi-Disciplinary Services</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">97857.43</cbc:PriceAmount>
		</cac:Price>
	</cac:InvoiceLine>
	<cac:InvoiceLine>
		<cbc:ID>1174</cbc:ID>
		<cbc:InvoicedQuantity unitCode="PCE">1.00</cbc:InvoicedQuantity>
		<cbc:LineExtensionAmount currencyID="SAR">97857.43</cbc:LineExtensionAmount>
		<cac:TaxTotal>
			<cbc:TaxAmount currencyID="SAR">0.00</cbc:TaxAmount>
			<cbc:RoundingAmount currencyID="SAR">97857.43</cbc:RoundingAmount>
		</cac:TaxTotal>
		<cac:Item>
			<cbc:Name>Design Consultancy Services</cbc:Name>
			<cac:ClassifiedTaxCategory>
				<cbc:ID>E</cbc:ID>
				<cbc:Percent>0</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory>
		</cac:Item>
		<cac:Price>
			<cbc:PriceAmount currencyID="SAR">97857.43</cbc:PriceAmount>
		</cac:Price>
	</cac:InvoiceLine>
</Invoice>

Validation Result

Hope this help.

Dear @idaoud ,
From : zahid.ali@cloudpital.com.pk

subject : Assistance Required for Document Level Allowance & Charges with Multiple Tax Categories

Dear @eCloud,

Our document-level allowances and charges include discounts, shipping charges, and partial pre-payments.

Thank you for your response. However, I am a bit confused about the tax subtotal section. Could you please clarify why it is applied only to the first line item? What happens if both VAT rates are standard?

Additionally, could you please provide the Excel formula for calculating this?

Dear Team , @Lina-alrehaili1 , @idaoud , @eCloud , @Malik , @Ankit_Tiwari
please consider my request , our team is still waiting for response .
thanks
Zahid Ali

Dear @zahid

I just fix the xml as you share.

For more complex ones you need to share the invoice view from your erp to convert to xml.

How to calculate in xml you can read it in the guide provided by zatca, and see the invoice reference included in the SDK. And of course try all possible transactions that can be generated by your erp.

From what I understand:

  • TaxTotal is the sum of all TaxAmount values at both the Line Level and the Document Level.
  • TaxSubtotal Tax is the sum of TaxAmount values at the Line Level and Document Level, but it is grouped by TaxCategory ID and Percent.

This is just my understanding based on some cases I’ve tried. You might get a more accurate explanation from a moderator. :blush: