VRBL-INV-PT-2p1-254

Basic Info

Rule The Legal Monetary Total Tax Exclusive 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/cbc:TaxExclusiveAmount
Pattern vrbl-invoice-pt-2p1
Severity fatal

Used Template: VRBL-NumberFormat

Parameter Value
probe = .
maxDigitsBeforeDecimalSeparator = 13
maxDigitsAfterDecimalSeparator = 2

Implementation

(
	13
	>=
	string-length(
		substring-before(
			concat(
				.,
				substring(
					'.',
					number(not(contains(., '.'))),
					1
				)
			),
			'.'
		)
	)
)
and
(
	2
	>=
	string-length(
		substring-after(
			concat(
				.,
				substring(
					'.',
					number(not(contains(., '.'))),
					1
				)
			),
			'.'
		)
	)
)