Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035477Openbravo ERP09. Financial managementpublic2017-03-10 10:492018-02-22 17:24
ngarcia 
markmm82 
immediateminoralways
closedfixed 
5
 
3.0PR17Q2 
aferraz
Core
Production - Confirmed Stable
2014-09-23
3.0PR14Q4
https://code.openbravo.com/erp/devel/pi/rev/66e8497a06cb [^]
No
0035477: It is possible to create a bank fee transaction in financial account with both deposit and withdrawal amount different from 0
It is possible to create a bank fee transaction in financial account with both deposit and withdrawal amount different from 0
As group admin role:

1. Create a new record in Financial Account - Transaction tab
   Set Transaction Type as Bank fee
   Set a value different from 0 in the Deposit Amount field
   Set a value different from 0 in the Withdrawal Amount field
   Check you can save and process it and you should not

2. Select a Financial Account with a Matching Algorithm defined
   Create a record in Imported Bank Statements record
   Add a line to it and process it
   Click on Match Statement process button
   Cancel the algorithm to be run
   Add a new transaction (+ button in Match column)
   Set Transaction Type as Bank fee
   Check the amount is reset to 0 (See note)
   Set a value different from 0 in the Deposit Amount field
   Set a value different from 0 in the Withdrawal Amount field
   Check you can process it and you should not
No tags attached.
depends on backport 00356263.0PR17Q1.1 closed markmm82 It is possible to create a bank fee transaction in financial account with both deposit and withdrawal amount different from 0 
depends on backport 00356273.0PR16Q4.4 closed markmm82 It is possible to create a bank fee transaction in financial account with both deposit and withdrawal amount different from 0 
caused by feature request 00293903.0PR14Q4 closed Sandrahuguet Reconciliation refactor project 
Issue History
2017-03-10 10:49ngarciaNew Issue
2017-03-10 10:49ngarciaAssigned To => Triage Finance
2017-03-10 10:49ngarciaModules => Core
2017-03-10 10:49ngarciaResolution time => 1490911200
2017-03-10 10:49ngarciaTriggers an Emergency Pack => No
2017-03-10 10:49ngarciaIssue Monitored: networkb
2017-03-10 10:52ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14767#r14767
2017-03-10 10:55ngarciaNote Added: 0094904
2017-03-12 17:22markmm82Assigned ToTriage Finance => luisrs8608
2017-03-21 15:52luisrs8608Statusnew => scheduled
2017-03-27 23:01markmm82Assigned Toluisrs8608 => markmm82
2017-03-27 23:28markmm82Regression level => Production - Confirmed Stable
2017-03-27 23:28markmm82Regression date => 2015-05-06
2017-03-27 23:28markmm82Regression introduced in release => 3.0PR15Q1.3
2017-03-27 23:28markmm82Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/66e8497a06cb [^]
2017-03-27 23:28markmm82Statusscheduled => acknowledged
2017-03-27 23:29markmm82Statusacknowledged => scheduled
2017-03-28 12:38aferrazRelationship addedcaused by 0029390
2017-03-28 12:41aferrazRegression date2015-05-06 => 2014-09-23
2017-03-28 12:41aferrazRegression introduced in release3.0PR15Q1.3 => 3.0PR14Q4
2017-03-28 15:24markmm82Note Added: 0095605
2017-03-28 20:41aferrazSeveritymajor => minor
2017-03-29 09:15hgbotCheckin
2017-03-29 09:15hgbotNote Added: 0095618
2017-03-29 09:15hgbotStatusscheduled => resolved
2017-03-29 09:15hgbotResolutionopen => fixed
2017-03-29 09:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0189da80e6698ff7777ac325d425dbcd2cf75315 [^]
2017-03-29 09:17aferrazReview Assigned To => aferraz
2017-03-29 09:17aferrazNote Added: 0095622
2017-03-29 09:17aferrazStatusresolved => closed
2017-03-29 09:17aferrazFixed in Version => 3.0PR17Q2
2017-03-29 15:06hudsonbotCheckin
2017-03-29 15:06hudsonbotNote Added: 0095652
2018-02-22 17:24hgbotCheckin
2018-02-22 17:24hgbotNote Added: 0102633

Notes
(0094904)
ngarcia   
2017-03-10 10:55   
Changing the transaction type to Bank fee is setting to 0 both amount fields and you loose the already introduced amount (the bank statement amount in case of creating the transaction from match statement window). Could this also be analyzed when solving this issue?
(0095605)
markmm82   
2017-03-28 15:24   
Test Plan 1: Testing Financial Account - Transaction tab
1. Create a new record in Financial Account - Transaction tab
   Set Transaction Type as Bank fee
   Set a value different from 0 in the Deposit Amount field
   Set a value different from 0 in the Withdrawal Amount field, notice Deposit Amount field is set to 0
   Set a value different from 0 in the Deposit Amount field again, notice Withdrawal Amount field is set to 0.
2. Change Transaction Type as BP Deposit
   Notice Deposit Amount field is not changed, and Withdrawal Amount field = 0.
3. Change Transaction Type as BP Withdrawal
   Notice Deposit Amount and Withdrawal Amount are setted to 0.
4. Change Transaction Type as Bank fee
   Set a value different than 0 in the Withdrawal Amount field, notice Deposit Amount field is set to 0.
5. Change Transaction Type as BP Withdrawal
   Notice Withdrawal Amount field is not changed, and Deposit Amount field = 0.
6. Change Transaction Type as BP Deposit
   Notice Deposit Amount and Withdrawal Amount are setted to 0.


Test Plan 2: Testing Add Transaction of Match Statement process
1. Select a Financial Account with a Matching Algorithm defined
2. Create a record in Imported Bank Statements record
3. Add a line to it, set Amount OUT = 10 and process it
4. Click on Match Statement process button
5. Cancel the algorithm to be run
6. Add a new transaction (+ button in Match column)
7. Set Transaction Type as Bank fee
8. Check the Withdrawal amount is 10 and Deposit amount is set to 0
9. Set a value different from 0 in the Deposit Amount field, check Withdrawal amount is set to 0
10. Set a value different from 0 in the Withdrawal Amount field again and check Deposit amount is set to 0
11. Set a value different from 0 in the Deposit Amount field again, notice Withdrawal Amount field is set to 0.
12. Change Transaction Type as BP Deposit, notice Deposit Amount field is not changed, and Withdrawal Amount field = 0.
13. Change Transaction Type as BP Withdrawal, notice Deposit Amount and Withdrawal Amount are setted to 0.
14. Change Transaction Type as Bank fee. Set a value different than 0 in the Withdrawal Amount field, notice Deposit Amount field is set to 0.
15. Change Transaction Type as BP Withdrawal, notice Withdrawal Amount field is not changed, and Deposit Amount field = 0.
16. Change Transaction Type as BP Deposit, notice Deposit Amount and Withdrawal Amount are setted to 0.
(0095618)
hgbot   
2017-03-29 09:15   
Repository: erp/devel/pi
Changeset: 0189da80e6698ff7777ac325d425dbcd2cf75315
Author: Mark <markmm82 <at> gmail.com>
Date: Tue Mar 28 09:26:09 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/0189da80e6698ff7777ac325d425dbcd2cf75315 [^]

Fixes issue 35477: Avoid Financial Account transactions with both amounts != 0

Following changes have been done in Financial Account Transaction tab and in Add Transaction process definition:
When changing to Bank Fee transaction type, amounts will not be updated to zero.
When changing Deposit Amount in case Bank Fee transaction type, Withdrawal Amount will be updated to zero.
When changing Withdrawal Amount in case Bank Fee transaction type, Deposit Amount will be updated to zero.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addTransaction.js
M src-db/database/sourcedata/AD_CALLOUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src/org/openbravo/erpCommon/ad_callouts/SE_Payment_Transaction.java
M src/org/openbravo/erpCommon/ad_callouts/SE_Trxtype_Transaction.java
A src/org/openbravo/erpCommon/ad_callouts/SE_Amount_Transaction.java
---
(0095622)
aferraz   
2017-03-29 09:17   
Code review + Testing OK
(0095652)
hudsonbot   
2017-03-29 15:06   
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/f901bb68d428 [^]
Maturity status: Test
(0102633)
hgbot   
2018-02-22 17:24   
Repository: tools/automation/int
Changeset: 477f72c33b439c3c70ea1d8e0b54d3e9827cb0c6
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Fri Oct 20 15:41:34 2017 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/477f72c33b439c3c70ea1d8e0b54d3e9827cb0c6 [^]

Related to issue 35477: Added some automated tests

---
M src-test/com/openbravo/test/integration/erp/data/financial/receivablespayables/transactions/bankstatement/BankStatementLinesData.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRIn_Regressions1/APRIn_RegressionSuite1.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APROut_Regressions1/APROut_RegressionSuite1.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRIn_Regressions1/APRRegression35477In.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APROut_Regressions1/APRRegression35477Out.java
---