Closed osman-yasser closed 3 months ago
Thanks for the report and the excellent investigation and write-up.
There's a fix for this currently on the dev branch, as part of 0.21.1, among other fixes but they're still under test. I'll keep you posted when it's approved and merged.
In the mean time, if you're trying on a development or test clone of your instance, you can switch to the dev branch to see if you run into other issues.
Also, as a workaround to this issue, you can choose "Let the system decide" and create a customer with a fake VAT to use for the standard tax invoice compliance check.
But there is an error appear when the invoice was in sign process
Invoice 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": "GENERAL",
"category": "BUSINESS_RULES",
"message": "Unable to execute Business Rules validation ->",
"status": "ERROR"
},
{
"type": "ERROR",
"code": "certificate-permissions",
"category": "CERTIFICATE_ERRORS",
"message": "Production CSID does not cover Simplified documents",
"status": "ERROR"
}
],
"status": "ERROR"
},
"reportingStatus": "NOT_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": "GENERAL",
"category": "BUSINESS_RULES",
"message": "Unable to execute Business Rules validation ->",
"status": "ERROR"
},
{
"type": "ERROR",
"code": "certificate-permissions",
"category": "CERTIFICATE_ERRORS",
"message": "Production CSID does not cover Simplified documents",
"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": "GENERAL",
"category": "BUSINESS_RULES",
"message": "Unable to execute Business Rules validation ->",
"status": "ERROR"
},
{
"type": "ERROR",
"code": "certificate-permissions",
"category": "CERTIFICATE_ERRORS",
"message": "Production CSID does not cover Simplified documents",
"status": "ERROR"
}
],
"status": "ERROR"
},
"reportingStatus": "NOT_REPORTED",
"clearanceStatus": null,
"qrSellertStatus": null,
"qrBuyertStatus": null
}
error
Comments
How can fix this error, I press Perform Compliance Check, fulfilled the dialog and submit
I haven't seen these errors before, but "Production CSID does not cover Simplified documents" could possibly mean the compliance CSID was generated from a CSR that only targeted standard tax invoices. The CSR includes a field defining what type of invoices will be generated, whether standard, simplified, or both. I'm assuming these errors are the results of using the CSR previously generated when the setting was "Standard".
Since we've changed it to "Let the system decide", please try generating a new CSR (through the "Onboard" button) and then perform the compliance checks again.
0.21.1 was merged into master, which includes a fix to the initial report.
Thanks :)
When I press Button Perform Compliance Check that was in ZATCA Business Settings DocType, I encounter the error in the image below:
When I investigate what make this error, I found a peace of code on the action on button click in js:
The code make a frappe.prompt and build its fields based on some condition, simplified and standard. Since, I chosen Type of Business Transactions to be Standard Tax Invoices, the simplified field never shown:
So, the value object will never have simplified_customer_id and will be undefined, consequently, the parameter simplified_customer_id in python whitelist method will never passed and this error appear