QCSA
April 27, 2024, 2:15pm
1
Hello,
I have integrated Zatca using “API Integration Sandbox” web api using php.
“/compliance” api is successfully call and getting success reposnce after I am calling “/compliance/invoices” api and every time I am getting following errorMessages from zatca. Can you explain me what the the exact issue from my side?
[errorMessages] => Array
(
[0] => stdClass Object
(
[type] => ERROR
[code] => CERTIFICATE_SIGNATURE_QRCODE_INVALID
[category] => QRCODE_VALIDATION
[message] => certificate signature does not match with qr certificate signature value
[status] => ERROR
)
)
Apparently it is clearly stating that the signature in your XML does not match signature in the QR code. Check if it is correct.
Embro
May 10, 2024, 7:28am
3
Check Tag No 08 … Public key … Compare with your test public key
Check Tag No 09 … Certificate Algorism …may be solved wrong
Use this url to encode your QR
Take the Result and Parse it using this URL
Go To Line 9 and compare with you test certificate algorism
I am using this library _________Its returning me same error
[type] => ERROR
[code] => CERTIFICATE_SIGNATURE_QRCODE_INVALID
[category] => QRCODE_VALIDATION
[message] => certificate signature does not match with qr certificate signature value
[status] => ERROR
This is my xml file looks like,
<?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"> <ext:UBLExtensions> <ext:UBLExtension> <ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI> <ext:ExtensionContent> <sig:UBLDocumentSignatures xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2" xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2" xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2"> <sac:SignatureInformation> <cbc:ID>urn:oasis:names:specification:ubl:signature:1</cbc:ID> <sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice </sbc:ReferencedSignatureID> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="signature"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/> <ds:Reference Id="invoiceSignedData" URI=""> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <ds:XPath>not(//ancestor-or-self::ext:UBLExtensions)</ds:XPath> </ds:Transform> <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <ds:XPath>not(//ancestor-or-self::cac:Signature)</ds:XPath> </ds:Transform> <ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <ds:XPath> not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR']) </ds:XPath> </ds:Transform> <ds:Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue>kaKG7wiILUyYhvA20HIyTyvshiKo3V5ySf2YN+Bq5Cs=</ds:DigestValue> </ds:Reference> <ds:Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties" URI="#xadesSignedProperties"> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue> NWUyZGJlODM0ZDMwYjQ4ODYzMmU5N2UzNGE2ZDI1NDhjZDZlNjEyMjJkYzc1ZTZlNDQyZTZmYjFkNjJjMTVlYg== </ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue> MEQCIHgtJGK9EVU8N2Y/YTzgccUu0CCx1Z6j6oD0n1qhFdutAiAx86dt9RtmHp1KztjJ26jqlBsOuSgD51cM08w80SGkDg== </ds:SignatureValue> <ds:KeyInfo> <ds:X509Data> <ds:X509Certificate> MIICGTCCAb+gAwIBAgIGAZFQjYlpMAoGCCqGSM49BAMCMBUxEzARBgNVBAMMCmVJbnZvaWNpbmcwHhcNMjQwODE0MTEwMjEzWhcNMjkwODEzMjEwMDAwWjBMMRcwFQYDVQQDDA5FR1MxLTg4NjQzMTE0NTEXMBUGA1UECwwOTXkgQnJhbmNoIE5hbWUxCzAJBgNVBAoMAlFyMQswCQYDVQQGEwJTQTBWMBAGByqGSM49AgEGBSuBBAAKA0IABJOi0pZhC6KCbZWQnmIU+B4KwYCZf7LqMh8RN0wGvbbQWKwTDhYtxPd+vYkTbXoDtY/SAv5WD/9QvEMVkaiNQiWjgcYwgcMwDAYDVR0TAQH/BAIwADCBsgYDVR0RBIGqMIGnpIGkMIGhMTowOAYDVQQEDDExLVFyfDItSU9TfDMtNmY0ZDIwZTAtNmJmZS00YTgwLTkzODktN2RhYmU2NjIwZjEyMR8wHQYKCZImiZPyLGQBAQwPMzAxMTIxOTcxNTAwMDAzMQ0wCwYDVQQMDAQwMTAwMSQwIgYDVQQaDBswMDAwIEtpbmcgRmFoYWhkIHN0LCBLaG9iYXIxDTALBgNVBA8MBEZvb2QwCgYIKoZIzj0EAwIDSAAwRQIhAOY7z2PslPpmDAEW332kfi2dM7TDCdwcFfGS46FIF19iAiA0wpmmriHygu1eo8V0RtzHPTziCDw2uGk2UOs94o0imw== </ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> <ds:Object> <xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="signature"> <xades:SignedProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="xadesSignedProperties"> <xades:SignedSignatureProperties> <xades:SigningTime>2024-08-14T11:02:18Z</xades:SigningTime> <xades:SigningCertificate> <xades:Cert> <xades:CertDigest> <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> <ds:DigestValue> Mzg5ZDc5NWUxZDlkMzhmMDk0Y2FkNzA3MmEwNGE0OGRiNmI0YTA5ZTk5NmNiMDFjN2JhMzNkMjBmNjk0MmM0NQ== </ds:DigestValue> </xades:CertDigest> <xades:IssuerSerial> <ds:X509IssuerName>CN=eInvoicing</ds:X509IssuerName> <ds:X509SerialNumber>1723633338729</ds:X509SerialNumber> </xades:IssuerSerial> </xades:Cert> </xades:SigningCertificate> </xades:SignedSignatureProperties> </xades:SignedProperties> </xades:QualifyingProperties> </ds:Object> </ds:Signature> </sac:SignatureInformation> </sig:UBLDocumentSignatures> </ext:ExtensionContent> </ext:UBLExtension> </ext:UBLExtensions> <cbc:ProfileID>reporting:1.0</cbc:ProfileID> <cbc:ID>EGS1-886431145-1</cbc:ID> <cbc:UUID>6f4d20e0-6bfe-4a80-9389-7dabe6620f12</cbc:UUID> <cbc:IssueDate>2024-08-13</cbc:IssueDate> <cbc:IssueTime>14:40:40</cbc:IssueTime> <cbc:InvoiceTypeCode name="0211010">388</cbc:InvoiceTypeCode> <cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode> <cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode> <cac:AdditionalDocumentReference> <cbc:ID>ICV</cbc:ID> <cbc:UUID>1</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:AdditionalDocumentReference> <cbc:ID>QR</cbc:ID> <cac:Attachment> <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain"> AQJRcgIPMzAxMTIxOTcxNTAwMDAzAxQyMDI0LTA4LTEzVDE0OjQwOjQwWgQGMjk2LjcwBQYxNTguNzAGLGthS0c3d2lJTFV5WWh2QTIwSEl5VHl2c2hpS28zVjV5U2YyWU4rQnE1Q3M9B2BNRVFDSUhndEpHSzlFVlU4TjJZL1lUemdjY1V1MENDeDFaNmo2b0QwbjFxaEZkdXRBaUF4ODZkdDlSdG1IcDFLenRqSjI2anFsQnNPdVNnRDUxY00wOHc4MFNHa0RnPT0IWDBWMBAGByqGSM49AgEGBSuBBAAKA0IABJOi0pZhC6KCbZWQnmIU+B4KwYCZf7LqMh8RN0wGvbbQWKwTDhYtxPd+vYkTbXoDtY/SAv5WD/9QvEMVkaiNQiUJPQAAoADgoA4wRQIhAOY7z2PslPpmDAEW332kfi2dM7TDCdwcFfGS46FIF19iAiA0wpmmriHygu1eo8V0Rtw= </cbc:EmbeddedDocumentBinaryObject> </cac:Attachment> </cac:AdditionalDocumentReference> <cac:Signature> <cbc:ID>urn:oasis:names:specification:ubl:signature:Invoice</cbc:ID> <cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades</cbc:SignatureMethod> </cac:Signature> <cac:AccountingSupplierParty> <cac:Party> <cac:PartyIdentification> <cbc:ID schemeID="CRN">454634645645654</cbc:ID> </cac:PartyIdentification> <cac:PostalAddress> <cbc:StreetName>King Fahahd st</cbc:StreetName> <cbc:BuildingNumber>0000</cbc:BuildingNumber> <cbc:PlotIdentification>0000</cbc:PlotIdentification> <cbc:CitySubdivisionName>West</cbc:CitySubdivisionName> <cbc:CityName>Khobar</cbc:CityName> <cbc:PostalZone>31952</cbc:PostalZone> <cac:Country> <cbc:IdentificationCode>SA</cbc:IdentificationCode> </cac:Country> </cac:PostalAddress> <cac:PartyTaxScheme> <cbc:CompanyID>301121971500003</cbc:CompanyID> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:PartyTaxScheme> <cac:PartyLegalEntity> <cbc:RegistrationName>Qr</cbc:RegistrationName> </cac:PartyLegalEntity> </cac:Party> </cac:AccountingSupplierParty> <cac:AccountingCustomerParty/> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">158.70</cbc:TaxAmount> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount> <cbc:TaxAmount currencyID="SAR">6.90</cbc:TaxAmount> <cac:TaxCategory> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID> <cbc:Percent>15.00</cbc:Percent> <cac:TaxScheme> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount> <cbc:TaxAmount currencyID="SAR">46.00</cbc:TaxAmount> <cac:TaxCategory> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID> <cbc:Percent>100.00</cbc:Percent> <cac:TaxScheme> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount> <cbc:TaxAmount currencyID="SAR">6.90</cbc:TaxAmount> <cac:TaxCategory> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID> <cbc:Percent>15.00</cbc:Percent> <cac:TaxScheme> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount> <cbc:TaxAmount currencyID="SAR">46.00</cbc:TaxAmount> <cac:TaxCategory> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID> <cbc:Percent>100.00</cbc:Percent> <cac:TaxScheme> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount> <cbc:TaxAmount currencyID="SAR">6.90</cbc:TaxAmount> <cac:TaxCategory> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID> <cbc:Percent>15.00</cbc:Percent> <cac:TaxScheme> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount> <cbc:TaxAmount currencyID="SAR">46.00</cbc:TaxAmount> <cac:TaxCategory> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID> <cbc:Percent>100.00</cbc:Percent> <cac:TaxScheme> <cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID> </cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">158.70</cbc:TaxAmount> </cac:TaxTotal> <cac:LegalMonetaryTotal> <cbc:LineExtensionAmount currencyID="SAR">138.00</cbc:LineExtensionAmount> <cbc:TaxExclusiveAmount currencyID="SAR">138.00</cbc:TaxExclusiveAmount> <cbc:TaxInclusiveAmount currencyID="SAR">296.70</cbc:TaxInclusiveAmount> <cbc:AllowanceTotalAmount currencyID="SAR">0</cbc:AllowanceTotalAmount> <cbc:PrepaidAmount currencyID="SAR">0</cbc:PrepaidAmount> <cbc:PayableAmount currencyID="SAR">296.70</cbc:PayableAmount> </cac:LegalMonetaryTotal> <cac:InvoiceLine> <cbc:ID>1</cbc:ID> <cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">52.90</cbc:TaxAmount> <cbc:RoundingAmount currencyID="SAR">98.90</cbc:RoundingAmount> </cac:TaxTotal> <cac:Item> <cbc:Name>TEST NAME</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:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>100.00</cbc:Percent> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount> <cac:AllowanceCharge> <cbc:ChargeIndicator>false</cbc:ChargeIndicator> <cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason> <cbc:Amount currencyID="SAR">2.00</cbc:Amount> </cac:AllowanceCharge> <cac:AllowanceCharge> <cbc:ChargeIndicator>false</cbc:ChargeIndicator> <cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason> <cbc:Amount currencyID="SAR">2.00</cbc:Amount> </cac:AllowanceCharge> </cac:Price> </cac:InvoiceLine> <cac:InvoiceLine> <cbc:ID>1</cbc:ID> <cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">52.90</cbc:TaxAmount> <cbc:RoundingAmount currencyID="SAR">98.90</cbc:RoundingAmount> </cac:TaxTotal> <cac:Item> <cbc:Name>TEST NAME</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:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>100.00</cbc:Percent> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount> <cac:AllowanceCharge> <cbc:ChargeIndicator>false</cbc:ChargeIndicator> <cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason> <cbc:Amount currencyID="SAR">2.00</cbc:Amount> </cac:AllowanceCharge> <cac:AllowanceCharge> <cbc:ChargeIndicator>false</cbc:ChargeIndicator> <cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason> <cbc:Amount currencyID="SAR">2.00</cbc:Amount> </cac:AllowanceCharge> </cac:Price> </cac:InvoiceLine> <cac:InvoiceLine> <cbc:ID>1</cbc:ID> <cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount> <cac:TaxTotal> <cbc:TaxAmount currencyID="SAR">52.90</cbc:TaxAmount> <cbc:RoundingAmount currencyID="SAR">98.90</cbc:RoundingAmount> </cac:TaxTotal> <cac:Item> <cbc:Name>TEST NAME</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:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>100.00</cbc:Percent> <cac:TaxScheme> <cbc:ID>VAT</cbc:ID> </cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount> <cac:AllowanceCharge> <cbc:ChargeIndicator>false</cbc:ChargeIndicator> <cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason> <cbc:Amount currencyID="SAR">2.00</cbc:Amount> </cac:AllowanceCharge> <cac:AllowanceCharge> <cbc:ChargeIndicator>false</cbc:ChargeIndicator> <cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason> <cbc:Amount currencyID="SAR">2.00</cbc:Amount> </cac:AllowanceCharge> </cac:Price> </cac:InvoiceLine> </Invoice>
Can anyone assist what actually wrong in it?
idaoud
August 15, 2024, 9:07am
5
Dear @Sulaman
Thanks for reaching out, and welcome to our community.
Please refer to the technical guidelines shared by ZATCA. Refer to slide 58 related to QR codes; you can find the link below.
However, based on the error you received, please double-check that you are using the right certificate for the signing process.
Technical guideline: E-invoicing-Detailed-Technical-Guideline.pdf (zatca.gov.sa)
For further support, please don’t hesitate to contact our SP support team.
SP email: sp_support@zatca.gov.sa
Thanks,
Ibrahem Daoud.
Embro
August 18, 2024, 10:27am
6
first: Atually your InvoiceLine …ID must be 1,2,3,4…= your invoice details lines.
second: I notice something wrong with taxValue compared with taxable amount and and also total Tax with total Invoice
your QR says that:
Total invoice include tax = 296.70
Tax Total = 158.70
Regarding Signature
Compare you Tag No 9 In QR with your Certificate Algorism
I hope its help
Malik
August 21, 2024, 11:02am
7
Hi,
seems your xml itself is not valid and even you given 100% as VAT rate which is wrong it should be for standard 15.00 review following part of your XML,
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">158.70</cbc:TaxAmount>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="SAR">138.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="SAR">138.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="SAR">296.70</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="SAR">0</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID="SAR">0</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="SAR">296.70</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">52.90</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">98.90</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>TEST NAME</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:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>100.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">52.90</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">98.90</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>TEST NAME</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:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>100.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">52.90</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">98.90</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>TEST NAME</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:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>100.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
Sulaman:
<?xml version="1.0" encoding="UTF-8"?> urn:oasis:names:specification:ubl:dsig:enveloped:xades urn:oasis:names:specification:ubl:signature:1 urn:oasis:names:specification:ubl:signature:Invoice not(//ancestor-or-self::ext:UBLExtensions) not(//ancestor-or-self::cac:Signature) not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR']) kaKG7wiILUyYhvA20HIyTyvshiKo3V5ySf2YN+Bq5Cs= NWUyZGJlODM0ZDMwYjQ4ODYzMmU5N2UzNGE2ZDI1NDhjZDZlNjEyMjJkYzc1ZTZlNDQyZTZmYjFkNjJjMTVlYg== MEQCIHgtJGK9EVU8N2Y/YTzgccUu0CCx1Z6j6oD0n1qhFdutAiAx86dt9RtmHp1KztjJ26jqlBsOuSgD51cM08w80SGkDg== MIICGTCCAb+gAwIBAgIGAZFQjYlpMAoGCCqGSM49BAMCMBUxEzARBgNVBAMMCmVJbnZvaWNpbmcwHhcNMjQwODE0MTEwMjEzWhcNMjkwODEzMjEwMDAwWjBMMRcwFQYDVQQDDA5FR1MxLTg4NjQzMTE0NTEXMBUGA1UECwwOTXkgQnJhbmNoIE5hbWUxCzAJBgNVBAoMAlFyMQswCQYDVQQGEwJTQTBWMBAGByqGSM49AgEGBSuBBAAKA0IABJOi0pZhC6KCbZWQnmIU+B4KwYCZf7LqMh8RN0wGvbbQWKwTDhYtxPd+vYkTbXoDtY/SAv5WD/9QvEMVkaiNQiWjgcYwgcMwDAYDVR0TAQH/BAIwADCBsgYDVR0RBIGqMIGnpIGkMIGhMTowOAYDVQQEDDExLVFyfDItSU9TfDMtNmY0ZDIwZTAtNmJmZS00YTgwLTkzODktN2RhYmU2NjIwZjEyMR8wHQYKCZImiZPyLGQBAQwPMzAxMTIxOTcxNTAwMDAzMQ0wCwYDVQQMDAQwMTAwMSQwIgYDVQQaDBswMDAwIEtpbmcgRmFoYWhkIHN0LCBLaG9iYXIxDTALBgNVBA8MBEZvb2QwCgYIKoZIzj0EAwIDSAAwRQIhAOY7z2PslPpmDAEW332kfi2dM7TDCdwcFfGS46FIF19iAiA0wpmmriHygu1eo8V0RtzHPTziCDw2uGk2UOs94o0imw== 2024-08-14T11:02:18Z Mzg5ZDc5NWUxZDlkMzhmMDk0Y2FkNzA3MmEwNGE0OGRiNmI0YTA5ZTk5NmNiMDFjN2JhMzNkMjBmNjk0MmM0NQ== CN=eInvoicing 1723633338729 reporting:1.0 EGS1-886431145-1 6f4d20e0-6bfe-4a80-9389-7dabe6620f12 2024-08-13 14:40:40 388 SAR SAR ICV 1 PIH NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ== QR AQJRcgIPMzAxMTIxOTcxNTAwMDAzAxQyMDI0LTA4LTEzVDE0OjQwOjQwWgQGMjk2LjcwBQYxNTguNzAGLGthS0c3d2lJTFV5WWh2QTIwSEl5VHl2c2hpS28zVjV5U2YyWU4rQnE1Q3M9B2BNRVFDSUhndEpHSzlFVlU4TjJZL1lUemdjY1V1MENDeDFaNmo2b0QwbjFxaEZkdXRBaUF4ODZkdDlSdG1IcDFLenRqSjI2anFsQnNPdVNnRDUxY00wOHc4MFNHa0RnPT0IWDBWMBAGByqGSM49AgEGBSuBBAAKA0IABJOi0pZhC6KCbZWQnmIU+B4KwYCZf7LqMh8RN0wGvbbQWKwTDhYtxPd+vYkTbXoDtY/SAv5WD/9QvEMVkaiNQiUJPQAAoADgoA4wRQIhAOY7z2PslPpmDAEW332kfi2dM7TDCdwcFfGS46FIF19iAiA0wpmmriHygu1eo8V0Rtw= urn:oasis:names:specification:ubl:signature:Invoice urn:oasis:names:specification:ubl:dsig:enveloped:xades 454634645645654 King Fahahd st 0000 0000 West Khobar 31952 SA 301121971500003 VAT Qr 158.70 46.00 6.90 S 15.00 VAT 46.00 46.00 S 100.00 VAT 46.00 6.90 S 15.00 VAT 46.00 46.00 S 100.00 VAT 46.00 6.90 S 15.00 VAT 46.00 46.00 S 100.00 VAT 158.70 138.00 138.00 296.70 0 0 296.70 1 5 46.00 52.90 98.90 TEST NAME S 15.00 VAT S 100.00 VAT 10 false A discount 2.00 false A second discount 2.00 1 5 46.00 52.90 98.90 TEST NAME S 15.00 VAT S 100.00 VAT 10 false A discount 2.00 false A second discount 2.00 1 5 46.00 52.90 98.90 TEST NAME S 15.00 VAT S 100.00 VAT 10 false A discount 2.00 false A second discount 2.00
Thanks, It’s resolve my issue.
how can I fix it
certificate signature value in tag 9 of the QR code undefined or the certificate signature value is missing
ahmed19
September 1, 2024, 1:26pm
10
I’m also facing this same issue. can anybody assist me what’s the issue here is XML
<?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">
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI>
<ext:ExtensionContent>
<sig:UBLDocumentSignatures
xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2"
xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2"
xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2">
<sac:SignatureInformation>
<cbc:ID>urn:oasis:names:specification:ubl:signature:1</cbc:ID>
<sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice</sbc:ReferencedSignatureID>
<ds:Signature
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="signature">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
<ds:Reference Id="invoiceSignedData" URI="">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>KfgR6SeNPfhc1cH53NHI/93fPNzttKiQsaUWVoeHU9s=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties" URI="#xadesSignedProperties">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>OGZjYzE3YzE2YmRlYTZhZGRiMWZlYzBkZTdmMDcyMmY3MDRlMTRkMTQ4NTRjOGFmZjM1MGRiMjE0MjY5ZjlhYQ==</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>MEYCIQCj0Z9NNklSx89OUAduRaGnO0j+vcmkk3KEtIyr/4DBqAIhANNAUuK5dEjym6lwta9EZ1dfWFNQj3lbu6cDRN5WGQlg</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIICMTCCAdegAwIBAgIGAZGfkTKiMAoGCCqGSM49BAMCMBUxEzARBgNVBAMMCmVJbnZvaWNpbmcwHhcNMjQwODI5MTkxNjEzWhcNMjkwODI4MjEwMDAwWjBTMRcwFQYDVQQDDA5FR1MxLTg4NjQzMTE0NTEYMBYGA1UECwwPV1NMIFRlYW0gQnJhbmNoMREwDwYDVQQKDAhUZXN0IFZhdDELMAkGA1UEBhMCU0EwVjAQBgcqhkjOPQIBBgUrgQQACgNCAASjZFwcbd5sOyruZHDS3aq0mYyWmXT/pgsp2RltJYH7uxBOyPHOvJx3A3XqaNrLkC+XKbHO+7fa+03SZfceXfSyo4HXMIHUMAwGA1UdEwEB/wQCMAAwgcMGA1UdEQSBuzCBuKSBtTCBsjFFMEMGA1UEBAw8MS1zb2x1dGlvbl9uYW1lfDItSU9TfDMtMDEwZWYwNDgtYmNlOC00YmU0LThjZTEtZmU5ZjBhNzg3NzAyMR8wHQYKCZImiZPyLGQBAQwPMzAxMTIxOTcxNTAwMDAzMQ0wCwYDVQQMDAQxMTAwMSgwJgYDVQQaDB8wMDAwIDEyMyBMb25nIENpdHksIEplZGRhaCBDaXR5MQ8wDQYDVQQPDAZNb2JpbGUwCgYIKoZIzj0EAwIDSAAwRQIhAMy/aADBmOA5EcKNeHvGHfK28jts/Z/upUu4loWk1B7+AiArkND2B/OXL8awRVe7RZJXMM4lwsb+NJP9iyil2Izx3w==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties
xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="signature">
<xades:SignedProperties
xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="xadesSignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2024-08-29T21:16:20</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>Yjk2ODdhMTlhNjNlYzdjNTJjZDYxZDJmMGY4YmExOTI3MGQ4Y2FlMzAzODZjODNiYmExMDY1YWNhMWU5M2E2YQ==</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=eInvoicing</ds:X509IssuerName>
<ds:X509SerialNumber>1724958978722</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
</sac:SignatureInformation>
</sig:UBLDocumentSignatures>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>
<cbc:ProfileID>reporting:1.0</cbc:ProfileID>
<cbc:ID>EGS1-886431123</cbc:ID>
<cbc:UUID>010ef048-bce8-4be4-8ce1-fe9f0a787702</cbc:UUID>
<cbc:IssueDate>2024-08-15</cbc:IssueDate>
<cbc:IssueTime>02:10:00</cbc:IssueTime>
<cbc:InvoiceTypeCode name="0200000">388</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
<cac:AdditionalDocumentReference>
<cbc:ID>ICV</cbc:ID>
<cbc:UUID>1002</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:AdditionalDocumentReference>
<cbc:ID>QR</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">AQhUZXN0IFZhdAIPMzAxMTIxOTcxNTAwMDAzAxMyMDI0LTA4LTE1VDAyOjEwOjAwBAYxMTUuMDAFBTE1LjAwBixLZmdSNlNlTlBmaGMxY0g1M05ISS85M2ZQTnp0dEtpUXNhVVdWb2VIVTlzPQdgTUVZQ0lRQ2owWjlOTmtsU3g4OU9VQWR1UmFHbk8wait2Y21razNLRXRJeXIvNERCcUFJaEFOTkFVdUs1ZEVqeW02bHd0YTlFWjFkZldGTlFqM2xidTZjRFJONVdHUWxnCFgwVjAQBgcqhkjOPQIBBgUrgQQACgNCAASjZFwcbd5sOyruZHDS3aq0mYyWmXT/pgsp2RltJYH7uxBOyPHOvJx3A3XqaNrLkC+XKbHO+7fa+03SZfceXfSyCT0AAKAA4KAOMEUCIQDMv2gAwZjgORHCjXh7xh3ytvI7bP2f7qVLuJaFpNQe/gIgK5DQ9gfzly/GsEVXu0WS</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:Signature>
<cbc:ID>urn:oasis:names:specification:ubl:signature:Invoice</cbc:ID>
<cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades</cbc:SignatureMethod>
</cac:Signature>
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyIdentification>
<cbc:ID schemeID="CRN">454634645645654</cbc:ID>
</cac:PartyIdentification>
<cac:PostalAddress>
<cbc:StreetName>123 Long City</cbc:StreetName>
<cbc:BuildingNumber>0000</cbc:BuildingNumber>
<cbc:PlotIdentification>0000</cbc:PlotIdentification>
<cbc:CitySubdivisionName>West</cbc:CitySubdivisionName>
<cbc:CityName>Jeddah City</cbc:CityName>
<cbc:PostalZone>31952</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SA</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>301121971500003</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Test Vat</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty/>
<cac:Delivery>
<cbc:ActualDeliveryDate>2024-08-15</cbc:ActualDeliveryDate>
</cac:Delivery>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>15.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="SAR">100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="SAR">100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="SAR">115.00</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="SAR">0</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID="SAR">0</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="SAR">115.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">100.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">15.00</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">115.00</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>Samsung Mobile</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">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>
@Sulaman I am facing the same issue. Can you tell me how you resolved this issue?
<?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">
<ext:UBLExtensions>
<ext:UBLExtension>
<ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI>
<ext:ExtensionContent>
<sig:UBLDocumentSignatures xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2" xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-2" xmlns:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2">
<sac:SignatureInformation>
<cbc:ID>urn:oasis:names:specification:ubl:signature:1</cbc:ID>
<sbc:ReferencedSignatureID>urn:oasis:names:specification:ubl:signature:Invoice</sbc:ReferencedSignatureID>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="signature">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
<ds:Reference Id="invoiceSignedData" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::ext:UBLExtensions)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::cac:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR'])</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>M5kDKqorytsvMN5A/69Pp4TdqneJ+JUVnYwYARBKX5g=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://www.w3.org/2000/09/xmldsig#SignatureProperties" URI="#xadesSignedProperties">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>ODU4ZGZjNjIzNTg0ODFhYWIwMWUyMTNhNWE2MzY3Y2JmNDQ5Y2VjNDU3ZDQ3N2EzODM5M2YyNDU3NGVmNWE4Mw==</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>MEQCIFrFcmn5b7wSr5Nls6lcdiYx8V8uQ/nD/Y9y0XVt+WA8AiAPBt6tc6qsm7mk2K5BaFWeeKFijvYIR6kWTnD4sIytjw==</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIICLzCCAdWgAwIBAgIGAZHXFBJuMAoGCCqGSM49BAMCMBUxEzARBgNVBAMMCmVJbnZvaWNpbmcwHhcNMjQwOTA5MTM1ODE3WhcNMjkwOTA4MjEwMDAwWjBXMRcwFQYDVQQDDA5FR1MxLTg4NjQzMTE0NTEXMBUGA1UECwwOTXkgQnJhbmNoIE5hbWUxFjAUBgNVBAoMDVdlc2FtIEFsemFoaXIxCzAJBgNVBAYTAlNBMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEP01SaJppTAPk7ZbBjwXs1etc6FLmKdXRgL/5MkGgh2q5e87h2oBPLQdS6cTvdyeUnxSyScShcn2ibwfjItdlgaOB0TCBzjAMBgNVHRMBAf8EAjAAMIG9BgNVHREEgbUwgbKkga8wgawxRTBDBgNVBAQMPDEtc29sdXRpb25fbmFtZXwyLUlPU3wzLTZmNGQyMGUwLTZiZmUtNGE4MC05Mzg5LTdkYWJlNjYyMGYxMjEfMB0GCgmSJomT8ixkAQEMDzMwMTEyMTk3MTUwMDAwMzENMAsGA1UEDAwEMDEwMDEkMCIGA1UEGgwbMDAwMCBLaW5nIEZhaGFoZCBzdCwgS2hvYmFyMQ0wCwYDVQQPDARGb29kMAoGCCqGSM49BAMCA0gAMEUCICFBnBZAOOuqQoyIalo6RLlLam8ykQLd+X3vNx5ZpBPLAiEAqr+a17gCyjcV24d6vVoU/zLKVqfS+LG9T3pjtUyb+zw=</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="signature">
<xades:SignedProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="xadesSignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2024-09-09T13:58:22Z</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>ZTEzMTFhOGJkYTAwNWU4NWIxYmNjZTQwN2E0NDNlYWMyMmQwZTJjYzQxMTRiZTIxNTRkNzEwOGI1MDE5MzM1OA==</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=eInvoicing</ds:X509IssuerName>
<ds:X509SerialNumber>1725890302574</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
</sac:SignatureInformation>
</sig:UBLDocumentSignatures>
</ext:ExtensionContent>
</ext:UBLExtension>
</ext:UBLExtensions>
<cbc:ProfileID>reporting:1.0</cbc:ProfileID>
<cbc:ID>EGS1-886431145-1</cbc:ID>
<cbc:UUID>6f4d20e0-6bfe-4a80-9389-7dabe6620f12</cbc:UUID>
<cbc:IssueDate>2024-09-09</cbc:IssueDate>
<cbc:IssueTime>09:00:00</cbc:IssueTime>
<cbc:InvoiceTypeCode name="0211010">388</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
<cac:AdditionalDocumentReference>
<cbc:ID>ICV</cbc:ID>
<cbc:UUID>1</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:AdditionalDocumentReference>
<cbc:ID>QR</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">AQ1XZXNhbSBBbHphaGlyAg8zMDExMjE5NzE1MDAwMDMDFDIwMjQtMDktMDlUMDY6MDA6MDBaBAYxNjUuNjAFBTI3LjYwBixNNWtES3Fvcnl0c3ZNTjVBLzY5UHA0VGRxbmVKK0pVVm5Zd1lBUkJLWDVnPQdgTUVRQ0lGckZjbW41Yjd3U3I1TmxzNmxjZGlZeDhWOHVRL25EL1k5eTBYVnQrV0E4QWlBUEJ0NnRjNnFzbTdtazJLNUJhRldlZUtGaWp2WUlSNmtXVG5ENHNJeXRqdz09CFgwVjAQBgcqhkjOPQIBBgUrgQQACgNCAAQ/TVJommlMA+TtlsGPBezV61zoUuYp1dGAv/kyQaCHarl7zuHagE8tB1LpxO93J5SfFLJJxKFyfaJvB+Mi12WBCTiurjBFAiAhQZwWQDjrqkKMiGpaOkS5S2pvMpEC3fl97zceWaQTywIhAKq/mte4Aso3FduHer1aFA==</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:Signature>
<cbc:ID>urn:oasis:names:specification:ubl:signature:Invoice</cbc:ID>
<cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades</cbc:SignatureMethod>
</cac:Signature>
<cac:AccountingSupplierParty>
<cac:Party>
<cac:PartyIdentification>
<cbc:ID schemeID="CRN">454634645645654</cbc:ID>
</cac:PartyIdentification>
<cac:PostalAddress>
<cbc:StreetName>King Fahahd st</cbc:StreetName>
<cbc:BuildingNumber>0000</cbc:BuildingNumber>
<cbc:PlotIdentification>0000</cbc:PlotIdentification>
<cbc:CitySubdivisionName>West</cbc:CitySubdivisionName>
<cbc:CityName>Khobar</cbc:CityName>
<cbc:PostalZone>31952</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SA</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>301121971500003</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Wesam Alzahir</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Wesam Alzahir</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">27.60</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">6.90</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>15.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">2.30</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>5.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">6.90</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>15.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">2.30</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>5.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">6.90</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>15.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">46.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">2.30</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>5.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeAgencyID="6" schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">27.60</cbc:TaxAmount>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="SAR">138.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="SAR">138.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="SAR">165.60</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="SAR">0</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID="SAR">0</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="SAR">165.60</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">9.20</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">55.20</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>TEST NAME 1</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:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>5.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">9.20</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">55.20</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>TEST NAME 2</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:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>5.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>3</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">5</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">46.00</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">9.20</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">55.20</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>TEST NAME 3</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:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>5.00</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">10</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>A second discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">2.00</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
</Invoice>
Hi ,
Have you got any solution for this ?