IBR-157-OM

[IBR-157-OM] - Item net price (IBT-146) must equal (gross price (IBT-148) minus discount (IBT-147)) when gross price is provided.

About

ID
IBR-157-OM
Flag
fatal
Context
cac:InvoiceLine | cac:CreditNoteLine
Test
not(cac:Price/cac:AllowanceCharge/cbc:BaseAmount) or ( cac:Price/cbc:PriceAmount castable as xs:decimal and cac:Price/cac:AllowanceCharge/cbc:BaseAmount castable as xs:decimal and u:slack( xs:decimal(cac:Price/cbc:PriceAmount), xs:decimal( round( ( xs:decimal(cac:Price/cac:AllowanceCharge/cbc:BaseAmount) - sum(cac:Price/cac:AllowanceCharge/cbc:Amount/xs:decimal(.)) ) * 100 ) div 100 ), 0.02 ) )