Faktura

Calculation rules

BR-CO23 rules

Every total on an invoice is derived from something else, and these rules check the arithmetic. They are the most commonly hit family in practice, and almost always for the same reason: rounding each line for display while summing the unrounded values underneath.

BR-CO-03fatalValue added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive.
BR-CO-04fatalEach Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).
BR-CO-05fatalDocument level allowance reason code (BT-98) and Document level allowance reason (BT-97) shall indicate the same type of allowance.
BR-CO-06fatalDocument level charge reason code (BT-105) and Document level charge reason (BT-104) shall indicate the same type of charge.
BR-CO-07fatalInvoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason.
BR-CO-08fatalInvoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall indicate the same type of charge reason.
BR-CO-09fatalThe Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO co…
BR-CO-10fatalSum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131).
BR-CO-11fatalSum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92).
BR-CO-12fatalSum of charges on document level (BT-108) = Σ Document level charge amount (BT-99).
BR-CO-13fatalInvoice 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).
BR-CO-14fatalInvoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117).
BR-CO-15fatalInvoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).
BR-CO-16fatalAmount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114).
BR-CO-17fatalVAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.
BR-CO-18fatalAn Invoice shall at least have one VAT breakdown group (BG-23).
BR-CO-19fatalIf Invoicing period (BG-14) is used, the Invoicing period start date (BT-73) or the Invoicing period end date (BT-74) shall be filled, or both.
BR-CO-20fatalIf Invoice line period (BG-26) is used, the Invoice line period start date (BT-134) or the Invoice line period end date (BT-135) shall be filled, or both.
BR-CO-21fatalEach Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both.
BR-CO-22fatalEach Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both.
BR-CO-23fatalEach Invoice line allowance (BG-27) shall contain an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140), or both.
BR-CO-24fatalEach Invoice line charge (BG-28) shall contain an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145), or both.
BR-CO-26fatalIn order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identif…

← All rule families · Validate an invoice →