summaryrefslogtreecommitdiff
path: root/addons/project/data/web_planner_data.xml
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2017-02-08 17:50:28 +0100
committerDenis Ledoux <dle@odoo.com>2017-02-08 18:20:10 +0100
commit85b71441938c5fcc0927c5c230b33d3db4ae4291 (patch)
tree95f1e4851362fedf83a6b38aaddbeeb0ab8c4142 /addons/project/data/web_planner_data.xml
parentb8b1d1d0ab9bad96dfcd081b13e0e78d2881b5a3 (diff)
[FIX] account: invoice/payment reconciliation with a change of rate
The amount of the invoice in the payment currency was wrongly computed when a change of rate in the invoice currency occured between the invoice date and the payment date, when the invoice currency was neither the company currency nor the payment currency. e.g. Company in USD. Exchange rates: 07/02 08/02 HKD 7.0 8.0 EUR 0.90 0.94 Invoice: 100,000 HKD, date 07/02, worthing 100,000 / 7 = 14285,71 USD Payment: 13000 EUR, date 08/02, worthing 13000 / 0,94 = 13829,79 USD The invoice amount within the invoice currency was computed: 100,000 / 8 * 0.94 = 11750€ While the invoice, at the time of the invoice date, worth actually 14285.71 * 0.94 = 13428,57€ When the invoice, payment and companies are all different, the invoice amount in the payment currency must not be computed from the amount in the invoice currency computed at the invoice date to the payment currency, since the rate of the invoice currency changed, and the amount in the invoice currency at the time is no longer the same today. In simple words, `amount_currency` of the invoice was computed using the 7.0 rate e.g. 100,000 / 7 = 14285,71 while, when the rate changes, computing from the invoice currency to the payment currency, which are both different than the company currency it will first convert the amount to the company currency, using the new rate: e.g. 100,000 / 8 = 12500€ and then convert to the payment currency: e.g. 12500 * 0.94 = 11750€ opw-640248
Diffstat (limited to 'addons/project/data/web_planner_data.xml')
0 files changed, 0 insertions, 0 deletions