Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036753Openbravo ERP09. Financial managementpublic2017-08-30 14:222018-02-22 17:23
xabiermerino 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q4 
aferraz
Core
No
0036753: [SERQA 3230] Error in Payment Plan after execute a payment created from WebPOS
Error in Payment Plan after execute a payment created from WebPOS
1. Define an Execution Process with javaclass org.openbravo.advpaymentmngt.executionprocess.SimpleExecutionProcess
2. Go to the financial account 'Credit Card - Vall Blanca Store' and go to tab 'Payment Method' --> change the configuration of the payment method to:
-Automatic Deposit: N
-Execution type: Automatic
-Execution process: el definido en el paso 1
-Deferred: Y
3. Log into webPOS and create a ticket with two lines. pay it totally with Card
4. Log into backend and confirm that the payment created is in Awaiting Execution status
5. Go to sales invoice window and create a new invoice, click on Create Invoices From, filter by the shipment of the new ticket and select JUST ONE LINE
6. Complete the invoice and confirm that the payment plan of the Sales Order has 2 payment schedule details.
7. Go to the payment in window and search the payment created. Click on Execute button
8. Realize that, in the sales order, the received amount in Payment Plan tab is not OK
No tags attached.
Issue History
2017-08-30 14:22xabiermerinoNew Issue
2017-08-30 14:22xabiermerinoAssigned To => Retail
2017-08-30 14:22xabiermerinoTriggers an Emergency Pack => No
2017-08-31 08:39xabiermerinoResolution time => 1505340000
2017-09-05 12:20avicenteNote Added: 0098827
2017-09-05 13:06avicenteNote Added: 0098831
2017-09-05 14:18aferrazProjectRetail Modules => Openbravo ERP
2017-09-05 14:18aferrazModules => Core
2017-09-05 14:18aferrazAssigned ToRetail => AtulOpenbravo
2017-09-05 14:18aferrazCategoryWeb POS => 09. Financial management
2017-09-05 20:52AtulOpenbravoStatusnew => scheduled
2017-09-05 20:52AtulOpenbravoNote Added: 0098855
2017-09-06 19:43AtulOpenbravoNote Added: 0098872
2017-09-06 19:50AtulOpenbravoNote Added: 0098873
2017-09-07 09:27AtulOpenbravoNote Edited: 0098855bug_revision_view_page.php?bugnote_id=0098855#r15830
2017-09-07 09:28AtulOpenbravoNote Edited: 0098873bug_revision_view_page.php?bugnote_id=0098873#r15832
2017-09-07 09:32AtulOpenbravoNote Edited: 0098872bug_revision_view_page.php?bugnote_id=0098872#r15834
2017-09-08 08:48hgbotCheckin
2017-09-08 08:48hgbotNote Added: 0098897
2017-09-08 08:48hgbotStatusscheduled => resolved
2017-09-08 08:48hgbotResolutionopen => fixed
2017-09-08 08:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1ac215963112e281d3fe8df97a25b76d017781bb [^]
2017-09-08 09:16aferrazReview Assigned To => aferraz
2017-09-08 09:16aferrazNote Added: 0098898
2017-09-08 09:16aferrazStatusresolved => closed
2017-09-08 09:16aferrazFixed in Version => 3.0PR17Q4
2017-09-21 16:49hudsonbotCheckin
2017-09-21 16:49hudsonbotNote Added: 0099369
2018-02-22 17:23hgbotCheckin
2018-02-22 17:23hgbotNote Added: 0102630

Notes
(0098827)
avicente   
2017-09-05 12:20   
Same error happens when the order is created in backend.
(0098831)
avicente   
2017-09-05 13:06   
Steps to reproduce in backend with backend with client F&B:

1. Log into backend https://livebuilds.openbravo.com/erp_pi_pgsql [^] with client F&B.
2. Check that exists an Execution Process with javaclass org.openbravo.advpaymentmngt.executionprocess.SimpleExecutionProcess.
3. Go to the financial account 'Bank - Account 1' and go to tab 'Payment Method' --> change the configuration of the payment method 'Check' to:
-Automatic Deposit: N
-Execution type: Automatic
-Execution process: el definido en el paso 1
-Deferred: Y
3. Create a sales order with two lines for F&B US. Book the sales order and pay it totally with Check.
4. Confirm that the payment created is in Awaiting Execution status
5. Create the goods shipment for the order.
6. Go to sales invoice window and create a new invoice, click on Create Invoices From, filter by the shipment of the new ticket and select JUST ONE LINE
7. Complete the invoice and confirm that the payment plan of the Sales Order has 2 payment schedule details.
8. Go to the payment in window and search the payment created. Click on Execute button.
9. Realize that, in the sales order, the received amount in Payment Plan tab is not OK.
(0098855)
AtulOpenbravo   
2017-09-05 20:52   
(edited on: 2017-09-07 09:27)
1. Log with client F&B International Group Admin role.
2. Check that exists an Execution Process with java class org.openbravo.advpaymentmngt.executionprocess.SimpleExecutionProcess.
3. Go to the financial account 'Bank - Account 1' and go to tab 'Payment Method' --> change the configuration of the payment method 'Check' to:
-Automatic Deposit: N
-Execution type: Automatic
-Execution process: Simple Execution Process
-Deferred: Y
3. Create a sales order with two lines for F&B US, Invoice terms = Immediate. Book the sales order and pay it totally with Check.
4. Confirm that the payment created is in Awaiting Execution status.
5. Go to sales invoice window and create a new invoice, click on Create Invoices From, filter by the order created in above step and select JUST ONE LINE.
7. Complete the invoice and confirm that the payment plan of the Sales Order has 2 payment schedule details.
8. Go to the payment in window and search the payment created. Click on Execute button.
9. Realize that, in the sales order, the received amount in Payment Plan tab is correct.

Similar test OK for Purchase flow

(0098872)
AtulOpenbravo   
2017-09-06 19:43   
(edited on: 2017-09-07 09:32)
- Login as F&B International Group Admin
- Check that exists an Execution Process with java class org.openbravo.advpaymentmngt.executionprocess.SimpleExecutionProcess.
- Go to the financial account 'Bank - Account 1' and go to tab 'Payment Method'
   --> change the configuration of the payment method 'Check' to:
   -Automatic Deposit: N
   -Execution type: Automatic
   -Execution process: Simple Execution Process
   -Deferred: Y
- Create one sales invoice for any business partner, set payment method = Check and add any product to it.
- Create another sales invoice for same business partner, set payment method = Check and add any product to it.
- Create a payment in to pay both invoices with payment method = Check
- Execute payment.
- Realize that payment plan for both invoice is correct.

Similar test OK for Purchase flow

(0098873)
AtulOpenbravo   
2017-09-06 19:50   
(edited on: 2017-09-07 09:28)
- Login as F&B International Group Admin
- Check that exists an Execution Process with java class org.openbravo.advpaymentmngt.executionprocess.SimpleExecutionProcess.
- Go to the financial account 'Bank - Account 1' and go to tab 'Payment Method'
   --> change the configuration of the payment method 'Check' to:
   -Automatic Deposit: N
   -Execution type: Automatic
   -Execution process: Simple Execution Process
   -Deferred: Y
- Create a Payment In for business partner "Sleep Well Hotels, Co." in "F&B US, Inc." organization, with payment method = Check, Amount = 1000.
- Add Details and choose action regarding document as "Process Received Payment(s) and Deposit" and over payment action as "Leave the credit to be used later". Execute Payment.
- Create sales order for in same org for same business partner, add two lines for different product, book the order. for eg: order amount = 2000.
- Add Payment against the order and select credit payment created in above step and Actual payment In = 1000 (so that order is fully paid).
- Create a Sales Invoice for first order line, complete it.
- Create another sales invoice for second order line, complete it.
- Execute the payment in created against order in above step.
- Realize that payment plan and details of sales order, sales invoice 1, sales invoice 2 are correct. Business Partners current balance is correct.

Similar test OK for Purchase flow

(0098897)
hgbot   
2017-09-08 08:48   
Repository: erp/devel/pi
Changeset: 1ac215963112e281d3fe8df97a25b76d017781bb
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Sep 06 16:51:30 2017 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/1ac215963112e281d3fe8df97a25b76d017781bb [^]

Fixes issue 36753: Error in Payment Plan after execute a payment

** Use FIN_Utility updatePaymentAmounts method instead of private updatePaymentAmounts
method in FIN_ExecutePayment to avoid wrong updation of fin_payment_schedule
** Use FIN_Utility updateBusinessPartnerCredit
** Remove break statement
** Removed unused private updatePaymentAmounts method from FIN_ExecutePayment

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
---
(0098898)
aferraz   
2017-09-08 09:16   
Code review + Testing OK
(0099369)
hudsonbot   
2017-09-21 16:49   
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/9750b78d3e5c [^]
Maturity status: Test
(0102630)
hgbot   
2018-02-22 17:23   
Repository: tools/automation/int
Changeset: a6e906b111e9db6e7e4e7ac8e9778eb268b67cbc
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Wed Sep 13 10:29:43 2017 -0400
URL: http://code.openbravo.com/tools/automation/int/rev/a6e906b111e9db6e7e4e7ac8e9778eb268b67cbc [^]

Related to issue 36753: Added some automated test

---
M src-test/com/openbravo/test/integration/erp/data/SelectedPaymentData.java
M src-test/com/openbravo/test/integration/erp/data/masterdata/businesspartner/BusinessPartnerData.java
M src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/paymentout/PaymentOutTab.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRO_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SAL_RegressionSuite.java
M src-test/com/openbravo/test/integration/erp/testscripts/SmokeTabScript.java
M src-test/com/openbravo/test/integration/erp/testscripts/financial/receivablespayables/transactions/PaymentOut.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression36753Out1.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression36753Out2.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/procurement/testsuites/PRO_Regressions/PRORegression36753Out3.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression36753In1.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression36753In2.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/sales/testsuites/SAL_Regressions/SALRegression36753In3.java
---