Write-Off payment when paying invoices


we are facing a problem, when paying invoices with discounted payment terms.
We have a discount of 2% defined when paying within 10 days. If the customer pays the invoice wihtin the 10 days, the wizard for paying the invoice just accepts the payment, without asking for the reamining value. After 10 days, we can choose how to write-off the difference or make a partial payment.

My question: How can we handle this? In the past (Tryton 3.6), we had a write-off defined and could use this in the wizard. Now ( Tryton 5.0 ) we have defined payment-methods and write-off methods.

I now see in the wizard coding, that there is the following rule for determining the asking for write-off or not ( modules/account_invoice: aeaca1267d06 invoice.py ):

  if (remainder == Decimal('0.0')
            and amount_invoice <= invoice.amount_to_pay):
        return 'pay'
  return 'ask'

Thank you and best regards,

What is exactly the problem?
For sure, Tryton does not yet support automatic discount on payment. But you can still define a specific write-off for when it is a discount on payment. Of course it will be just registered if the amount pay is exactly the value of a term. In this case, you must manually create the discount move (but it should be very odd that a term is exactly the same amount as the invoice amount minus the discount).

Perhaps, I misunderstood the concept of write-off and payment terms: We use payment terms to give the customers, the possibilty to pay less, when paying within 10 days. In the accounting, we need to book the difference between the full amount and the paid amount to a separate account. Therefore, we used the write-off journals in the past.

Now, when the invoice will be paid, the wizard takes the less amount and let the remaining open. How can we put this amount to the separate account, to close the whole invoice ( because, after paying, it’s still on state ‘posted’ ).

What we found out: if we pay the less amount within 11 days, we can use the rest with the write-off methods.

Thank you and best regards,

Payment terms have no discount on payment feature. So each term should normally be paid.
But you can always register the remaining amount as a write-off if you run the wizard with 0 as amount.

Ok, this solves our problem so far. But for the usability, it is quite misleading, because you need to pay twice ( 1st with the cash discounted amount, 2nd with 0€ to write-off the remaining ).
I check, if it is possible, to get around with a small fix (like the credit-note wizard for example) and will let you know.