VRBL-INV-PL-B2B-3-46

Basic Info

Rule The Invoice Line Quantity must have a maximum of 16 digits before the decimal separator, and a maximum of 6 digits after the decimal separator.
Context /ubl:Invoice/cac:InvoiceLine/cbc:InvoicedQuantity
Pattern vrbl-invoice-pl-b2b-3p0
Severity fatal

Used Template: VRBL-NumberFormat

Parameter Value
probe = .
maxDigitsBeforeDecimalSeparator = 16
maxDigitsAfterDecimalSeparator = 6

Implementation

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