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.
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.
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.
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.
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.