VRBL-DPA-MX-1p0-54

Basic Info

Rule The Dispatch Line Extension Amount must have no more decimals than allowed by the Dispatch Line Extension Amount Currency Code.
Context /ubl:DespatchAdvice/cac:DespatchLine/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:DespatchLineExtension/cbc:LineExtensionAmount
Pattern vrbl-despatchadvice-mx-1p0
Severity fatal

Used Template: DecimalsViaLookup

Parameter Value
probe = .
key = @currencyID
lookup = $VRBL-CL-MX-CurrencyCode-AllowedDecimals

Implementation

string-length(substring-after(., '.')) <= number(substring-before(substring-after($VRBL-CL-MX-CurrencyCode-AllowedDecimals, concat('|', @currencyID, ':')), '|'))