when we have 2 line items like below
Line 1 - subtotal = 100.43 (100.434783), vat = 15.07, total = 115.50
Line 2 - subtotal = 100.43 (100.434783), vat = 15.07, total = 115.50
The total becomes like below
Invoice subtotal = 200.87, vat = 30.13, total = 231
so here we get line total and invoice total mismatch, but calculation is correct. what we do on this case?
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PostalAddress>
<cbc:StreetName>address 3az</cbc:StreetName>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>310298993344553</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName/>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">30.13</cbc:TaxAmount>
</cac:TaxTotal>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">30.13</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="SAR">200.87</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">30.13</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:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="SAR">200.87</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="SAR">200.87</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="SAR">231.00</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="SAR">0.0</cbc:AllowanceTotalAmount>
<cbc:PrepaidAmount currencyID="SAR">0.0</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="SAR">231.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>0</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">100.43</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">15.07</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">115.50</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>jjj</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.434783</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="PCE">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="SAR">100.43</cbc:LineExtensionAmount>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="SAR">15.07</cbc:TaxAmount>
<cbc:RoundingAmount currencyID="SAR">115.50</cbc:RoundingAmount>
</cac:TaxTotal>
<cac:Item>
<cbc:Name>علب حديد رباعية 7×7 raed 4×4</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.434783</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>