VRBL-INV-TR-1p2-25

Basic Info

Rule The Withholding Tax Subtotal Tax Percent is not valid for the given Withholding Tax Subtotal Category Scheme ID.
Context /ubl:Invoice/cac:WithholdingTaxTotal/cac:TaxSubtotal/cac:TaxCategory/cbc:Percent
Pattern vrbl-invoice-tr-1p2
Severity fatal

Implementation

not(boolean(../cac:TaxScheme/cbc:ID)) or
contains(
	$VRBL-CL-TR-Withholding-PercentTaxType,
	concat(
		substring($VRBL-CL-TR-Withholding-PercentTaxType, 1, 1),
		concat(
			substring-after(normalize-space(../cac:TaxScheme/cbc:ID), $VRBL-TR-Prefix),
			$Withholding-PercentTaxTypeSeparator,
			normalize-space(.)
		),
		substring($VRBL-CL-TR-Withholding-PercentTaxType, 1, 1)
	)
)