VRBL-INV-AU-1p0-48
Basic Info
|
Rule
|
The Legal Monetary Total Payable Amount must have a maximum of 13 digits before the decimal separator, and a maximum of 2 digits after the decimal separator. |
|
Context
|
/ubl:Invoice/cac:LegalMonetaryTotal
|
|
Pattern
|
vrbl-invoice-au-1p0 |
|
Severity
|
fatal |
Used Template: VRBL-NumberFormat
| Parameter |
|
Value |
| probe |
= |
cbc:PayableAmount
|
| maxDigitsBeforeDecimalSeparator |
= |
13
|
| maxDigitsAfterDecimalSeparator |
= |
2
|
Implementation
(
13
>=
string-length(
substring-before(
concat(
cbc:PayableAmount,
substring(
'.',
number(not(contains(cbc:PayableAmount, '.'))),
1
)
),
'.'
)
)
)
and
(
2
>=
string-length(
substring-after(
concat(
cbc:PayableAmount,
substring(
'.',
number(not(contains(cbc:PayableAmount, '.'))),
1
)
),
'.'
)
)
)