Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033742Openbravo ERPZ. Otherspublic2016-08-18 14:462016-09-08 21:36
ngarcia 
rqueralta 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q4 
aferraz
Core
No
0033742: UpdateCustomerBalance modulescript is not taking into account currency conversion
UpdateCustomerBalance modulescript is not taking into account currency conversion
In a version previous to 3.0PR15Q2:
   Check IsCustomerBalanceRestoredV2 preference does not exist
   Create 4 business partners, two customers and two vendors
   Set a price list with the same currency to them (EUR)
   Create a sales invoice for one of the customers
   Generate credit for the other customer (Payment In)
   Create a purchase invoice for one of the vendors
   Generate credit for the other vendor (Payment Out)
   Check the current balance in Business Partner window has been modified accordingly
   Change their currency to USD and check the current balance has been converted
   Update to a version newer than 3.0PR15Q4 and check the balance is the first one (the same than when the currency was EUR)
No tags attached.
? 33742.sql (948) 2016-09-08 16:44
https://issues.openbravo.com/file_download.php?file_id=9796&type=bug
Issue History
2016-08-18 14:46ngarciaNew Issue
2016-08-18 14:46ngarciaAssigned To => Triage Finance
2016-08-18 14:46ngarciaModules => Core
2016-08-18 14:46ngarciaResolution time => 1473285600
2016-08-18 14:46ngarciaTriggers an Emergency Pack => No
2016-08-19 09:19aferrazAssigned ToTriage Finance => rqueralta
2016-08-19 19:27rqueraltaStatusnew => scheduled
2016-08-23 10:44aferrazSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12884#r12884
2016-08-30 19:45rqueraltaNote Added: 0089557
2016-08-30 19:49rqueraltaNote Edited: 0089557bug_revision_view_page.php?bugnote_id=0089557#r12984
2016-09-06 18:47aferrazFile Added: 33742.sql
2016-09-07 17:15aferrazFile Deleted: 33742.sql
2016-09-08 16:43hgbotCheckin
2016-09-08 16:43hgbotNote Added: 0089847
2016-09-08 16:43hgbotStatusscheduled => resolved
2016-09-08 16:43hgbotResolutionopen => fixed
2016-09-08 16:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7cbdcc41916706c2efcb0232acc1ba06774d1ac0 [^]
2016-09-08 16:44aferrazReview Assigned To => aferraz
2016-09-08 16:44aferrazNote Added: 0089848
2016-09-08 16:44aferrazStatusresolved => closed
2016-09-08 16:44aferrazFixed in Version => 3.0PR16Q4
2016-09-08 16:44aferrazFile Added: 33742.sql
2016-09-08 16:45aferrazNote Added: 0089849
2016-09-08 21:36hudsonbotCheckin
2016-09-08 21:36hudsonbotNote Added: 0089858

Notes
(0089557)
rqueralta   
2016-08-30 19:45   
(edited on: 2016-08-30 19:49)
In a version previous to 3.0PR15Q2:

As F&B International Group Admin
  - Check IsCustomerBalanceRestoredV2 preference does not exist
  - Create 4 business partners, two customers and two vendors
  - Set a price list with the same currency to them (EUR)
  - Create a sales invoice for one of the customers
  - Generate credit for the other customer (Payment In)
  - Create a purchase invoice for one of the vendors
  - Generate credit for the other vendor (Payment Out)
  - Check the current balance in Business Partner window has been modified accordingly
  - Change their currency to USD
  - Check the current balance has been converted

Update to a version newer than 3.0PR15Q4

As F&B International Group Admin
  - Check the balance is the same than when the currency was converted to USD

(0089847)
hgbot   
2016-09-08 16:43   
Repository: erp/devel/pi
Changeset: 7cbdcc41916706c2efcb0232acc1ba06774d1ac0
Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu>
Date: Wed Sep 07 12:06:09 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/7cbdcc41916706c2efcb0232acc1ba06774d1ac0 [^]

Fixes issue 33742: UpdateCustomerBalance modulescript BP currency conversion

UpdateCurtomerBalance modulescript did not take in account the business partner
currency.Now if business partner currency and document currency are different,
the document amount is converted to the business partner currency.

---
M modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalanceData.class
M modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalance_data.xsql
M modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalanceData.java
---
(0089848)
aferraz   
2016-09-08 16:44   
Code review + Testing OK
(0089849)
aferraz   
2016-09-08 16:45   
Attached script to update Business Partner balance manually.
(0089858)
hudsonbot   
2016-09-08 21:36   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/bdb3e747cf46 [^]
Maturity status: Test