BR-FREXT-06
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 : … , Parent line : … , Subline Code : … - [BR-FREXT-06]-If the "Identifier of the parent line" (EXT-FR-FE-162) is used, the "Subtype of the invoice line item" (EXT-FR-FE-163) must be specified
(cac:InvoiceLine|cac:CreditNoteLine)
($isParentID and $isSublineCode) or not($isParentID)
Checked with France EXTENDED-CTC-FR (UBL)
For each item (BG-25), if the "ID of the parent line" (BT-X-304 / EXT-FR-FE-162) is used, the "Subtype of the invoice item" (BT-X-8 / EXT-FR-FE-163) must be specified."
//ram:IncludedSupplyChainTradeLineItem
$parentID ='' or ($parentID != '' and $subLineCode != '')
Checked with France EXTENDED-CTC-FR (CII)