VRBL-INV-PT-2p1-195
Basic Info
|
Rule
|
The Invoice Line Quantity does not meet the defined format: decimal value with 3 decimal places and 13 unit places, than can be negative. |
|
Context
|
/ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity
|
|
Pattern
|
vrbl-invoice-pt-2p1 |
|
Severity
|
fatal |
Implementation
((substring(., 1, 1) = '-' and string-length(.) > 1) or (substring(., 1, 1) >= '0' and substring(., 1, 1) <= '9')) and
number(substring-before(., '.')) >= 0 and
string-length(substring-before(., '.')) <= 13 and
string-length(substring-after(., '.')) = 1
or
string-length(substring-after(., '.')) = 2 and
number(substring-after(., '.')) >= 0 and
contains(., '.') and
string-length(translate(., '-0123456789.', '')) = 0
or
not(contains(., '.'))