VRBL-INV-JP-1p0-8

Basic Info

Rule When the Seller is Japanese, then each Document Level Allowances must provide the Document Level Allowance Tax Category Code and the Document Level Allowance Tax Rate, except if the Document Level Allowances is outside the scope of tax.
Context /ubl:Invoice/cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']
Pattern vrbl-invoice-jp-1p0
Severity fatal

Implementation

not($JPSupplierCountry = 'JP')
or
(
	(
		../cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cac:TaxScheme/cbc:ID)='VAT' and cbc:ID='O']
		and
		not(cac:TaxCategory[normalize-space(cac:TaxScheme/cbc:ID)='VAT' and cbc:Percent])
	)
	or
	(
		cac:TaxCategory[normalize-space(cac:TaxScheme/cbc:ID)='VAT' and cbc:ID]
		and 
		cac:TaxCategory[normalize-space(cac:TaxScheme/cbc:ID)='VAT' and cbc:Percent]
	)
)