I have an invoice in the following XML file that contains an Allowances (Discounts). When I check the invoice via the SDK, I get some warnings. What is the reason for these warnings and how do I get rid of these warnings?
warnings:
category: BR_WARNING
code: BR-CO-13
message: Invoice total amount without VAT (BT-109) = S Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).
—————————————————-
category: BR_WARNING
code: BR-S-08
message: [BR-S-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ’ Standard rated’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are ‘Standard Rate’.
——————————————————-
category: BR_KSA_WARNING
code: BR-KSA-EN16931-11
message: Invoice line net amount (BT-131) must equal (Invoiced quantity (BT-129) * (Item net price (BT-146) / item price base quantity (BT-149))) + Sum of invoice line charge amount (BT-141) - Sum of invoice line allowance amount (BT-136)
<?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:sig="urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2" xmlns:sac="urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2" xmlns:sbc="urn:oasis:names:specification:ubl:schema:xsd:SignatureBasicComponents-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 Id="signature" xmlns:ds="
">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="
" />
<ds:SignatureMethod Algorithm="
" />
<ds:Reference Id="invoiceSignedData" URI="">
<ds:Transforms>
<ds:Transform Algorithm="
">
<ds:XPath>not(//ancestor-or-self::ext:UBLExtensions)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="
">
<ds:XPath>not(//ancestor-or-self::cac:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="
">
<ds:XPath>not(//ancestor-or-self::cac:AdditionalDocumentReference[cbc:ID='QR'])</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="
" />
</ds:Transforms>
<ds:DigestMethod Algorithm="
" />
<ds:DigestValue>4Y/oFQwxxJ7UvA4AHRQT86rasLiMlin77ZANu8lES14=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="
" URI="#xadesSignedProperties">
<ds:DigestMethod Algorithm="
" />
<ds:DigestValue>NjBiYmU4MDI1OWQ4M2VkYWRkYzk1NjQ3MTIwNjFkNDI1MjdhOTYzOWEwZGExZWUwMDJjOWRiNjAyYjI2OGZkYw==</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>MEUCIQCSIfMx85OGwJ2OpROMGKEgGra0JbK916llEYfzFBqEoQIgWyhBgqcRf1vWHwoJ39YeYxl7OuJo1LozsyMMYcFs7os=</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIICJjCCAcugAwIBAgIGAYkpnNy7MAoGCCqGSM49BAMCMBUxEzARBgNVBAMMCmVJbnZvaWNpbmcwHhcNMjMwNzA2MDUxMTI4WhcNMjgwNzA1MjEwMDAwWjBkMQswCQYDVQQGEwJTQTElMCMGA1UECwwcSGFzc2FuIEphbWVlbCBNb3RvcnMgQ29tcGFueTEWMBQGA1UECgwNSGFzc2FuIEphbWVlbDEWMBQGA1UEAwwNSGFzc2FuX0phbWVlbDBWMBAGByqGSM49AgEGBSuBBAAKA0IABBgAc0sP7teNKtOpm476vVr2U/+wxFdIeVmp2pOrzHBTtwkAQIDniP6RWplXInLlOLh7fBQbyMmB4NCRDoFfPnajgbowgbcwDAYDVR0TAQH/BAIwADCBpgYDVR0RBIGeMIGbpIGYMIGVMTkwNwYDVQQEDDAxLVZTfDItVjh8My00QzNFRTc0OS01QkRFLTQ1MzAtQTRGQS1EOUYyRDcyRUVDOTUxHzAdBgoJkiaJk/IsZAEBDA8zMTEwNzMxNDI5MDAwMDMxDTALBgNVBAwMBDExMDAxETAPBgNVBBoMCEFMRGFtbWFtMRUwEwYDVQQPDAxDb25zdHJ1Y3Rpb24wCgYIKoZIzj0EAwIDSQAwRgIhAOHbOOAOqUOqYIBtZQ90FgplSxevRKBNR4z+mVJYb+8iAiEAjGsMW5ZGO5CY+BaFVo8CEVLnO4mYE/pKmvr6kwe3+Fo=</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties Target="signature" xmlns:xades="
">
<xades:SignedProperties Id="xadesSignedProperties">
<xades:SignedSignatureProperties>
<xades:SigningTime>2025-10-20T23:22:19</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="
" />
<ds:DigestValue>N2E4NjkyZGQwYTdlMDRhNDI1ZjI3MGFlM2U2OTE0YjdjMWIwZGNiODMyMGJiN2NmMDdkOGVkMmEzOTEwNzlhMQ==</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=eInvoicing</ds:X509IssuerName>
<ds:X509SerialNumber>1688620293307</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>MInv2024/10/10002</cbc:ID>
<cbc:UUID>b6a329c2-f0cd-4fb9-8f64-ce8987e41585</cbc:UUID>
<cbc:IssueDate>2024-10-31</cbc:IssueDate>
<cbc:IssueTime>08:57:00Z</cbc:IssueTime>
<cbc:InvoiceTypeCode name="0100000">388</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
<cac:AdditionalDocumentReference>
<cbc:ID>ICV</cbc:ID>
<cbc:UUID>20251020112219</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">ASnYtNix2YPYqSDYrdiz2YYg2KzZhdmK2YQg2YTZhNiz2YrYp9ix2KfYqgIPMzExMDczMTQyOTAwMDAzAxMyMDI0LTEwLTMxVDExOjU3OjAwBAcyODg2Ljc5BQYzNzYuNTQGLDRZL29GUXd4eEo3VXZBNEFIUlFUODZyYXNMaU1saW43N1pBTnU4bEVTMTQ9B2BNRVVDSVFDU0lmTXg4NU9Hd0oyT3BST01HS0VnR3JhMEpiSzkxNmxsRVlmekZCcUVvUUlnV3loQmdxY1JmMXZXSHdvSjM5WWVZeGw3T3VKbzFMb3pzeU1NWWNGczdvcz0IWDBWMBAGByqGSM49AgEGBSuBBAAKA0IABBgAc0sP7teNKtOpm476vVr2U/+wxFdIeVmp2pOrzHBTtwkAQIDniP6RWplXInLlOLh7fBQbyMmB4NCRDoFfPnY=</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">2051246734</cbc:ID>
</cac:PartyIdentification>
<cac:PostalAddress>
<cbc:StreetName>طريق الملك خالد</cbc:StreetName>
<cbc:BuildingNumber>7060</cbc:BuildingNumber>
<cbc:PlotIdentification>0</cbc:PlotIdentification>
<cbc:CitySubdivisionName>التعاون، الخبر 7060</cbc:CitySubdivisionName>
<cbc:CityName>Khubar-SAU</cbc:CityName>
<cbc:PostalZone>31441</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SA</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>311073142900003</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>شركة حسن جميل للسيارات</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PartyIdentification>
<cbc:ID schemeID="TIN">3100032772</cbc:ID>
</cac:PartyIdentification>
<cac:PostalAddress>
<cbc:StreetName>صالح الشرتوني Salih Ash Al Shartuni</cbc:StreetName>
<cbc:BuildingNumber>2313</cbc:BuildingNumber>
<cbc:PlotIdentification>21411</cbc:PlotIdentification>
<cbc:CitySubdivisionName>safa حى الصفا</cbc:CitySubdivisionName>
<cbc:CityName>Jeddah</cbc:CityName>
<cbc:PostalZone>21411</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SA</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<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-10-31</cbc:ActualDeliveryDate>
<cbc:LatestDeliveryDate>2024-10-31</cbc:LatestDeliveryDate>
</cac:Delivery>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">816.75</cbc:Amount>
<cac:TaxCategory>
<cbc:ID schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>15</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">376.54</cbc:TaxAmount>
</cac:TaxTotal>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">376.54</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">2510.25</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">376.54</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID schemeID="UN/ECE 5305">S</cbc:ID>
<cbc:Percent>15</cbc:Percent>
<cac:TaxScheme>
<cbc:ID schemeID="UN/ECE 5153">VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="SAR">2510.25</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="SAR">2510.25</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="SAR">2886.79</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="SAR">816.75</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID="SAR">0</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="SAR">2886.79</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="unit">0.6</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">60</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">9</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">69</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>فحص و عمل تقرير</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>15</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">100</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">0</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="Each">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">2450.25</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">367.54</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">2817.79</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>مجسم كامل,بوابة الماكينة</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>15</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="SAR">3267</cbc:PriceAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="SAR">816.75</cbc:Amount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
</Invoice>