BR-FREXT-08
The rule sets below word this rule differently; each wording is shown with its rule set.
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.
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".
(cac:InvoiceLine|cac:CreditNoteLine)
($isSublineGroup and cbc:LineExtensionAmount = $calculatedAmountBT131) or not($isSublineGroup)
Checked with France EXTENDED-CTC-FR (UBL)
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".
//ram:IncludedSupplyChainTradeLineItem
($isSublineGroup and ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount = $calculatedAmountBT131) or not($isSublineGroup)
Checked with France EXTENDED-CTC-FR (CII)