VRBL-INV-EN16931-M-50
Basic Info
|
Rule
|
Exactly one Invoice Tax Subtotal Group marked as Reverse charge is required when Allowance Group, Charge Group or Invoice Line Group is marked as Reverse charge. |
|
Context
|
/ubl:Invoice/cac:TaxTotal[cbc:TaxAmount/@currencyID = ../cbc:DocumentCurrencyCode]
|
|
Pattern
|
vrbl-invoice-en16931-ubl-model |
|
Severity
|
fatal |
Used Template: VRBL-EN16931-TaxSubtotal-count
| Parameter |
|
Value |
| taxTypeCode |
= |
AE
|
| taxTypeName |
= |
Reverse charge
|
Implementation
not(
boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cac:TaxCategory[cbc:ID = 'AE'][cac:TaxScheme/cbc:ID = 'VAT'])
or
boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cac:TaxCategory[cbc:ID = 'AE'][cac:TaxScheme/cbc:ID = 'VAT'])
or
boolean(../cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[cbc:ID = 'AE'][cac:TaxScheme/cbc:ID = 'VAT'])
)
or
(
count(cac:TaxSubtotal[cac:TaxCategory/cbc:ID = 'AE' and cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']) = 1
and
(
boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'false']/cac:TaxCategory[cbc:ID = 'AE'][cac:TaxScheme/cbc:ID = 'VAT'])
or
boolean(../cac:AllowanceCharge[string(cbc:ChargeIndicator) = 'true']/cac:TaxCategory[cbc:ID = 'AE'][cac:TaxScheme/cbc:ID = 'VAT'])
or
boolean(../cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[cbc:ID = 'AE'][cac:TaxScheme/cbc:ID = 'VAT'])
)
)