Rules / ALIGNED-IBRP-004
ALIGNED-IBRP-004 error
Item net price when gross price is provided
Item net price (ibt-146) must equal (Gross price (ibt-148) - Price discount (ibt-147)) when gross price is provided.
Fails
<cac:AllowanceCharge>ABC 123</cac:AllowanceCharge>
Fix
Fix the value's format. The rule text says what shape it must have.
Schematron
- Context
cac:Price/cac:AllowanceCharge- Test
not(cbc:BaseAmount) or (../cbc:PriceAmount castable as xs:decimal and cbc:BaseAmount castable as xs:decimal and cbc:Amount castable as xs:decimal and xs:decimal(../cbc:PriceAmount) = xs:decimal(cbc:BaseAmount) - xs:decimal(cbc:Amount))
Official text: Item net price (ibt-146) MUST equal (Gross price (ibt-148) - Price discount (ibt-147)) when gross price is provided.