BR-101-GST-SG

Total Amount excluding GST in SGD must be numeric and have maximum of 2 decimals

error: the document is invalid

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

Context
cac:AdditionalDocumentReference[cbc:DocumentTypeCode]
Test
(cbc:DocumentTypeCode='sgdtotal-excl-gst' and cbc:DocumentDescription castable as xs:decimal and string-length(substring-after(cbc:DocumentDescription,'.'))<=2) or cbc:DocumentTypeCode != 'sgdtotal-excl-gst'

Checked with PINT SG Invoice, PINT SG Credit Note