Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019819Openbravo ERP09. Financial managementpublic2012-02-20 18:582012-06-12 11:21
gorkaion 
Sandrahuguet 
highmajoralways
closedfixed 
20Gentoo
3.0MP7 
3.0MP13 
Advanced Payables and Receivables Mngmt
No
0019819: Cannot add a GL Item on a Payment Out using multicurrency
While adding a GL Item line to a Payment Out on a currency different from the Financial Account.

It is not possible to select a converted amount and a conversion rate.

1. Add a payment method to a financial account that allow payments in foreign currencies.
2. Open the Add Details popup and select GL Items.
3. Notice that read only amount is zero.
4. Enter a converted amount
5. Conversion rate is changed to Infinity.00
6. Change conversion rate.
7. Converted amount is changed to 0.00
Probably, the actual converted amount should NOT be editable.
Please notice that also the currency of actual converted amount is an editable field, although it's in gray letters.
VMA-Reviewed
png Add Transaction.png (24,543) 2012-03-05 15:37
https://issues.openbravo.com/file_download.php?file_id=5052&type=bug
png
Issue History
2012-02-20 18:58gorkaionNew Issue
2012-02-20 18:58gorkaionAssigned To => vmromanos
2012-02-20 18:58gorkaionModules => Advanced Payables and Receivables Mngmt
2012-02-20 19:06dalsasuaProposed Solution updated
2012-02-22 17:28dalsasuaNote Added: 0045375
2012-02-22 17:29dalsasuaNote Edited: 0045375bug_revision_view_page.php?bugnote_id=0045375#r3192
2012-03-02 17:31dmitry_mezentsevNote Added: 0046017
2012-03-02 17:31dmitry_mezentsevPrioritynormal => immediate
2012-03-02 17:40dmitry_mezentsevTarget Version => 3.0MP9
2012-03-02 17:55dmitry_mezentsevTag Attached: Regression QA
2012-03-05 13:36vmromanosStatusnew => scheduled
2012-03-05 13:36vmromanosfix_in_branch => pi
2012-03-05 13:52vmromanosNote Added: 0046041
2012-03-05 15:37dmitry_mezentsevNote Added: 0046043
2012-03-05 15:37dmitry_mezentsevFile Added: Add Transaction.png
2012-03-05 16:15hgbotCheckin
2012-03-05 16:15hgbotNote Added: 0046047
2012-03-05 16:15hgbotStatusscheduled => resolved
2012-03-05 16:15hgbotResolutionopen => fixed
2012-03-05 16:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f1e598f4582487ecf8cd34cd5a6c03eff0b7f8f1 [^]
2012-03-05 16:25vmromanosNote Added: 0046049
2012-03-05 17:19gorkaionNote Added: 0046053
2012-03-05 18:49gorkaionNote Added: 0046058
2012-03-05 18:49gorkaionStatusresolved => closed
2012-03-05 19:28gorkaionNote Added: 0046059
2012-03-05 19:28gorkaionStatusclosed => new
2012-03-05 19:28gorkaionResolutionfixed => open
2012-03-05 19:34dmitry_mezentsevTag Detached: Regression QA
2012-03-05 19:37dmitry_mezentsevNote Added: 0046060
2012-03-05 19:37dmitry_mezentsevPriorityimmediate => high
2012-03-05 19:37dmitry_mezentsevSeveritycritical => major
2012-03-05 19:37dmitry_mezentsevfix_in_branchpi =>
2012-03-05 20:18dmitry_mezentsevTarget Version3.0MP9 =>
2012-03-06 04:06eintelauIssue Monitored: eintelau
2012-03-06 10:51hgbotCheckin
2012-03-06 10:51hgbotNote Added: 0046077
2012-04-01 20:37hudsonbotCheckin
2012-04-01 20:37hudsonbotNote Added: 0047034
2012-04-01 20:37hudsonbotCheckin
2012-04-01 20:37hudsonbotNote Added: 0047043
2012-04-11 11:26vmromanosTag Attached: VMA-Reviewed
2012-05-10 12:12gorka_gilAssigned Tovmromanos => mirurita
2012-06-01 12:13SandrahuguetNote Added: 0049575
2012-06-01 12:14SandrahuguetStatusnew => scheduled
2012-06-01 12:14SandrahuguetAssigned Tomirurita => Sandrahuguet
2012-06-01 12:14Sandrahuguetfix_in_branch => pi
2012-06-12 11:15hgbotCheckin
2012-06-12 11:15hgbotNote Added: 0049748
2012-06-12 11:15hgbotStatusscheduled => resolved
2012-06-12 11:15hgbotResolutionopen => fixed
2012-06-12 11:15hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/f1e598f4582487ecf8cd34cd5a6c03eff0b7f8f1 [^] => http://code.openbravo.com/erp/devel/pi/rev/299e47c77f045cf5ec404b2c14cb0e315974c04e [^]
2012-06-12 11:15hgbotCheckin
2012-06-12 11:15hgbotNote Added: 0049749
2012-06-12 11:21miruritaNote Added: 0049752
2012-06-12 11:21miruritaStatusresolved => closed
2012-06-12 11:21miruritaFixed in Version => 3.0MP13

Notes
(0045375)
dalsasua   
2012-02-22 17:28   
(edited on: 2012-02-22 17:29)
It seems OB object is not available in JS run of the pop-up window... Now the G/L Item field is not available at all :o( I can reproduce in live.builds

(0046017)
dmitry_mezentsev   
2012-03-02 17:31   
Guys,
Sth Critical should be Immediately fixed.
(0046041)
vmromanos   
2012-03-05 13:52   
The following fields should be readonly:
- Actual Converted
- Actual Converted Currency
- Exchange Rate
- Exchange Rate Currency

We will ensure all these fields can't be edited.
(0046043)
dmitry_mezentsev   
2012-03-05 15:37   
Victor,

The case that I can see shows to me that this Add Transactions pop-up is completely broken (it is sth related to the David´s note in this issue).

Even without multi-currency when I try to add Transaction to the Financial Account and select GL Item type of it then Add Transaction pop-up does not show GL Item drop-down list at all (see attach).

It works in MP7, MP8.
(0046047)
hgbot   
2012-03-05 16:15   
Repository: erp/devel/pi
Changeset: f1e598f4582487ecf8cd34cd5a6c03eff0b7f8f1
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Mar 05 16:12:16 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f1e598f4582487ecf8cd34cd5a6c03eff0b7f8f1 [^]

Fixed bug 19819: Payment Out/In multicurrency support
The following fields have been set to readonly:
- Actual Converted
- Actual Converted Currency
- Exchange Rate
- Exchange Rate Currency

This change affects Payment In and Payment Out popups, since
it has no sense to allow users to edit these fields when adding
details.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
---
(0046049)
vmromanos   
2012-03-05 16:25   
No regression risk.

Test plan I:
1. Add a payment method to a financial account that allow payments in/out in foreign currencies.
2. Go to Payment Out window. Create a new record for the previous payment method. Set Currency= AED. Set Exchange rate=2
3. Open the Add Details popup and select GL Items.
4. Verify amount=0, actual converted=0, exchange rate=2. All these fields should be readonly, you should not be allowed to modify them
5. Select Gl/Item transaction
6. Select any GL/Item (probably you should create one first)
7. Enter 10 in Paid out field
8. Press Add
9. Verify amount=10, actual converted=20, exchange rate=2
10. Press Process button

Test plan II:
1. Add a payment method to a financial account that allow payments in/out in foreign currencies.
2. Go to Payment In window. Create a new record for the previous payment method. Set Currency= AED. Set Exchange rate=2
3. Open the Add Details popup and select GL Items.
4. Verify amount=0, actual converted=0, exchange rate=2. Last two fields should be readonly, you should not be allowed to modify them
5. Change amount = 50
6. Verify amount = 50, actual converted=100, exchange rate=2
5. Select Gl/Item transaction
6. Select any GL/Item (probably you should create one first)
7. Enter 50 in Received in field
8. Press Add
10. Press Process Button
(0046053)
gorkaion   
2012-03-05 17:19   
Dmitry, the screenshot attached is from a different window.

This issue is in the Add Details popup of Payment Out window. Your screenshot is of the Add Transasction popup of the Financial Account window. That missing selector might be related to the issue reported in 0019942
(0046058)
gorkaion   
2012-03-05 18:49   
tested and reviewed
(0046059)
gorkaion   
2012-03-05 19:28   
Actual converted and exchange rate should not be read only.
(0046060)
dmitry_mezentsev   
2012-03-05 19:37   
Clarified that there are 2 issues here and this one is not Critical / Immediate.
(0046077)
hgbot   
2012-03-06 10:51   
Repository: erp/devel/pi
Changeset: feea371b1bd8d725f8d6784b5d3b371cdf48c6a7
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Mar 06 10:51:08 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/feea371b1bd8d725f8d6784b5d3b371cdf48c6a7 [^]

Issue 19819: rollback, wrong solution
These fields should be editable

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
---
(0047034)
hudsonbot   
2012-04-01 20:37   
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/640de9acc2d5 [^]

Maturity status: Test
(0047043)
hudsonbot   
2012-04-01 20:37   
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/640de9acc2d5 [^]

Maturity status: Test
(0049575)
Sandrahuguet   
2012-06-01 12:13   
Test plan I:
-Go to financial account, select bank account 1
-Navigate to payment method, select wire transfer
  -Receive Payments in Multiple Currencies=yes
  -Make Payments in Multiple Currencies=yes
-Go to Payment In:
  -Payment method: wire transfer
  -Deposit to: USD - Bank - Account 1
  -Amount: 0.00
  -Currency: EUR
  -Received:0.00
  -Exchange rate: 1.36
  -Click in Add Details
  -Verify amount=0, actual converted=0, exchange rate=1.36 and select transaction type GL Items
  -Enter a converted amount= 100, verify that actual payment in=0 and exchange rate=1.36


Test plan II:
-Go to financial account, select bank account 1
-Navigate to payment method, select wire transfer
  -Receive Payments in Multiple Currencies=yes
  -Make Payments in Multiple Currencies=yes
-Go to Payment Out:
  -Payment method: wire transfer
  -Deposit to: USD - Bank - Account 1
  -Currency: EUR
  -Received:0.00
  -Exchange rate: 1.36
  -Click in Add Details
  -Verify amount=0, actual converted=0, exchange rate=1.36 and select transaction type GL Items
  -Enter a converted amount= 100, verify that actual payment in=0 and exchange rate=1.36
(0049748)
hgbot   
2012-06-12 11:15   
Repository: erp/devel/pi
Changeset: 299e47c77f045cf5ec404b2c14cb0e315974c04e
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Fri Jun 01 10:43:35 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/299e47c77f045cf5ec404b2c14cb0e315974c04e [^]

Fixed bug 19819 Add logic to catch division by 0 in Add details
Add logic to catch division by 0 when change actual converted
in Add Details in Payment In window.

---
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js
---
(0049749)
hgbot   
2012-06-12 11:15   
Repository: erp/devel/pi
Changeset: a6672f4c690324287cc0b503e519e9165e24d6fb
Author: Mikel Irurita <mikel.irurita <at> openbravo.com>
Date: Tue Jun 12 10:18:59 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6672f4c690324287cc0b503e519e9165e24d6fb [^]

Related to issue 19819: code review, use js compare method

---
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js
---
(0049752)
mirurita   
2012-06-12 11:21   
code review + testing OK

Prevent a division by zero.

Having the actual payment = 0, if you modify the converted amount then you don't get a Infinity on conversion rate field.