# BR-FREXT-08

Source: https://xmlvalid.com/rules/BR-FREXT-08

> 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".

- Level: error
- Rule sets: EXTENDED-CTC-FR rules (UBL) 1.4.0.04
- Context: `(cac:InvoiceLine|cac:CreditNoteLine)`
- Test: `($isSublineGroup and cbc:LineExtensionAmount = $calculatedAmountBT131) or not($isSublineGroup)`

> 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".

- Level: error
- Rule sets: EXTENDED-CTC-FR rules (CII) 1.4.0.04
- Context: `//ram:IncludedSupplyChainTradeLineItem`
- Test: `($isSublineGroup and ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount = $calculatedAmountBT131) or not($isSublineGroup)`

Validate a document against these rules: https://xmlvalid.com/validate
