diff options
| author | Laurent Smet <las@odoo.com> | 2018-03-22 09:19:10 +0100 |
|---|---|---|
| committer | Laurent Smet <las@odoo.com> | 2018-03-22 11:01:20 +0100 |
| commit | 7859dee4fc7250e73694d6479dc26385c3476cfe (patch) | |
| tree | 75ac4a3b1a258f95c26a70b2cf162792f90c9c6c /addons/web/static/src/js/views/basic | |
| parent | 168b3490cdc40bd9e0da4e79cca39a07b1ae8296 (diff) | |
[FIX] account: fix payment_difference computation
Bug introduced by https://github.com/odoo/odoo/commit/cdca5d4751a979f6b694f02d88160843f81a77f5
There is two problems:
- The payment difference is the difference between what you need to pay and what you pay.
=> The compute does the opposite.
- When the payment type is outbound, the payment amount is never negative.
=> Need to inverse the payment amount in the compute in this case.
E.G.
Suppose A a customer invoice of 25 and B a vendor bill of 50:
Payment on A will compute:
payment_type = 'inbound'
amount = 25
If you pay 20, the payment_difference computed was 20 - 25 = -5
It should be 25 - 20 = 5 instead.
Payment on B will compute:
payment_type = 'outbound'
amount = 50 (not -50!)
If you pay 40, the payment difference computed was 40 - (-50) = 10
It should be -50 - (-40) = -10 instead.
Diffstat (limited to 'addons/web/static/src/js/views/basic')
0 files changed, 0 insertions, 0 deletions
