Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030623
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajoralways2015-08-21 13:192015-10-01 03:36
ReportermaiteView Statuspublic 
Assigned Toaferraz 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisiond45d2896cfa6
ProjectionnoneETAnoneTarget Version3.0PR15Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesAdvanced Payables and Receivables Mngmt
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0030623: "deposit to" field in Add Payment process does not show all available financial accounts

Description"deposit to" field in Add Payment process does not show all available financial accounts
Steps To Reproduce1. Create new Financial Account for España org and currency USD. Access Payment Method tab and define any payment method
2. Create Price List for España org and currency USD. Add any product
3. Create Sales Invoice for España org, price list in USD and Payment Method available for Financial account. Add line and process
4. Run Add Payment process and realize that your financial account does not appear in "deposit to" combo
TagsNo tags attached.
Attached Filesdiff file icon issue-30623.diff [^] (2,045 bytes) 2015-09-09 17:13 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00307123.0PR15Q4 closedaferraz Payment Method not filled when running Add Payment From Invoice and business partner has not default Financial Account 
related to defect 00307193.0PR15Q4 closedaferraz Deposit To in Add Payment should only show financial accounts where selected payment method is active 
related to design defect 0030807 newTriage Platform Base review login in AdvancedQueryBuilder.substituteContextParameters 
related to defect 00306413.0PR15Q4 closedaferraz Payment Method not reloaded when setting Business Partner in Add Payment process from Transaction tab 

-  Notes
(0080016)
aferraz (manager)
2015-09-02 11:30

Selector query is correct and is the following:

@fin_paymentmethod_id@ is null
or exists (
select 1 from FinancialMgmtFinAccPaymentMethod fpm
join fpm.account as fa
where fpm.paymentMethod.id = @fin_paymentmethod_id@
and fa = e
and (case when @issotrx@ = 'true' then fpm.payinAllow else fpm.payoutAllow end) = true
and (@c_currency_id@ = fa.currency.id or (case when @issotrx@ = 'true' then fpm.payinIsMulticurrency else fpm.payoutIsMulticurrency end) = true)
and fpm.active = true)

The problem is while building the selector query in AdvancedQueryBuilder.java, when looking if @c_currency_id@ parameter is an ID in line 1222.

Although parameter is an ID, tabId is empty because selector is inside a Process Definition, so instead of getting @c_currency_id@ from Sales Invoice Header tab (where @c_currency_id@ is USD), it will be retrieved from context (where @c_currency_id@ is EUR).
(0080284)
alostale (manager)
2015-09-09 17:13

Value for c_currency_id parameter is tried to be obtained always from session because it is not part of the request coming from the parent tab (see DD 0030807).

Currency value would be obtained from request context (this is Sales Invoice Header) renaming it to @@inpcCurrencyId@.

See attached proposed fix.
(0080316)
aferraz (manager)
2015-09-10 13:18
edited on: 2015-09-14 12:53

Test plan:

As F&B Admin:

- Create new Financial Account for España org and currency USD. Access Payment Method tab and define "Al contado" payment method
- Create Sales Price List for España org and currency USD. Add any product
- Create Sales Invoice for España org, price list in USD and Payment Method available for Financial account. Add line and process
- Run Add Payment process and realize that your financial account appears in "deposit to" combo.

- Go to Financial Account Caja and set "Al Contado" payment method as payment in in multiple currencies allowed = true.
- Move back to created Sales Invoice and run Add Payment. Realize created financial account appears as default but if you click on selector "Caja" financial account also appears.

- Go to Financial Account Caja and set "Al Contado" payment method as default = true.
- Move to created Financial Account and set payment method as default = false.
- Move back to created Sales Invoice and run Add Payment. Realize "Caja" financial account appears as default but if you click on selector created financial account also appears.

- Go to Financial Account Caja and set "Al Contado" payment method as payment in allowed = false.
- Move back to created Sales Invoice and run Add Payment. Realize created financial account appears as default and if you click on selector "Caja" payment method does not appear anymore.

Repeat the same test opening Add Payment from Sales Order, Purchase Order and Purchase Invoice.

(0080367)
psanjuan (manager)
2015-09-14 13:02

All steps above have been successfully verified for Sales/Purchase order and Sales/Purchase Invoice.

Issue can be closed.
(0080371)
hgbot (developer)
2015-09-14 13:24

Repository: erp/devel/pi
Changeset: d45d2896cfa67aa2139e1cc9edbcc0f04f2b1aec
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Sep 10 12:55:34 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d45d2896cfa67aa2139e1cc9edbcc0f04f2b1aec [^]

Fixes issue 30623: Deposit to does not show all availabe Financial Accounts

Deposit To selector query in Add Payment process does not get correctly currency parameter. @inpcCurrencyId@ should be used instead of @c_currency_id@, in order to get document currency instead of context curreny.
Also, getFinancialAccountPaymentMethod method in AddPaymentDefaultValuesHandler has been updated to be similar to Payment Method (when calling from getDefaultPaymentMethod) and Deposit To (when calling from getDefaultFinancialAccount) selector queries:
It will take into account if current Payment Method allows payment in/out (depending on issotrx).
It will take into account if Financial Account currency is the same as document currency or if Financial Account allows multicurrency payment in/out (depending on issotrx) in case of Deposit To selector.
It will order by default field to retrieve first Payment Methods setted as default.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java
---
(0080372)
dmiguelez (developer)
2015-09-14 13:25

Code Review + Testing Ok
(0080390)
hudsonbot (developer)
2015-09-14 20:30

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/1b0f25004f74 [^]
Maturity status: Test
(0080711)
hgbot (developer)
2015-09-29 16:43

Repository: erp/devel/pi
Changeset: d57ecc399f7466ee494b75514a96a12b8185cdbe
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Sep 28 17:24:17 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d57ecc399f7466ee494b75514a96a12b8185cdbe [^]

Related to issue 30623: Check account is active

Check in getFinancialAccountPaymentMethod financial account is also active.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java
---
(0080762)
hudsonbot (developer)
2015-10-01 03: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/f63a11a49473 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-08-21 13:19 maite New Issue
2015-08-21 13:19 maite Assigned To => Triage Finance
2015-08-21 13:19 maite Modules => Core
2015-08-21 13:19 maite Resolution time => 1442959200
2015-08-21 13:19 maite Triggers an Emergency Pack => No
2015-08-21 13:19 maite Issue Monitored: networkb
2015-08-21 13:20 maite Modules Core => Advanced Payables and Receivables Mngmt
2015-08-28 07:20 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2015-09-01 19:26 aferraz Assigned To AtulOpenbravo => aferraz
2015-09-01 19:26 aferraz Status new => scheduled
2015-09-02 10:31 aferraz Relationship added related to 0030712
2015-09-02 10:31 aferraz Relationship added related to 0030719
2015-09-02 11:30 aferraz Note Added: 0080016
2015-09-02 11:31 aferraz Status scheduled => feedback
2015-09-02 11:31 aferraz Assigned To aferraz => platform
2015-09-02 11:31 aferraz Status feedback => new
2015-09-08 10:17 alostale Status new => scheduled
2015-09-08 10:17 alostale Assigned To platform => alostale
2015-09-08 10:17 alostale Review Assigned To => AugustoMauch
2015-09-09 17:13 alostale Note Added: 0080284
2015-09-09 17:13 alostale File Added: issue-30623.diff
2015-09-09 17:13 alostale Review Assigned To AugustoMauch =>
2015-09-09 17:13 alostale Status scheduled => feedback
2015-09-09 17:14 alostale Assigned To alostale => Triage Finance
2015-09-09 17:14 alostale Status feedback => new
2015-09-09 17:57 vmromanos Assigned To Triage Finance => aferraz
2015-09-10 08:05 alostale Relationship added related to 0030807
2015-09-10 09:58 aferraz Status new => scheduled
2015-09-10 12:56 aferraz Relationship added related to 0030641
2015-09-10 13:18 aferraz Note Added: 0080316
2015-09-14 11:36 psanjuan Note Edited: 0080316 View Revisions
2015-09-14 12:20 psanjuan Note Edited: 0080316 View Revisions
2015-09-14 12:21 psanjuan Note Edited: 0080316 View Revisions
2015-09-14 12:44 psanjuan Note Edited: 0080316 View Revisions
2015-09-14 12:53 psanjuan Note Edited: 0080316 View Revisions
2015-09-14 13:02 psanjuan Note Added: 0080367
2015-09-14 13:24 hgbot Checkin
2015-09-14 13:24 hgbot Note Added: 0080371
2015-09-14 13:24 hgbot Status scheduled => resolved
2015-09-14 13:24 hgbot Resolution open => fixed
2015-09-14 13:24 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d45d2896cfa67aa2139e1cc9edbcc0f04f2b1aec [^]
2015-09-14 13:25 dmiguelez Review Assigned To => dmiguelez
2015-09-14 13:25 dmiguelez Note Added: 0080372
2015-09-14 13:25 dmiguelez Status resolved => closed
2015-09-14 20:30 hudsonbot Checkin
2015-09-14 20:30 hudsonbot Note Added: 0080390
2015-09-29 16:43 hgbot Checkin
2015-09-29 16:43 hgbot Note Added: 0080711
2015-10-01 03:36 hudsonbot Checkin
2015-10-01 03:36 hudsonbot Note Added: 0080762


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker