VRBL-INV-FR-CIUS-1p0-62

Basic Info

Rule The Allowance Charge Base Amount must have a maximum of 19 digits before the decimal separator, and a maximum of 2 digits after the decimal separator.
Context /ubl:Invoice/cac:AllowanceCharge/cbc:BaseAmount
Pattern vrbl-invoice-fr-cius-1p0
Severity warning

Used Template: VRBL-NumberFormat

Parameter Value
probe = .
maxDigitsBeforeDecimalSeparator = 19
maxDigitsAfterDecimalSeparator = 2

Implementation

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