Early payments discounts

Rational

Some companies may offer early payments discounts to it’s customers in order to be reduce the payment days.

On tryton we can have the two cases:

  • The company is offering a discount to it’s customer for early payment.
  • A supplier offers the company a discount for early payment.

For both cases we should be able to compute:

  • The amount to be paid with the discount (if still aplicable)
  • The day until the discount is applicable.

This information should be normally included on the invoice report.

Proposal

Add a new module account_invoice_early_discount which will extend the payment term to include the following information:

  • The % of discount for early payment
  • The number of days until the discount is aplicable.
  • The write_off method to account the early discount.

On the invoice we will be show:

  • The early payment amount if applicable
  • The date until the discount applies

Once receiving a payment for the invoice, if the early discount is applicable the write_off method will be used to reconcile the discounted amount. This will generate the account move to record the discount amount as expense.

Implementation

I would drop early and make it generic enough that it can work for other condition than time.

I think it should allow to have multiple discounts for a payment term. Like 3% in 7 days, 2% in 14 days etc.

I think we could have just a single global configuration for the write_off.

We should care of multiple term. The reconciliation should work for early payment of each term.

Please do not forget that the accounting moves may differ whether or not paid in advance with cash discount (escompte de règlement/skonto)… and, in France at least, usually differ as well according to the type of purchase! That is, most frequently cash discounts directly affect purchase price and are not registered via a separate account.



But also on the supplier line, the amount to pay should be computed by applying the discount.

I’m wondering if the module should be only depending on invoice. I think we should be able to make it work with only accounting (or with other document than invoice). I see it similar to account_payment.

Then probably to name it account_invoice_payment_discount as the discount is only related to payment but not to a comercial discount.

2 Likes

I initialy thought that probably we should add a list of discounts to be aplicable but I’ve just found this odoo video explaining payment terms and i’ve discovered they declare discounts as a special type of payment term line, which uses a percent of the total amount to be paid.

I think this is a good setup as it allows to reuse the relativedeltas for declaring the due date of the discount providing a more flexible desing and allows to reuse the date logic computation.

Toughts?

For me, the video is wrong about the behavior of Odoo. The payment term as defined does not create a discount for early payment but just two terms (as the Tryton payment term).

But anyway, I think it will be a bad idea to mix the payment term and the payment discount because it will prevent (or make it more complex) to define multiple discount base on different payment delay.

About the duplication of relativedelta, the current model could be improved to allow to be linked to different models (instead of just the payment term line). So we could reuse it for the payment discount.

IMHO, this is a crucial feature. At least in Germany, early payment discounts are very common in business life. I can tell you the secret that our fellow friend @timitos has a solution for that - which may be a good base to start with.

Created Issue 11398 - and as ever I’m looking forward to do testing and usability review.

Edith:
This issue had already been created. Sorry for double posting.

Cheers,
Wolf

The issue already contains a patch for review. It will be great if you can test it and give some feedback about the current state.

To be honest for now we did not have the need of such module, but I will be happy to review your comments if you give some feedback of the current implementation.

I’m afraid, dealing with that kind of code is beyond my capabilities. But once a module is available, I’ll be happy to integrate it in my testing, and later into my productive env.

Sorry for my incompetence.
BTW: I applied for a class on python very basics at Volkshochschule. Let’s see… (-;

I will check it out in the next days. But for now how do I deal with early payment discounts manually?
Right now I tried the following:

  1. create write-off journal for early payments
  2. pay an invoice with the discounted amount
  3. create a write-off with the amount of 0
  4. add tax account to the write-off account statement and reduce the write-off amount by the taxes

Is there an easier way?

What you described is correct to manage early payments manually.
The idea of the module is to automate the need of creating write-off moves.