[IBR-082-OM] - When Invoice transaction type (BTOM-001) is Profit margin invoice (XXXXXXXXX1XXXXXXXXXX) , then Total Amount Due (BTOM-020), should be provided and is mandatory and must be the sum of Total amount including VAT (BTOM-017).
IBR-082-OMubl:Invoice | cn:CreditNotenot($isProfitMargin) or ( cac:AdditionalDocumentReference[cbc:DocumentTypeCode='PM_TOTAL']/cbc:DocumentDescription castable as xs:decimal and u:slack( xs:decimal(cac:AdditionalDocumentReference[cbc:DocumentTypeCode='PM_TOTAL']/cbc:DocumentDescription), xs:decimal(sum($lines/cac:ItemPriceExtension/cbc:Amount/xs:decimal(.))), 0.02 ) )