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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030206
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementcriticalalways2015-06-18 17:262016-02-02 09:33
ReporterVictorVillarView Statuspublic 
Assigned Toaferraz 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision051a7473f534
ProjectionnoneETAnoneTarget Version3.0PR15Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2015-04-07
Regression introduced in release3.0PR15Q1.3
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/58b1503188be73811b4885798fae1d31bd337076 [^]
Triggers an Emergency PackYes
Summary

0030206: Wrong payment status under some circumstancies

DescriptionWrong payment status under some circumstancies.

If you are using Automatic Deposit: Yes - Execution Type: Automatic and Execution Process: Simple Execution Process in your payment method and you complete a Payment In (the same in Payment Out) the status is Payment Received and it is wrong, it should be Deposited not cleared
Steps To ReproduceConfigure the Payment method: Wire Transfer (see the screenshot attached):
Automatic Deposit: Yes - Execution Type: Automatic and Execution Process: Simple Execution Process

Go to Payment In window:
 Organization: US
 create a new one for Healthy Food Supermarkets
 Amount: 20
Click on Add details button.
   Add a GL Item and received amount: 20
Click on Done

Realise that the payment status is Payment Received and it is wrong, it should be Deposited not cleared.

The same is happening with Payments Outs.


Note: It is working fine with the following configuration:
 * Automatic deposit: Yes - Execution Type: Manual
 * Automatic deposit: Yes - Execution Type: Automatic - Execution process: Simple execution process - Deferred: yes


TagsNo tags attached.
Attached Filespng file icon payment_method_automatic.png [^] (160,372 bytes) 2015-06-18 17:40

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00301433.0PR15Q3 closedvmromanos It is not possible to deposit more than one payment at the same time after 3.0PR14Q4 
depends on backport 00302303.0PR15Q2.3 closedaferraz Wrong payment status under some circumstancies 
depends on backport 00302313.0PR15Q1.6 closedaferraz Wrong payment status under some circumstancies 
caused by defect 0029464 closedvmromanos NullPointerException error when Adding Payment from Match Statement process and working with Automatic Payment Method 

-  Notes
(0078374)
VictorVillar (developer)
2015-06-18 17:29

Necessary a script to fix the inconsistent data:
   - change the status to the right one
   - create the financial transactions: currently it is not possible to deposit more than one payment at the same time after 3.0PR14Q4 [1] so it is unfeasible to do it using the UI.

[1] https://issues.openbravo.com/view.php?id=30143 [^]
(0078429)
aferraz (manager)
2015-06-23 13:13

No modulescript will be needed to fix data due to issue [1] will be fixed and will allow to create transactions manually, which will also fix the status of payments.

[1] https://issues.openbravo.com/view.php?id=30143 [^]
(0078436)
aferraz (manager)
2015-06-23 16:08

Test plan:

Configure the Payment method: Wire Transfer (see the screenshot attached):
Automatic Deposit: Yes - Execution Type: Automatic and Execution Process: Simple Execution Process

Go to Payment In window:
 Organization: US
 create a new one for Healthy Food Supermarkets
 Amount: 20
Click on Add details button.
   Add a GL Item and received amount: 20
Click on Done

Realise that the payment status is Deposited not cleared.

Repeat the same flow with Payment Out.
(0078458)
vmromanos (manager)
2015-06-23 18:50
edited on: 2016-03-11 12:46

Query to detect payments missing its transaction (this only works if the payment method definition in the financial account hasn't been updated!):

select count(*)
from fin_payment p
where p.isreceipt = 'N'
and p.status = 'PPM'
and not exists (select 1 from fin_finacc_transaction t
                where t.FIN_FINANCIAL_ACCOUNT_ID = p.FIN_FINANCIAL_ACCOUNT_ID
                and p.fin_payment_id = t.fin_payment_id)
and exists (select 1
            from fin_finacc_paymentmethod pm
            where p.fin_paymentmethod_id = pm.fin_paymentmethod_id
            and pm.PAYOUT_EXECUTION_TYPE = 'A'
                and pm.payOUT_execution_process_id is not null
                and pm.payOUT_deferred = 'N'
                and pm.automatic_withdrawn = 'Y'
                and pm.FIN_FINANCIAL_ACCOUNT_ID = p.FIN_FINANCIAL_ACCOUNT_ID
            )
and p.amount <> 0



select count(*)
from fin_payment p
where p.isreceipt = 'Y'
and p.status = 'RPR'
and not exists (select 1 from fin_finacc_transaction t
                where t.FIN_FINANCIAL_ACCOUNT_ID = p.FIN_FINANCIAL_ACCOUNT_ID
                and p.fin_payment_id = t.fin_payment_id)
and exists (select 1
            from fin_finacc_paymentmethod pm
            where p.fin_paymentmethod_id = pm.fin_paymentmethod_id
            and pm.PAYIN_EXECUTION_TYPE = 'A'
                and pm.payin_execution_process_id is not null
                and pm.payin_deferred = 'N'
                and pm.automatic_deposit = 'Y'
                and pm.FIN_FINANCIAL_ACCOUNT_ID = p.FIN_FINANCIAL_ACCOUNT_ID
            )
and p.amount <> 0

(0078470)
hgbot (developer)
2015-06-24 10:14

Repository: erp/devel/pi
Changeset: 051a7473f53478355fd50cc42817324ef7fdb056
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Jun 23 12:52:47 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/051a7473f53478355fd50cc42817324ef7fdb056 [^]

Fixes issue 30206: Wrong payment status under some circumstancies

comingFrom internal parameter in FIN_PaymentProcess.java was always setted to "TRANSACTION" instead of using received comingFrom value, when Automatic Deposit/Withdrawn was activated and execution type was Automatic and not Deferred.
Because of that, transaction was not created when creating a payment from Payment In or Payment Out with this configuration.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0078473)
vmromanos (manager)
2015-06-24 10:15

Code review + testing OK
(0078516)
hudsonbot (developer)
2015-06-25 17:59

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/65f6b2e875a7 [^]
Maturity status: Test
(0083798)
hgbot (developer)
2016-02-02 09:33

Repository: tools/automation/int
Changeset: 28b79b73f30cbd913a3ba86bb48c3a422e97ac1f
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 15 17:26:34 2015 +0200
URL: http://code.openbravo.com/tools/automation/int/rev/28b79b73f30cbd913a3ba86bb48c3a422e97ac1f [^]

Related to issue 30206: Added some automated tests

---
M src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/paymentin/PaymentInTab.java
M src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/paymentout/PaymentOutTab.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/build.xml
M src-test/com/openbravo/test/integration/erp/testscripts/financial/receivablespayables/transactions/PaymentIn.java
M src-test/com/openbravo/test/integration/erp/testscripts/financial/receivablespayables/transactions/PaymentOut.java
A src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/paymentin/ExecutePaymentInPopUp.java
A src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/paymentout/ExecutePaymentOutPopUp.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression002.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression003.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression004.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression005.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression006.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression007.java
---

- Issue History
Date Modified Username Field Change
2015-06-18 17:26 VictorVillar New Issue
2015-06-18 17:26 VictorVillar Assigned To => Triage Finance
2015-06-18 17:26 VictorVillar Modules => Core
2015-06-18 17:26 VictorVillar Resolution time => 1434664800
2015-06-18 17:26 VictorVillar Regression level => Production - Confirmed Stable
2015-06-18 17:26 VictorVillar Triggers an Emergency Pack => No
2015-06-18 17:26 VictorVillar Issue Monitored: networkb
2015-06-18 17:29 VictorVillar Note Added: 0078374
2015-06-18 17:39 VictorVillar File Added: payment_method.png
2015-06-18 17:40 VictorVillar File Deleted: payment_method.png
2015-06-18 17:40 VictorVillar File Added: payment_method_automatic.png
2015-06-18 17:43 VictorVillar Steps to Reproduce Updated View Revisions
2015-06-19 12:19 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2015-06-19 12:19 AtulOpenbravo Status new => scheduled
2015-06-19 12:22 VictorVillar Triggers an Emergency Pack No => Yes
2015-06-22 20:38 AtulOpenbravo Regression date => 2015-04-01
2015-06-22 20:38 AtulOpenbravo Regression introduced in release => 3.0PR15Q1.3
2015-06-22 20:38 AtulOpenbravo Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/9b344a0c8a62 [^]
2015-06-22 20:38 AtulOpenbravo Relationship added caused by 0029498
2015-06-23 12:20 aferraz Regression date 2015-04-01 => 2015-04-07
2015-06-23 12:20 aferraz Regression introduced in release 3.0PR15Q1.3 => pi
2015-06-23 12:20 aferraz Regression introduced by commit https://code.openbravo.com/erp/devel/pi/rev/9b344a0c8a62 [^] => https://code.openbravo.com/erp/devel/pi/rev/58b1503188be73811b4885798fae1d31bd337076 [^]
2015-06-23 12:22 aferraz Regression introduced in release pi => main
2015-06-23 12:53 aferraz Relationship deleted caused by 0029498
2015-06-23 12:54 aferraz Relationship added caused by 0029464
2015-06-23 12:56 aferraz Assigned To AtulOpenbravo => aferraz
2015-06-23 12:57 aferraz Status scheduled => acknowledged
2015-06-23 12:57 aferraz Status acknowledged => scheduled
2015-06-23 13:10 aferraz Relationship added related to 0030143
2015-06-23 13:13 aferraz Note Added: 0078429
2015-06-23 16:08 aferraz Note Added: 0078436
2015-06-23 18:50 vmromanos Note Added: 0078458
2015-06-23 18:55 vmromanos Note Edited: 0078458 View Revisions
2015-06-24 10:14 hgbot Checkin
2015-06-24 10:14 hgbot Note Added: 0078470
2015-06-24 10:14 hgbot Status scheduled => resolved
2015-06-24 10:14 hgbot Resolution open => fixed
2015-06-24 10:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/051a7473f53478355fd50cc42817324ef7fdb056 [^]
2015-06-24 10:15 vmromanos Review Assigned To => vmromanos
2015-06-24 10:15 vmromanos Note Added: 0078473
2015-06-24 10:15 vmromanos Status resolved => closed
2015-06-25 17:59 hudsonbot Checkin
2015-06-25 17:59 hudsonbot Note Added: 0078516
2015-07-08 11:24 vmromanos Regression introduced in release main => 3.0PR15Q1.3
2016-02-02 09:33 hgbot Checkin
2016-02-02 09:33 hgbot Note Added: 0083798
2016-03-11 12:46 vmromanos Note Edited: 0078458 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker