Decimal issue with simple data

We are getting decimal issue with simple data where taxable amount is 3000000 and the tax is 450000 but still we are getting warning, how’s this possible.
@Ankit_Tiwari @idaoud @Embro Please help on priority.


<?xml version="1.0" encoding="UTF-8"?>
<ns10:Invoice xmlns:ns10="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:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" 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" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#"><ext:UBLExtensions>
    <ext:UBLExtension>
        <ext:ExtensionURI>urn:oasis:names:specification:ubl:dsig:enveloped:xades</ext:ExtensionURI>
        <ext:ExtensionContent>
            <sig:UBLDocumentSignatures>
                <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 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>hRiPHcUEyKa8aX39Uhi46z0bzlxpSGunOaVOF+hOmoM=</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>OGYyNWJjNjUzY2VkM2JlZmYwYjg5ZDQ2YTA3YjUzNzRmMTcwYjhkNjM2ZmQyM2E1NjlhY2VjMDBmZWEyYmJhMw==</ds:DigestValue>
                            </ds:Reference>
                        </ds:SignedInfo>
                        <ds:SignatureValue>MEUCIEb8pfcaWqMdm2G1ZQaN7KLBNFg+lhSnRVKf4Qw8UyGiAiEArtZrWdX27iiC/OrtCwnJ6WX9UiKbbSZpbOnDpJdMPZk=</ds:SignatureValue>
                        <ds:KeyInfo>
                            <ds:X509Data>
                                <ds:X509Certificate>MIIE1jCCBHygAwIBAgITbQAAAjqr/aUXUJAoIAAAAAACOjAKBggqhkjOPQQDAjBiMRUwEwYKCZImiZPyLGQBGRYFbG9jYWwxEzARBgoJkiaJk/IsZAEZFgNnb3YxFzAVBgoJkiaJk/IsZAEZFgdleHRnYXp0MRswGQYDVQQDExJQRVpFSU5WT0lDRVNDQTItQ0EwHhcNMjMwMTMxMDYyMDM5WhcNMjMwODA4MTIyNjQ2WjBVMQswCQYDVQQGEwJTQTEVMBMGA1UEChMMTWFmY2FycmVmb3VyMRMwEQYDVQQLEwozM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9bG9jYWw/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdD9iYXNlP29iamVjdENsYXNzPWNSTERpc3RyaWJ1dGlvblBvaW50MB8GA1UdIwQYMBaAFIel2wK9d81Hb2kBe3gtGvXux8BRMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDAzAKBggqhkjOPQQDAgNIADBFAiAydvg/85Ztwnt6cMKPbQ4fkB0pGNPP9uRI8QMhoHYmGwIhAKjMOvyaXwAJBgDyUsUXvCVYiNvuq7aLi8LJWd7jBLlQ</ds:X509Certificate>
                            </ds:X509Data>
                        </ds:KeyInfo>
                        <ds:Object>
                            <xades:QualifyingProperties Target="signature">
                                <xades:SignedProperties Id="xadesSignedProperties">
                                    <xades:SignedSignatureProperties>
                                        <xades:SigningTime>2024-07-22T09:22:15</xades:SigningTime>
                                        <xades:SigningCertificate>
                                            <xades:Cert>
                                                <xades:CertDigest>
                                                    <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
                                                    <ds:DigestValue>YzY5NWZjNGZmNWRiNTIyZDYyYzFiNGZlM2VhMzNiZDhmNjVhODJlYWJkMTE5ZDhlZTQ4NjU0NWJlMDlhNDZiMQ==</ds:DigestValue>
                                                </xades:CertDigest>
                                                <xades:IssuerSerial>
                                                    <ds:X509IssuerName>CN=PEZEINVOICESCA2-CA, DC=extgazt, DC=gov, DC=local</ds:X509IssuerName>
                                                    <ds:X509SerialNumber>2430781229602935519652797947415120415568167482</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>23500076-1c43er34</cbc:ID>
   <cbc:UUID>bcfd1b94-93a0-4e27-9abd-c97af32a6311</cbc:UUID>
   <cbc:IssueDate>2024-06-10</cbc:IssueDate>
   <cbc:IssueTime>11:41:46</cbc:IssueTime>
   <cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>
   <cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
   <cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
   <cac:BillingReference>
      <cac:InvoiceDocumentReference>
         <cbc:ID>35003</cbc:ID>
      </cac:InvoiceDocumentReference>
   </cac:BillingReference>
   <cac:AdditionalDocumentReference>
      <cbc:ID>ICV</cbc:ID>
      <cbc:UUID>2990</cbc:UUID>
   </cac:AdditionalDocumentReference>
   <cac:AdditionalDocumentReference>
      <cbc:ID>PIH</cbc:ID>
      <cac:Attachment>
         <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">Im2fA3z1eAB/doWcWqIz2Maj6fusjZ7nfP59u4sv+js=</cbc:EmbeddedDocumentBinaryObject>
      </cac:Attachment>
   </cac:AdditionalDocumentReference>
   
   
   <cac:AdditionalDocumentReference>
        <cbc:ID>QR</cbc:ID>
        <cac:Attachment>
            <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">AXfYp9mE2KfYqtit2KfYryDYp9mE2LPYudmI2K/ZiiDZhNmE2LPZitin2LHYp9iqINmI2KfZhNiv2LHYp9is2KfYqiDYp9mE2YbYp9ix2YrYqSB8IFNhdWRpIEF1dG9tb2JpbGUgJiBNb3RvcnMgRmVkZXJhdGlvbgIPMzAwMDQ4NTg0NDAwMDAzAxMyMDI0LTA2LTEwVDExOjQxOjQ2BAozNDUwMDAwLjAwBQk0NTAwMDAuMDAGLGhSaVBIY1VFeUthOGFYMzlVaGk0NnowYnpseHBTR3VuT2FWT0YraE9tb009B2BNRVVDSUViOHBmY2FXcU1kbTJHMVpRYU43S0xCTkZnK2xoU25SVktmNFF3OFV5R2lBaUVBcnRacldkWDI3aWlDL09ydEN3bko2V1g5VWlLYmJTWnBiT25EcEpkTVBaaz0IWDBWMBAGByqGSM49AgEGBSuBBAAKA0IABB79vU7yhGIOZ2us9pR/LplHuhWohDOeRJkmhnzcil2iyrNaqE9WgPquS2lMUgIXktebcv/6kTo6NLS/lwddrqc=</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">7001843742</cbc:ID>
         </cac:PartyIdentification>
         <cac:PostalAddress>
            <cbc:StreetName>الباجي | Al Baji</cbc:StreetName>
            <cbc:AdditionalStreetName>الباجي | Al Baji</cbc:AdditionalStreetName>
            <cbc:BuildingNumber>4627</cbc:BuildingNumber>
            <cbc:CitySubdivisionName>ﺍﻟﺸﺮﻓﻴﺔ | Al-Sharafiya</cbc:CitySubdivisionName>
            <cbc:CityName>الرياض | Riyadh</cbc:CityName>
            <cbc:PostalZone>72656</cbc:PostalZone>
            <cac:Country>
               <cbc:IdentificationCode>SA</cbc:IdentificationCode>
            </cac:Country>
         </cac:PostalAddress>
         <cac:PartyTaxScheme>
            <cbc:CompanyID>300048584400003</cbc:CompanyID>
            <cac:TaxScheme>
               <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
         </cac:PartyTaxScheme>
         <cac:PartyLegalEntity>
            <cbc:RegistrationName>الاتحاد السعودي للسيارات والدراجات النارية | Saudi Automobile &amp; Motors Federation</cbc:RegistrationName>
         </cac:PartyLegalEntity>
      </cac:Party>
   </cac:AccountingSupplierParty>
   <cac:AccountingCustomerParty>
      <cac:Party>
         <cac:PartyIdentification>
            <cbc:ID schemeID="CRN">12311504</cbc:ID>
         </cac:PartyIdentification>
         <cac:PostalAddress>
            <cbc:StreetName>المعادي -حي الرويس | 7041</cbc:StreetName>
            <cbc:BuildingNumber>5024</cbc:BuildingNumber>
            <cbc:CitySubdivisionName>مكة المكرمة/مكة المكرمة | Mecca/مكة المكرمة</cbc:CitySubdivisionName>
            <cbc:CityName>Jeddah/جدة | Jeddah</cbc:CityName>
            <cbc:PostalZone>23213</cbc:PostalZone>
            <cac:Country>
               <cbc:IdentificationCode>SA</cbc:IdentificationCode>
            </cac:Country>
         </cac:PostalAddress>
         <cac:PartyTaxScheme>
            <cbc:CompanyID>300111514400003</cbc:CompanyID>
            <cac:TaxScheme>
               <cbc:ID>VAT</cbc:ID>
            </cac:TaxScheme>
         </cac:PartyTaxScheme>
         <cac:PartyLegalEntity>
            <cbc:RegistrationName>مؤسسة عبدالله سالم محمد باخشب | مؤسسة عبدالله سالم محمد باخشب</cbc:RegistrationName>
         </cac:PartyLegalEntity>
      </cac:Party>
   </cac:AccountingCustomerParty>
   <cac:Delivery>
      <cbc:ActualDeliveryDate>2024-06-10</cbc:ActualDeliveryDate>
      <cbc:LatestDeliveryDate>2024-06-10</cbc:LatestDeliveryDate>
   </cac:Delivery>
   <cac:PaymentMeans>
      <cbc:PaymentMeansCode>42</cbc:PaymentMeansCode>
      <cbc:InstructionNote>10 | 10</cbc:InstructionNote>
   </cac:PaymentMeans>
   <cac:TaxTotal>
      <cbc:TaxAmount currencyID="SAR">450000.00</cbc:TaxAmount>
      <cac:TaxSubtotal>
         <cbc:TaxableAmount currencyID="SAR">3000000.00</cbc:TaxableAmount>
         <cbc:TaxAmount currencyID="SAR">450000.00</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:TaxTotal>
   <cac:TaxTotal>
      <cbc:TaxAmount currencyID="SAR">450000.00</cbc:TaxAmount>
   </cac:TaxTotal>
   <cac:LegalMonetaryTotal>
      <cbc:LineExtensionAmount currencyID="SAR">3000000.00</cbc:LineExtensionAmount>
      <cbc:TaxExclusiveAmount currencyID="SAR">3000000.00</cbc:TaxExclusiveAmount>
      <cbc:TaxInclusiveAmount currencyID="SAR">3450000.00</cbc:TaxInclusiveAmount>
      <cbc:AllowanceTotalAmount currencyID="SAR">0.00</cbc:AllowanceTotalAmount>
      <cbc:PayableRoundingAmount currencyID="SAR">0.00</cbc:PayableRoundingAmount>
      <cbc:PayableAmount currencyID="SAR">3450000.00</cbc:PayableAmount>
   </cac:LegalMonetaryTotal>
   <cac:InvoiceLine>
      <cbc:ID>1</cbc:ID>
      <cbc:InvoicedQuantity>1.0</cbc:InvoicedQuantity>
      <cbc:LineExtensionAmount currencyID="SAR">3000000.00</cbc:LineExtensionAmount>
      <cac:TaxTotal>
         <cbc:TaxAmount currencyID="SAR">450000.00</cbc:TaxAmount>
         <cbc:RoundingAmount currencyID="SAR">3450000.00</cbc:RoundingAmount>
      </cac:TaxTotal>
      <cac:Item>
         <cbc:Name>2024-الدفعه الأولى رعاية تويوتا للبطولات السعوديه</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">3000000.00</cbc:PriceAmount>
      </cac:Price>
   </cac:InvoiceLine>
</ns10:Invoice>

CODE : BR-CO-17, MESSAGE : [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.
2024-07-22 11:55:23,253 [WARN] ValidationProcessorImpl - CODE : BR-S-09, MESSAGE : [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is “Standard rated” shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119) / 100), rounded to two decimals.

1 Like

This is to highlight, that we are also facing the same issue/warnings but with different amounts:

Unit price 3757.400
Quantity 204.00
Taxable Value 766509.60
Tax 15% 114976.44
Total value 881486.04

Warnings

  • category : BR_WARNING

  • **code :**BR-CO-17

  • message : VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.

  • category : BR_WARNING

  • **code :**BR-S-09

  • message : The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is ‘Standard rated’ shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).

Let me know if you require further information, I can share.

Thank you !!

@Ankit_Tiwari @idaoud

Hi Ritik,
ZATCA application unable to handle large amount seems a bug while in your data there is no issue of calcualtions/decimals. I performed a test using SDK zatca-einvoicing-sdk-238-R3.3.3 and on large amount same error then I reduced no of zeros and there was no error. Like your data is 3000000.00 while I reduced to 3000.00 and updated tax etc accordingly and no error. ZATCA team need to investigate this issue. thanks

@Ankit_Tiwari @idaoud any update on this?