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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030751
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2015-09-03 15:352016-02-02 09:35
ReportervmromanosView Statuspublic 
Assigned Tovmromanos 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionfcdcb8232dfb
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2013-11-26
Regression introduced in release3.0MP30
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/3875daa1b317f2bb28d70d338d45ebc8e4c962b6 [^]
Triggers an Emergency PackNo
Summary

0030751: Lines deleted each time you reactivate a payment proposal

DescriptionEach time you reactivate a payment proposal, at least one payment proposal line is randomly deleted.
Steps To ReproduceAs group admin
Make sure you unschedule accounting server process.
Go to Payment Proposal window.
Create a new record. Paying from: Cuenta de Banco. Payment method: Cheque (recommended to use this configuration for testing purposes, but it is reproducible with any configuration)
Press Select Expected Payments. Remove the filter and select all the records.
Write down the number of lines, for example 9
Run Generate Payment process selecting any action.
Now Reactivate the payment proposal.
Realize some payment proposal lines are randomly deleted.
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 00306863.0PR15Q4 closedvmromanos It is not possible to process payment related with a closed order and generated from payment proposal window 
depends on backport 00307523.0PR15Q3.1 closedTriage Finance Lines deleted each time you reactivate a payment proposal 
depends on backport 00307533.0PR15Q2.5 closedTriage Finance Lines deleted each time you reactivate a payment proposal 
caused by defect 00250523.0MP30 closedpramakrishnan Not paid invoices cannot be added to a payment proposal if they are already included in a processed proposal 

-  Notes
(0080052)
vmromanos (developer)
2015-09-03 15:55
edited on: 2015-09-04 13:49

Test plan I:
Go to Payment Proposal window.
Create a new record. Paying from: Cuenta de Banco. Payment method: Cheque (recommended to use this configuration for testing purposes, but it is reproducible with any configuration)
Press Select Expected Payments. Remove the filter and select all the records.
Write down the number of lines, for example 9
Run Generate Payment process selecting any action.
Now Reactivate the payment proposal.
Verify the number of lines continue to be the same

Test Plan II:
Go to Payment Proposal window.
Create a new record. Paying from: Cuenta de Banco. Payment method: Cheque (recommended to use this configuration for testing purposes, but it is reproducible with any configuration)
Press Select Expected Payments. Remove the filter and select part of the records.
Write down the number of lines, for example 5
Run Generate Payment process selecting any action.
Now Reactivate the payment proposal.
Verify the number of lines continue to be the same

Test plan III:
Create a Purchase Order for the BP (i.e: Bebidas Alegres) with "Cheque" payment method
Create a record in the Payment Proposal screen
      Payment Method: Cheque
      Click on the Selected Expected Payments button, remove the filter and select the previously created order
Generate Payments by selecting the option of grouping separate payments for the same vendor into one payment
Navigate to the payment created and reactivate it by deleting lines
Verify the payment proposal line associated to this payment has been deleted.
Enter a new payment proposal with the same header as before.
Click on the Selected Expected Payments button, remove the filter.
Verify that the order is shown again for selection.

Test plan IV:
Create two Purchase Invoices with the same payment method (for different business partners)
Create a record in the Payment Proposal screen
      Payment Method: Cheque
      Incl. documents up to this date > Invoices Payment Plans' Expected Date
Click on the Selected Expected Payments button, remove the filter and select the previously created invoices
Generate Payments by selecting the option of grouping separate payments for the same vendor into one payment
Navigate to one of that payments and reactivate it by deleting lines
Verify the payment proposal line associated to this payment has been deleted.
Enter a new payment proposal with the same header as before.
Click on the Selected Expected Payments button, remove the filter.
Verify the invoice linked to the reactivated payment is shown again for selection.

Test Plan V:
Create a Purchase Order for the BP (i.e: Bebidas Alegres) with "Cheque" payment method
Create a record in the Payment Proposal screen
      Payment Method: Cheque
      Click on the Selected Expected Payments button, remove the filter and select the previously created order
Generate Payments by selecting the option of grouping separate payments for the same vendor into one payment
Navigate to the payment created and reactivate it by NOT deleting lines.
Click on "Add Details" remove the line of the order selected and add a G/L item, therefore payment can be processed.
Verify that the payment proposal line associated to the payment of this order has been deleted.
Enter a new payment proposal with the same header as before.
Click on the Selected Expected Payments button, remove the filter.
Verify that the order is shown again for selection.


Test Plan VI:
Create a Purchase Invoice for the BP (i.e: Bebidas Alegres) with "Cheque" payment method
Create a record in the Payment Proposal screen
      Payment Method: Cheque
      Click on the Selected Expected Payments button, remove the filter and select the previously created invoice
Generate Payments by selecting the option of grouping separate payments for the same vendor into one payment
Navigate to the payment created and reactivate it by NOT deleting lines.
Click on "Add Details" remove the line of the invoice selected and add a G/L item, therefore payment can be processed.
Verify that the payment proposal line associated to the payment of the invoice has been deleted.
Enter a new payment proposal with the same header as before.
Click on the Selected Expected Payments button, remove the filter.
Verify that the order is shown again for selection.

(0080185)
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
---
(0080186)
dmiguelez (developer)
2015-09-07 11:58

Code Review + Testing Ok
(0080221)
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
(0083806)
hgbot (developer)
2016-02-02 09:35

Repository: tools/automation/int
Changeset: e45f89f1248cd7b9cdfaba14e18231e8f8d71249
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Sep 23 10:31:14 2015 +0200
URL: http://code.openbravo.com/tools/automation/int/rev/e45f89f1248cd7b9cdfaba14e18231e8f8d71249 [^]

Related to issue 30751: Added an automated test

---
M src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/paymentproposal/PaymentProposalHeaderTab.java
M src-test/com/openbravo/test/integration/erp/modules/client/application/gui/pickandexecute/PickAndExecuteWindow.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/modules/userinterface/smartclient/gui/Grid.java
M src-test/com/openbravo/test/integration/erp/testscripts/financial/receivablespayables/transactions/PaymentProposal.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression020.java
---

- Issue History
Date Modified Username Field Change
2015-09-03 15:35 vmromanos New Issue
2015-09-03 15:35 vmromanos Assigned To => Triage Finance
2015-09-03 15:35 vmromanos Modules => Core
2015-09-03 15:35 vmromanos Regression level => Production - Confirmed Stable
2015-09-03 15:35 vmromanos Regression date => 2013-11-26
2015-09-03 15:35 vmromanos Regression introduced in release => 3.0MP30
2015-09-03 15:35 vmromanos Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/3875daa1b317f2bb28d70d338d45ebc8e4c962b6 [^]
2015-09-03 15:35 vmromanos Triggers an Emergency Pack => No
2015-09-03 15:35 vmromanos Relationship added caused by 0025052
2015-09-03 15:36 vmromanos Status new => scheduled
2015-09-03 15:36 vmromanos Assigned To Triage Finance => vmromanos
2015-09-03 15:47 vmromanos Relationship added related to 0030685
2015-09-03 15:47 vmromanos Relationship added related to 0030686
2015-09-03 15:55 vmromanos Note Added: 0080052
2015-09-03 16:01 vmromanos Note Edited: 0080052 View Revisions
2015-09-04 11:43 psanjuan Steps to Reproduce Updated View Revisions
2015-09-04 12:05 psanjuan Note Edited: 0080052 View Revisions
2015-09-04 12:07 psanjuan Note Edited: 0080052 View Revisions
2015-09-04 13:08 psanjuan Note Edited: 0080052 View Revisions
2015-09-04 13:08 psanjuan Note Edited: 0080052 View Revisions
2015-09-04 13:49 psanjuan Note Edited: 0080052 View Revisions
2015-09-07 11:58 hgbot Checkin
2015-09-07 11:58 hgbot Note Added: 0080185
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:58 dmiguelez Review Assigned To => dmiguelez
2015-09-07 11:58 dmiguelez Note Added: 0080186
2015-09-07 11:58 dmiguelez Status resolved => closed
2015-09-07 21:18 hudsonbot Checkin
2015-09-07 21:18 hudsonbot Note Added: 0080221
2016-02-02 09:35 hgbot Checkin
2016-02-02 09:35 hgbot Note Added: 0083806


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker