Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) + Rounding amount (BT-114) + Sum of Charge amount collected on behalf of a third party (BT-179).
DuePayableAmount does not equal GrandTotalAmount minus TotalPrepaidAmount, plus RoundingAmount and the sum of the ActualAmount values in SpecifiedFinancialAdjustment.
The amount due is the invoice total including VAT minus amounts already paid. Rounding and charges collected on behalf of a third party are then taken into account.
The amount in DuePayableAmount does not match the other settlement totals. The amount due can be determined from the amounts provided.
- Compare
DuePayableAmountwithGrandTotalAmountminusTotalPrepaidAmount. - Also include
RoundingAmountand theActualAmountvalues ofFinancialAdjustment. - Check the values in
DuePayableAmount,GrandTotalAmount,TotalPrepaidAmount,RoundingAmountandFinancialAdjustment.ActualAmount. - Generate the invoice again and validate it once more.
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:GrandTotalAmount>100</ram:GrandTotalAmount> <ram:TotalPrepaidAmount>20</ram:TotalPrepaidAmount> <ram:RoundingAmount>1</ram:RoundingAmount> <ram:DuePayableAmount>80</ram:DuePayableAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation> <ram:GrandTotalAmount>100</ram:GrandTotalAmount> <ram:TotalPrepaidAmount>20</ram:TotalPrepaidAmount> <ram:RoundingAmount>1</ram:RoundingAmount> <ram:DuePayableAmount>81</ram:DuePayableAmount> </ram:SpecifiedTradeSettlementHeaderMonetarySummation>
FacturXInvoice.DuePayableAmount(BT-115)FacturXInvoice.GrandTotalAmount(BT-112)FacturXInvoice.RoundingAmount(BT-114)FacturXInvoice.TotalPrepaidAmount(BT-113)FinancialAdjustment.ActualAmount(SpecifiedFinancialAdjustment: BT-179)
Technical details
The XPath compares DuePayableAmount with a decimal expression using the sums of the specified amounts; missing values in the sums contribute zero.
The rule applies to the amounts in SpecifiedTradeSettlementHeaderMonetarySummation and to SpecifiedFinancialAdjustment in the enclosing settlement context.
rule/@context)assert/@test)