summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorjbw <jbw@odoo.com>2021-05-17 11:26:15 +0000
committerjbw <jbw@odoo.com>2021-05-18 13:21:02 +0000
commit5800f20ccf63ef8482d1460f46c8c5fe30eac822 (patch)
treece1e0afa3627ff0a7cacdc0256a5ccf0f58d962c /addons/web
parent487a28415ef036072cb5c39b2e914a826cdbbd51 (diff)
[FIX] account: fix reconcile rule percentage calculation
In https://github.com/odoo/odoo/pull/52529/commits/078a3a0f760ff24d02070a343f28d2249a8b5ba7#diff-c217a13a40a3cc27dc516b899793abecfac8cab9a42fed407d4776bcbc9de9a8R812 the way the percentage is calculated is changed. This implies that a reconciliation rule allowing a 90% matching amount will not allow to reconcile a 90$ bank statement with a 100$ invoice (as it will calculate the % as 88.89%, not meeting the required 90 %) After cited commit: invoice 200, bank statement 180: (|-180| - |20|) / |-180| * 100 = 88.89% invoice 200, bank statement 220: (|-220| - |-20|) / |-220| * 100 = 90.91% credit note 200, bank statement -180: (|180| - |-20|) / |180| * 100 = 88.89% credit note 200, bank statement -220: (|220| - |20|) / |220| * 100 = 90.91% Now: invoice 200, bank statement 180: 100 - |20| / |(-180 - 20)| * 100 = 90% invoice 200, bank statement 220: 100 - |-20| / |(-220 - -20)| * 100 = 90% credit note 200, bank statement -180: 100 - |-20| / |(180 - -20)| * 100 = 90% credit note 200, bank statement -220: 100 - |20| / |(220 - 20)| * 100 = 90% closes odoo/odoo#70948 Task: 2427089 Signed-off-by: William André (wan) <wan@odoo.com>
Diffstat (limited to 'addons/web')
0 files changed, 0 insertions, 0 deletions