VRBL-INV-JP-1p0-14

Basic Info

Rule When the Seller Group is Japanese, the value of the Invoice Line Tax ID must be contained in Tax Category ID [VRBL-CL-JP-TaxCategoryID]. Allowed values: AA, E, G, O, S. For more information visit: https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
Context /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID
Pattern vrbl-invoice-jp-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-JP-TaxCategoryID
showValues = true

Implementation

(
	not($JPSupplierCountry = 'JP')
)
or
(
	not(boolean(.))
	or
	(
		(
			not(
				contains(
					normalize-space(.),
					substring($VRBL-CL-JP-TaxCategoryID, 1, 1)
				)
			)
			and
			contains(
				$VRBL-CL-JP-TaxCategoryID,
				concat(
					substring($VRBL-CL-JP-TaxCategoryID, 1, 1),
					normalize-space(.),
					substring($VRBL-CL-JP-TaxCategoryID, 1, 1)
				)
			)
		)
	)
)