VRBL-INV-FR-CIUS-1p0-97

Basic Info

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

Used Template: VRBL-NumberFormat

Parameter Value
probe = .
maxDigitsBeforeDecimalSeparator = 19
maxDigitsAfterDecimalSeparator = 6

Implementation

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