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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030686
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Z. Othersmajoralways2015-08-27 12:592015-09-07 21:18
ReportermaiteView Statuspublic 
Assigned Tovmromanos 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionfcdcb8232dfb
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

0030686: It is not possible to process payment related with a closed order and generated from payment proposal window

DescriptionIt is not possible to process payment related with a closed order and generated from payment proposal window
Steps To Reproduce1. Register Purchase Order for any org and bp. Add line and process
2. Register Payment Proposal header for same org and bp. Select previous order and run "Generate Payments" process
3. Access Purchase Order and Close it. Total order amount will be set to 0 as order line was not delivered
4. Access Payment Out and run "reactivate" option
5. Try to process payment again and you will receive error due to total order amount now is 0
6. User is not able to remove order document from payment out document. In case you try to unmark order detail and add gl item detail or invoice detail you will receive error
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00306853.0PR15Q4 closedvmromanos Error when reactivating payment proposal related with a closed order 
related to defect 0030751 closedvmromanos Lines deleted each time you reactivate a payment proposal 

-  Notes
(0080058)
vmromanos (manager)
2015-09-03 16:30
edited on: 2015-09-04 11:52

Test plan:
1. Register Purchase Order for any org and bp. Make sure "Cheque" is selected in "Payment Method" field. Add a line and process
2. Register Payment Proposal header for same org and bp. Select previous order and run "Generate Payments" process
3. Access Purchase Order and Close it. Total order amount will be set to 0 as order line was not delivered
4. Access Payment Out and run "reactivate" option
5. Try to process payment again. Verify this error is shown: "It is not possible to process a Payment without line." because the system tries to delete this line and then process the payment which has no lines
6. Try to process payment again, but this time enter a gl item (so the final payment will have 1 line)
7. Verify the process finishes successfully and the previous payment line has been removed, and the new one for the GL Item has been created
8. Go back to the payment proposal. Verify the line previously associated to this payment has been deleted (because there is nothing pending to be paid for the order)

(0080184)
hgbot (developer)
2015-09-07 11:58

Repository: erp/devel/pi
Changeset: fcdcb8232dfb9a48bc3f7cb8869ae61d3c7fe49e
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Sep 03 17:13:57 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/fcdcb8232dfb9a48bc3f7cb8869ae61d3c7fe49e [^]

Fixed bug 30685 Fixed bug 30686 Fixed bug 30751: Several Payment Proposal issues

This changeset includes the fixes for several issues related to the Payment Proposal flow:
# 30685: Error when reactivating payment proposal related with a closed order
Cause: The payment schedule detail was deleted as part of the reactivation process, however DAL wasn't aware of it: when trying to delete the associated payment proposal line, DAL tried first to set proposal line's PSD to null, creating a database constraint violation in the flush.

# 30686: It is not possible to process payment related with a closed order and generated from payment proposal window.
Cause: The payment detail associated to the closed order remained in the system and it couldn't be deleted neither manually nor automatically because it was linked to the payment proposal line


# 30751: Lines deleted each time you reactivate a payment proposal
Cause: The code in charge of deleting the payment proposal lines was deleting only the lines linked to the last set of processed payment schedule details, instead of doing for all of them. This code worked fine when the payment was reactivated from the Payment window, but not when it was called from the Payment Proposal window, wrongly removing payment proposal lines.


The solution for all these issues is the following:
1. The payment proposal is set to processed=N before calling the payment process. This avoids the need of running flushes in the payment process to unprocess and process the payment proposal. That fixes the flush issues and increases the general performance of the process.
2. The code in charge of deleting the linked payment proposal lines is executed:
2.1 when a PSD is deleted because the amount is 0 (for example in the scenario where we close the order), or
2.2 when we are reactivating a payment (deleting lines only) and we don't come from payment proposal reactivation process. Now when calling the payment process from the Payment proposal, we pass a new parameter comingFrom to the payment process.
2.3 In Add Payment, when we are removing a line (for example while reactivating a payment deleting the lines)

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java
---
(0080188)
dmiguelez (developer)
2015-09-07 11:59

Code Review + Testing Ok
(0080220)
hudsonbot (developer)
2015-09-07 21:18

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/f3ddf66cdf4b [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-08-27 12:59 maite New Issue
2015-08-27 12:59 maite Assigned To => Triage Finance
2015-08-27 12:59 maite Modules => Advanced Payables and Receivables Mngmt
2015-08-27 12:59 maite Resolution time => 1443304800
2015-08-27 12:59 maite Triggers an Emergency Pack => No
2015-08-27 13:00 maite Issue Monitored: networkb
2015-09-02 11:19 vmromanos Relationship added related to 0030685
2015-09-03 13:36 vmromanos Status new => scheduled
2015-09-03 14:22 vmromanos Assigned To Triage Finance => vmromanos
2015-09-03 15:47 vmromanos Relationship added related to 0030751
2015-09-03 16:30 vmromanos Note Added: 0080058
2015-09-04 11:52 psanjuan Note Edited: 0080058 View Revisions
2015-09-07 11:58 hgbot Checkin
2015-09-07 11:58 hgbot Note Added: 0080184
2015-09-07 11:58 hgbot Status scheduled => resolved
2015-09-07 11:58 hgbot Resolution open => fixed
2015-09-07 11:58 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fcdcb8232dfb9a48bc3f7cb8869ae61d3c7fe49e [^]
2015-09-07 11:59 dmiguelez Review Assigned To => dmiguelez
2015-09-07 11:59 dmiguelez Note Added: 0080188
2015-09-07 11:59 dmiguelez Status resolved => closed
2015-09-07 21:18 hudsonbot Checkin
2015-09-07 21:18 hudsonbot Note Added: 0080220


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker