VRBL-INV-FR-CIUS-1p0-161

Basic Info

Rule When the Invoice Subtype Code represents a prepaid invoice, the Legal Monetary Total Payable Amount must equal 0.
Context /ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount
Pattern vrbl-invoice-fr-cius-1p0
Severity warning

Used Template: Equality

Parameter Value
DeactivateWhen = not(contains($VRBL-CL-FR-InvoiceSubtypeCode-Prepaid, concat(' ', substring-after(../../cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:InvoiceSubtypeCode, $VRBL-FR-Prefix), ' ')))
A = .
B = 0
NumberFormat = '0.00'
ErrorMessage = When the %{../../cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:InvoiceSubtypeCode} represents a prepaid invoice, the %{.} must equal 0.

Implementation

not(contains($VRBL-CL-FR-InvoiceSubtypeCode-Prepaid, concat(' ', substring-after(../../cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:InvoiceExtension/vrbl:InvoiceSubtypeCode, $VRBL-FR-Prefix), ' ')))
or
(
	(
		format-number(
			(
				(.)
				-
				(0)
			),
			'0.00'
		)
		=
		'0.00'
	)
	or
	(
		format-number(
			(
				(.)
				-
				(0)
			),
			'0.00'
		)
		=
		concat('-', '0.00')
	)
)