All error codes › BR-CO-13
BR-CO-13 – Total without VAT is wrong
Erroren16931applies to Romanian e-Factura
What the rule says
Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).
How to fix it
Set it to: sum of line amounts - document allowances + document charges.
UBL: cac:LegalMonetaryTotal/cbc:TaxExclusiveAmount
Paste the XML and see every error with the exact fix and the correct amounts.
Where it is checked in the XML
Context: cac:LegalMonetaryTotal
Test (XPath):
((cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10) div 100 )) or (not(cbc:ChargeTotalAmount) and (cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) - xs:decimal(cbc:AllowanceTotalAmount)) * 10 * 10 ) div 100)) or ((cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = round((xs:decimal(cbc:LineExtensionAmount) + xs:decimal(cbc:ChargeTotalAmount)) * 10 * 10 ) div 100)) or (not(cbc:ChargeTotalAmount) and not(cbc:AllowanceTotalAmount) and (xs:decimal(cbc:TaxExclusiveAmount) = xs:decimal(cbc:LineExtensionAmount)))
Related rules
BR-CO-03Both VAT point date and date code givenBR-CO-04Invoice line without VAT categoryBR-CO-05Document level allowance reason code (BT-98) and Document level allowance reason (BT-97)…BR-CO-06Document level charge reason code (BT-105) and Document level charge reason (BT-104)…BR-CO-07Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139)…BR-CO-08Invoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall…BR-CO-09VAT ID without country prefixBR-CO-10Sum of line amounts is wrongBR-CO-11Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92)BR-CO-12Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99)BR-CO-14Total VAT is wrongBR-CO-15Total with VAT is wrong