lavaloon-eg / ksa_compliance

KSA Compliance App for KSA E-invoice
https://www.lavaloon.com/
GNU Affero General Public License v3.0
35 stars 25 forks source link

ERROR - "type":"ERROR","code":"BR-KSA-17","category":"KSA" #129

Closed infowaysa closed 2 weeks ago

infowaysa commented 1 month ago

Hello,

Getting these errors:

Simplified Compliance Check Result

Error Invoice Result: Invoice sent to ZATCA. Integration status: Accepted {"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":[],"errorMessages":[],"status":"PASS"},"reportingStatus":"REPORTED","clearanceStatus":null,"qrSellertStatus":null,"qrBuyertStatus":null} Credit Note Result: Invoice sent to ZATCA. Integration status: Rejected {"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":[],"errorMessages":[{"type":"ERROR","code":"BR-KSA-17","category":"KSA","message":"Debit and credit note (invoice type code (BT-3) is equal to 383 or 381) must contain the reason (KSA-10) for this invoice type issuing.","status":"ERROR"}],"status":"ERROR"},"reportingStatus":"NOT_REPORTED","clearanceStatus":null,"qrSellertStatus":null,"qrBuyertStatus":null} Debit Note Result: Invoice sent to ZATCA. Integration status: Rejected {"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":[],"errorMessages":[{"type":"ERROR","code":"BR-KSA-17","category":"KSA","message":"Debit and credit note (invoice type code (BT-3) is equal to 383 or 381) must contain the reason (KSA-10) for this invoice type issuing.","status":"ERROR"}],"status":"ERROR"},"reportingStatus":"NOT_REPORTED","clearanceStatus":null,"qrSellertStatus":null,"qrBuyertStatus":null}


Standard Compliance Check Result

Error Invoice Result: Invoice sent to ZATCA. Integration status: Accepted {"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":[],"errorMessages":[],"status":"PASS"},"reportingStatus":null,"clearanceStatus":"CLEARED","qrSellertStatus":null,"qrBuyertStatus":null} Credit Note Result: Invoice sent to ZATCA. Integration status: Rejected {"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":[],"errorMessages":[{"type":"ERROR","code":"BR-KSA-17","category":"KSA","message":"Debit and credit note (invoice type code (BT-3) is equal to 383 or 381) must contain the reason (KSA-10) for this invoice type issuing.","status":"ERROR"}],"status":"ERROR"},"reportingStatus":null,"clearanceStatus":"NOT_CLEARED","qrSellertStatus":null,"qrBuyertStatus":null} Debit Note Result: Invoice sent to ZATCA. Integration status: Rejected {"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":[],"errorMessages":[{"type":"ERROR","code":"BR-KSA-17","category":"KSA","message":"Debit and credit note (invoice type code (BT-3) is equal to 383 or 381) must contain the reason (KSA-10) for this invoice type issuing.","status":"ERROR"}],"status":"ERROR"},"reportingStatus":null,"clearanceStatus":"NOT_CLEARED","qrSellertStatus":null,"qrBuyertStatus":null}

Thank you for your support

omarashrafsarhan commented 3 weeks ago

The compliance checks validating on the six types of the invoices:

  1. Simplified invoice
  2. Simplified credit note
  3. Simplified debit note
  4. Standard tax invoice
  5. Standard credit note
  6. Standard debit note

I can see that the Simplified invoice and Standard tax invoice are passed and accepted. The errors are in the debit and credit notes for the return reason, check on the field "return_reason" in the sales invoice you might have some customizations causing these errors.

infowaysa commented 3 weeks ago

After revising all edits we've made we ended up finding out that it wasn't anything that we've done but a somehow it seems like while installing the ksa_compliance app something went wrong and the app didn't install properly and some of it's components namely the "return_reason" field was not applied onto our site. We discovered this after making a new installation on a new site and comparing the changes that were made to ERPNext before and after the installation of the app and comparing the new and old sites to find out if there were any differences that might have caused the issue at hand.

Thank you very much for your support and the great overall work you've put into this app.

mhaggag commented 2 weeks ago

Hello,

We rely on migrations to apply our customizations (using exported customizations), so you could try to bench migrate and see if it resolves the issue on the site in question or if the problem happens in the future.