BR-FREXT-08

The rule sets below word this rule differently; each wording is shown with its rule set.

error: the document is invalid

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Message

Num Fact : … , Num line : … , BT-131 : … , SommeBT-131 : … , Subline Code : … - [BR-FREXT-08]-If the "Subtype of invoice line item" (EXT-FR-FE-163 / BT-X-8) has the value "GROUP" and if the "Invoice line net amount" (BT-131) is specified, it MUST correspond to the sum of the "Invoice line net amount" (BT-131) of the next lower level for which the "Subtype of the invoice line item" (EXT-FR-FE-163) has the value "DETAIL" or "GROUP".

Context
(cac:InvoiceLine|cac:CreditNoteLine)
Test
($isSublineGroup and cbc:LineExtensionAmount = $calculatedAmountBT131) or not($isSublineGroup)

Checked with France EXTENDED-CTC-FR (UBL)

Message

Num line : … , BT-131 : … , SommeBT-131 : … , Subline Code : … - [BR-FREXT-08]-If the "Subtype of invoice line item" (EXT-FR-FE-163 / BT-X-8) has the value "GROUP" and if the "Invoice line net amount" (BT-131) is specified, it MUST correspond to the sum of the "Invoice line net amount" (BT-131) of the next lower level for which the "Subtype of the invoice line item" (EXT-FR-FE-163) has the value "DETAIL" or "GROUP".

Context
//ram:IncludedSupplyChainTradeLineItem
Test
($isSublineGroup and ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount = $calculatedAmountBT131) or not($isSublineGroup)

Checked with France EXTENDED-CTC-FR (CII)