Ali Alfie (alal) f5f13b3ebc [FIX] account: wrong quick encoding calculation with cash discount
Before: when using the quick encoding feature on an invoice or bill with payment term containing an early payment discount and the epd computation is set to "Always (upon invoice)", the calculation was done incorrectly.

Example: if you invoice a 100€ product with a 21% tax with a 2% cash discount, the total of the invoice will be 120.58 (the 21% is calculated on 98€ (100€*2%) which is 20.28€).
In our case, if you tried to calculate suggestions from a quick encoding value of 120.58, the calculation would calculate the untaxed amount from the 120.58 based on the 21% tax without applying the 2% discount.

After: when calculating the suggestions check if an early discount is set on the payment term and the epd computation is set to "mixed" ("Always (upon invoice)") and if so, apply the discount to the tax before calculating the untaxed amount from the total.

task-3339223

closes odoo/odoo#125505

X-original-commit: 162443f1ad913a0388bea60f04ff140e75fdb0ed
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-17 08:00:07 +02:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%