Announcing the launch of the Saudi Zatca-2 E-Invoicing app on FrappeCloud

Forgot to mention that I have 6 different “Item Tax Templates”. Not sure if that would help…

while validating Simplified Invoice I am getting below message

Error in compliance: {“validationResults”:{“infoMessages”:,“warningMessages”:,“errorMessages”:[{“type”:“ERROR”,“code”:“XSD_ZATCA_INVALID”,“category”:“XSD validation”,“message”:“Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 84; columnNumber: 183; cvc-datatype-valid.1.2.1: ‘{"data": [{"company": "SAC", "pih": "hwzPEK0wSvY1Zu/K9UlKqHA4tLykFZAxKdL4mAeBhJ8="}]}’ is not a valid value for ‘base64Binary’.”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}

I am getting following error for item line.when I checked XML I found out difference
<cbc:BaseAmount currencyID=“SAR”>0.0</cbc:BaseAmount> instead of 0 this must be item price.
What changes I need to make to avoid such error

{“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Complied with UBL 2.1 standards in line with ZATCA specifications”,“status”:“PASS”}],“warningMessages”:[{“type”:“WARNING”,“code”:“BR-KSA-37”,“category”:“KSA”,“message”:“The seller address building number must contain 4 digits.”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“BR-KSA-EN16931-07”,“category”:“KSA”,“message”:“[BR-KSA-EN16931-07]-Item net price (BT-146) must equal (Item Gross price (BT-148) - Allowance amount (BT-147)) when gross price is provided.”,“status”:“ERROR”}],“status”:“ERROR”},“clearanceStatus”:“NOT_CLEARED”,“clearedInvoice”:null}

1- he seller address building number must contain 4 digits. - On your company address. On address line-2 , you give 4 digit building number. this warning will go.
2-You can not give discount on gross-total. You can give discount on net-total only. The reason is gross-amount calculated after tax.

There is no discount in the invoice.we just entered the rate and tax.following are the excerpts from the XML file.

cac:Delivery

cbc:ActualDeliveryDate2024-10-20</cbc:ActualDeliveryDate>

</cac:Delivery>

cac:PaymentMeans

cbc:PaymentMeansCode30</cbc:PaymentMeansCode>

</cac:PaymentMeans>

cac:AllowanceCharge

cbc:ChargeIndicatorfalse</cbc:ChargeIndicator>

cbc:AllowanceChargeReasonDiscount</cbc:AllowanceChargeReason>

<cbc:Amount currencyID=“SAR”>0.00</cbc:Amount>

cac:TaxCategory

cbc:IDS</cbc:ID>

cbc:Percent15.00</cbc:Percent>

cac:TaxScheme

cbc:IDVAT</cbc:ID>

</cac:TaxScheme>

</cac:TaxCategory>

</cac:AllowanceCharge>

cac:TaxTotal

<cbc:TaxAmount currencyID=“SAR”>0.15</cbc:TaxAmount>

</cac:TaxTotal>

cac:TaxTotal

<cbc:TaxAmount currencyID=“SAR”>0.15</cbc:TaxAmount>

cac:TaxSubtotal

<cbc:TaxableAmount currencyID=“SAR”>1.0</cbc:TaxableAmount>

<cbc:TaxAmount currencyID=“SAR”>0.15</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:TaxTotal>

cac:LegalMonetaryTotal

<cbc:LineExtensionAmount currencyID=“SAR”>1.0</cbc:LineExtensionAmount>

<cbc:TaxExclusiveAmount currencyID=“SAR”>1.0</cbc:TaxExclusiveAmount>

<cbc:TaxInclusiveAmount currencyID=“SAR”>1.15</cbc:TaxInclusiveAmount>

<cbc:AllowanceTotalAmount currencyID=“SAR”>0.0</cbc:AllowanceTotalAmount>

<cbc:PayableAmount currencyID=“SAR”>1.15</cbc:PayableAmount>

</cac:LegalMonetaryTotal>

cac:InvoiceLine

cbc:ID1</cbc:ID>

<cbc:InvoicedQuantity unitCode=“PCS”>1.0</cbc:InvoicedQuantity>

<cbc:LineExtensionAmount currencyID=“SAR”>1.0</cbc:LineExtensionAmount>

cac:TaxTotal

<cbc:TaxAmount currencyID=“SAR”>0.15</cbc:TaxAmount>

<cbc:RoundingAmount currencyID=“SAR”>1.15</cbc:RoundingAmount>

</cac:TaxTotal>

cac:Item

cbc:NamePS5 CONSOLE SLIM DIGITAL</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”>1.000000</cbc:PriceAmount>

<cbc:BaseQuantity unitCode=“PCS”>1</cbc:BaseQuantity>

cac:AllowanceCharge

cbc:ChargeIndicatorfalse</cbc:ChargeIndicator>

cbc:AllowanceChargeReasondiscount</cbc:AllowanceChargeReason>

<cbc:Amount currencyID=“SAR”>0.0</cbc:Amount>

<cbc:BaseAmount currencyID=“SAR”>0.0</cbc:BaseAmount>

</cac:AllowanceCharge>

</cac:Price>

</cac:InvoiceLine>

Share the xml and invoice print-out to our email support@erpgulf.com

1 Like

Please help me getting warning every time.

after pulling the latest updates the issues resolved.Thanks

Today we made an update . Pull the latest , if still shows the error , send xml and inv

Suadi phase-2 e-invoicing update

for Heathcare and education -
Zero rated invoices for saudi citizens,
Catetory -zero rated Reason code - VATEX-SA-HEA
they have to provide National ID number of the patient.

Pls pull & migrate - added fields for that in customer dt.

same applicable for education.
Zero rated - Z
reason code - VATEX-SA-EDU

Use the same fields above while making invoices.

I pulled latest update but can not submit to ZATCA.I tried sending it again through "ZATACA Phase-2 " button but no response.

Please make sure that you ticked "Zatca invoice enabled " and select "phase-2 " . Screenshot attachd.

yes it is enabled as per the screenshot provided.received error “Error in clearance API: (1054, “Unknown column ‘custom_ksa_einvoicing_xml’ in ‘field list’”)”

Some fields not created in your instance
Please do bench migrate , it will solve this issue.

New dashboard

I bench migrate but error remains still same.even after that I have pulled latest update as well.

what is the error ? send details.

We were missing this filed ( custom_ksa_einvoicing_xml ) on fixture. Now pushed . You can pull and migragte

Thank you very much. Now invoices are submitted.

New features added for inclusive tax. Now you can post invoices with tax included on the line