In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present.
When ram:DuePayableAmount is positive, both a due date in ram:SpecifiedTradePaymentTerms/ram:DueDateDateTime and a payment terms description in ram:SpecifiedTradePaymentTerms/ram:Description are missing.
For a positive amount due, the invoice must state when payment is due or what payment terms apply. This gives the buyer the information needed to make the payment.
Your invoice has a positive amount due, but it does not say when or under what terms it must be paid. You can provide a due date or a description of the payment terms.
- Check the value of
DuePayableAmount. - In
AddTradePaymentTerms(...), provide either a due date or a description of the payment terms. - Generate the invoice again and validate it once more.
<ram:DuePayableAmount>100.00</ram:DuePayableAmount> <ram:SpecifiedTradePaymentTerms/>
<ram:DuePayableAmount>100.00</ram:DuePayableAmount> <ram:SpecifiedTradePaymentTerms> <ram:Description>Payable within 30 days</ram:Description> </ram:SpecifiedTradePaymentTerms>
FacturXInvoice.AddTradePaymentTerms(description, dueDate, paymentTermsType, dueDays, percentage, baseAmount, actualAmount, maturityDate)(BT-20)FacturXInvoice.ClearTradePaymentTerms()(BT-20)FacturXInvoice.DuePayableAmount(BT-115)FacturXInvoice.GetTradePaymentTerms()(BT-20)FacturXInvoice.PaymentTerms(BT-20)
Technical details
The test reports an error only when number(//ram:DuePayableAmount) > 0 and neither ram:DueDateDateTime nor ram:Description is present under ram:SpecifiedTradePaymentTerms. For a non-positive amount due, the condition is satisfied.
The rule applies at invoice level. It checks ram:DuePayableAmount and the payment terms in ram:SpecifiedTradePaymentTerms.
rule/@context)assert/@test)- 2022-11-152022-11-15 · AddedTest to monitor implementation of BR-CO-25