VRBL-INV-IT-1p2-73
Basic Info
|
Rule
|
When related to a VAT ID, the value of the Seller Tax Level Code must be contained in Regime Fiscale AGID [VRBL-CL-IT-RegimeFiscaleCode] (prefixed by 'VRBL:IT:'). |
|
Context
|
/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:TaxLevelCode
|
|
Pattern
|
vrbl-invoice-it-1p2 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
.
|
| codeList |
= |
$VRBL-IT-Prefix:$VRBL-CL-IT-RegimeFiscaleCode
|
Implementation
(
not(../cac:TaxScheme/cbc:ID = 'VAT')
)
or
(
not(boolean(.))
or
(
(
substring(normalize-space(.), 1, string-length($VRBL-IT-Prefix)) = $VRBL-IT-Prefix
and
not(
contains(
substring-after(normalize-space(.), $VRBL-IT-Prefix),
substring($VRBL-CL-IT-RegimeFiscaleCode, 1, 1)
)
)
and
contains(
$VRBL-CL-IT-RegimeFiscaleCode,
concat(
substring($VRBL-CL-IT-RegimeFiscaleCode, 1, 1),
substring-after(normalize-space(.), $VRBL-IT-Prefix),
substring($VRBL-CL-IT-RegimeFiscaleCode, 1, 1)
)
)
)
)
)