VRBL-INV-MX-1p0-11
Basic Info
|
Rule
|
The value of the Payment Terms Payment Terms Extension Settlement Method must be contained in Payment Terms Code [VRBL-CL-MX-PaymentTermsCode] (prefixed by 'VRBL:MX:'). Allowed values: VRBL:MX:PPD, VRBL:MX:PUE. |
|
Context
|
/ubl:Invoice/cac:PaymentTerms/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:PaymentTermsExtension/vrbl:SettlementMethod
|
|
Pattern
|
vrbl-invoice-mx-1p0 |
|
Severity
|
fatal |
Used Template: CodeList
| Parameter |
|
Value |
| probe |
= |
.
|
| codeList |
= |
$VRBL-MX-Prefix:$VRBL-CL-MX-PaymentTermsCode
|
| showValues |
= |
true
|
Implementation
not(boolean(.))
or
(
(
substring(normalize-space(.), 1, string-length($VRBL-MX-Prefix)) = $VRBL-MX-Prefix
and
not(
contains(
substring-after(normalize-space(.), $VRBL-MX-Prefix),
substring($VRBL-CL-MX-PaymentTermsCode, 1, 1)
)
)
and
contains(
$VRBL-CL-MX-PaymentTermsCode,
concat(
substring($VRBL-CL-MX-PaymentTermsCode, 1, 1),
substring-after(normalize-space(.), $VRBL-MX-Prefix),
substring($VRBL-CL-MX-PaymentTermsCode, 1, 1)
)
)
)
)