VRBL-INV-FR-CIUS-1p0-53

Basic Info

Rule When the Invoice Subtype Code represents a special contract, the Invoice Line Group contains a Sub Invoice Line Group and the Tax Currency Code is provided, the Line Tax Amount In Tax Currency must exist within the Invoice Line Group.
Context /ubl:Invoice/cac:InvoiceLine
Pattern vrbl-invoice-fr-cius-1p0
Severity warning

Used Template: Exists

Parameter Value
probe = cac:TaxTotal[cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:TaxCurrencyCode]/cbc:TaxAmount

Implementation

(
	not($isSpecialContract) or not(boolean(cac:SubInvoiceLine)) or not(boolean(/ubl:Invoice/cbc:TaxCurrencyCode))
)
or
(
	boolean(cac:TaxTotal[cbc:TaxAmount/@currencyID = /ubl:Invoice/cbc:TaxCurrencyCode]/cbc:TaxAmount)
)