Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039168Openbravo ERPZ. Otherspublic2018-08-22 13:512018-09-12 21:33
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q4 
Sandrahuguet
Core
No
0039168: A payment can be reversed more than once with slow network connection
A payment can be reversed more than once with slow network connection
As system admin role:
   Set Reverse Payment field of Payment In - Header tab as Displayed

From command line:
   Stop tomcat
   Compile the window (as the displayed button contains a process)
   Start Tomcat

As group admin role:
   Create a sales order, add a product to it and book it
   Add Payment to it
   Go to Payment In window

   Set the browser's network as Slow 3G in Developer's Tools

   Select the previously created payment
   Click on Reverse Payment
   Add a payment date and OK
   Click Reverse Payment again (it should be made before it is hidden)
   Add a payment date and OK

   Check the original payment has been reversed twice and it should not
   Reversed Payment field in original payment is showing the second payment
   Reversed Payment field in second payment is showing the first payment
No tags attached.
Issue History
2018-08-22 13:51ngarciaNew Issue
2018-08-22 13:51ngarciaAssigned To => Triage Finance
2018-08-22 13:51ngarciaModules => Core
2018-08-22 13:51ngarciaTriggers an Emergency Pack => No
2018-08-22 13:58ngarciaIssue Monitored: networkb
2018-08-23 08:48aferrazAssigned ToTriage Finance => AtulOpenbravo
2018-08-24 08:59aferrazAssigned ToAtulOpenbravo => Triage Finance
2018-08-24 22:19markmm82Assigned ToTriage Finance => markmm82
2018-08-24 22:19markmm82Statusnew => acknowledged
2018-08-28 03:37markmm82Statusacknowledged => scheduled
2018-08-30 21:35markmm82Note Added: 0106550
2018-08-30 21:39markmm82Note Edited: 0106550bug_revision_view_page.php?bugnote_id=0106550#r17588
2018-09-03 09:51rafarodaIssue Monitored: rafaroda
2018-09-10 12:10hgbotCheckin
2018-09-10 12:10hgbotNote Added: 0106655
2018-09-10 12:10hgbotStatusscheduled => resolved
2018-09-10 12:10hgbotResolutionopen => fixed
2018-09-10 12:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/686664db43e172291b526199b0e5c47c036be768 [^]
2018-09-10 12:11SandrahuguetReview Assigned To => Sandrahuguet
2018-09-10 12:11SandrahuguetNote Added: 0106656
2018-09-10 12:11SandrahuguetStatusresolved => closed
2018-09-10 12:11SandrahuguetFixed in Version => 3.0PR18Q4
2018-09-12 21:33hudsonbotCheckin
2018-09-12 21:33hudsonbotNote Added: 0106727

Notes
(0106550)
markmm82   
2018-08-30 21:35   
(edited on: 2018-08-30 21:39)
Test Plan:
As system admin role:
   Set Reverse Payment field of Payment In - Header tab as Displayed

From command line:
   Stop tomcat
   Compile the window (as the displayed button contains a process)
   Start Tomcat

As group admin role:
   Create a sales order, add a product to it and book it
   Add Payment to it
   Go to Payment In window

   Set the browser's network as Slow 3G in Developer's Tools

   Select the previously created payment
   Click on Reverse Payment
   Add a payment date and OK
   Click Reverse Payment again (it should be made before it is hidden)
   Add a payment date and OK

   Check the original payment has been reversed just once. It is OK.
   Notice that an error message is shown:
     Error:
     This payment has been already reversed.


Notice it works similar for the Purchase workflow.

(0106655)
hgbot   
2018-09-10 12:10   
Repository: erp/devel/pi
Changeset: 686664db43e172291b526199b0e5c47c036be768
Author: Mark <markmm82 <at> gmail.com>
Date: Thu Sep 06 10:14:53 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/686664db43e172291b526199b0e5c47c036be768 [^]

Fixes issue 39168: A payment can be reversed more than once with slow connection

Was possible to reverse a payment more than once with slow network connection.
It was caused because could be a time between the payment is reversed and the button
is hidden where it is possible to execute the process again. As the process of
reversing the payment happens in the server-side and the UI delay happens in the
Front-End the Reverse Payment button is hidden before setting up the parameters
so when the process is executed the second time the payment is already reversed
and linked to the reversed payment.
To avoid this bug, it is validated that the processing payment is not already reversed.
In case it is, then an error message is thrown explaining it is reversed.

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
(0106656)
Sandrahuguet   
2018-09-10 12:11   
Code review + testing OK
(0106727)
hudsonbot   
2018-09-12 21:33   
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/ad75d3cb1744 [^]
Maturity status: Test