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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0026073
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2014-03-24 18:062014-03-31 15:25
ReportermarvintmView Statuspublic 
Assigned Topramakrishnan 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision548bfa48bd30
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0026073: When a payment is processed, even if the process fails, the ProcessBundle returns 'success'

DescriptionIt's possible to call the FIN_PaymentProcess process in such a way that even if it fails, the final result is "success".

This happens due to the fact that the FIN_PaymentProcess indirectly calls the FIN_FinaccTransaction process (to create an automatic financial account transaction), and basically doesn't check if this process finished successfully or not.

This means that if the FIN_FinaccTransaction process ends with error, then the whole database transaction has been rolled back, but the main FIN_PaymentProcess still ends with an error.

We have been able to reproduce this problem with the Web POS (the ending result is very serious, as even though the POS receipts are not saved due to a validation failing in the FIN_FinaccTransaction process, an error is not saved either because the process finished successfully).
Steps To ReproduceThe way we've been able to reproduce this is the following:
- Install Retail, with the White Valley sampledata.
- Go to the Open/Close Period Control window.
- Go to the current period in the The White Valley Group Calendar
- Close the period for all documents except: AP Payment, AR Receipt, Sales Order
- Go to the Web POS, and complete a receipt. Realize that this receipt cannot be found in Sales Order window, and cannot also be found in the Errors while processing POS data window. It's been lost forever.

Proposed SolutionThe main problem is the triggerAutomaticFinancialAccountTransaction method in the FIN_PaymentProcess class. This method calls the processTransaction method, but basically ignores its result. Instead of ignoring it, it should get it and if it has returned an error, it should fill its own bundle with it, and return an error.

TagsNo tags attached.
Attached Filesdiff file icon issue26073.diff [^] (2,260 bytes) 2014-03-24 19:00 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0026020RR14Q3 closedmarvintm Retail Modules Failure proof ticket synchronisation with ERP system 

-  Notes
(0065408)
marvintm (developer)
2014-03-24 19:01

I've attached a diff which should fix the reported issue. However, imho it's very important to review all cases of a process calling a second process, to ensure that in all cases the OBError which the second process returns is considered when building the result of the first process.
(0065591)
hgbot (developer)
2014-03-30 15:08

Repository: erp/devel/pi
Changeset: 548bfa48bd30d4d151c88e12dd2cec38da095e5c
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Sun Mar 30 18:36:39 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/548bfa48bd30d4d151c88e12dd2cec38da095e5c [^]

Fixes Issue 26073: When a payment is processed, even if the process fails, the ProcessBundle returns 'success'

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0065592)
hgbot (developer)
2014-03-30 15:13

Repository: erp/devel/pi
Changeset: bb458216d9b1f8ec9536acb3be2bce74fd471166
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Sun Mar 30 18:42:52 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/bb458216d9b1f8ec9536acb3be2bce74fd471166 [^]

Related to Issue 26073: When a payment is processed, even if the process fails, the ProcessBundle returns 'success'

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0065593)
hudsonbot (developer)
2014-03-30 22:47

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/a5afd9f6f31c [^]
Maturity status: Test
(0065594)
hudsonbot (developer)
2014-03-30 22:47

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/a5afd9f6f31c [^]
Maturity status: Test
(0065616)
Sandrahuguet (developer)
2014-03-31 15:25

Code review + testing OK

- Issue History
Date Modified Username Field Change
2014-03-24 18:06 marvintm New Issue
2014-03-24 18:06 marvintm Assigned To => dmiguelez
2014-03-24 18:06 marvintm Modules => Core
2014-03-24 18:06 marvintm Triggers an Emergency Pack => No
2014-03-24 19:00 marvintm File Added: issue26073.diff
2014-03-24 19:01 marvintm Note Added: 0065408
2014-03-24 19:23 marvintm Relationship added related to 0026020
2014-03-30 15:08 hgbot Checkin
2014-03-30 15:08 hgbot Note Added: 0065591
2014-03-30 15:08 hgbot Status new => resolved
2014-03-30 15:08 hgbot Resolution open => fixed
2014-03-30 15:08 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/548bfa48bd30d4d151c88e12dd2cec38da095e5c [^]
2014-03-30 15:13 hgbot Checkin
2014-03-30 15:13 hgbot Note Added: 0065592
2014-03-30 22:47 hudsonbot Checkin
2014-03-30 22:47 hudsonbot Note Added: 0065593
2014-03-30 22:47 hudsonbot Checkin
2014-03-30 22:47 hudsonbot Note Added: 0065594
2014-03-31 15:25 Sandrahuguet Assigned To dmiguelez => pramakrishnan
2014-03-31 15:25 Sandrahuguet Review Assigned To => Sandrahuguet
2014-03-31 15:25 Sandrahuguet Note Added: 0065616
2014-03-31 15:25 Sandrahuguet Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker