VRBL-INV-PEPPOL-PINT-121

Basic Info

Rule The Charge Group must have an Charge Amount.
Context /ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']
Pattern vrbl-invoice-peppol-pint
Severity fatal

Implementation

(
	boolean(cbc:Amount)
	and
	not(boolean(/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cbc:Amount))
)
or
boolean(/ubl:Invoice/cac:InvoiceLine/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cbc:Amount)