# aligned-ibrp-004

Source: https://xmlvalid.com/rules/aligned-ibrp-004

> Item net price (ibt-146) MUST equal (Gross price (ibt-148) - Price discount (ibt-147)) when gross price is provided.

- Level: error
- Rule sets: PINT AE rules (United Arab Emirates) 1.0.4
- 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))`

> Item net price (ibt-146) MUST equal (Gross price (ibt-148) - Price discount (ibt-147)) when gross price is provided.

- Level: error
- Rule sets: PINT A-NZ rules (Australia and New Zealand) 1.1.3
- Context: `cac:Price/cac:AllowanceCharge`
- Test: `not(cbc:BaseAmount) or xs:decimal(../cbc:PriceAmount) = xs:decimal(cbc:BaseAmount) - xs:decimal(cbc:Amount)`

Validate a document against these rules: https://xmlvalid.com/validate
