Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029615 | Openbravo ERP | Z. Others | public | 2015-04-16 18:23 | 2016-02-02 09:34 |
|
Reporter | ngarcia | |
Assigned To | umartirena | |
Priority | immediate | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | vmromanos |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2014-06-19 |
Regression introduced in release | 3.0PR14Q3 |
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/f94f08e02e3a [^] |
Triggers an Emergency Pack | Yes |
|
Summary | 0029615: Wrong amount in Used Credit Source tab when paying an invoice with credit and refunding the difference to the customer |
Description | Wrong amount in Used Credit Source tab when paying an invoice with credit and refunding the difference to the customer |
Steps To Reproduce | As group admin role:
Create a Payment In where you leave 100 EUR as credit to a Business Partner
Create a Sales Invoice of 75 EUR for the same Business Partner
Create a new Payment In, select the credit to use, the invoice to pay and Refund the amount to the Customer
Check two payments are created:
One with the refund that do not have any record in the Used Credit tab
One with the invoice payment that has a record of 100 EUR in the Used Credit Source tab
Post this last payment and check the difference of 25 is posted to Currency balancing account |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0029619 | 3.0PR15Q2 | closed | umartirena | Wrong amount in Used Credit Source tab when paying an invoice with credit and refunding the difference to the customer | depends on | backport | 0029620 | 3.0PR15Q1.4 | closed | umartirena | Wrong amount in Used Credit Source tab when paying an invoice with credit and refunding the difference to the customer | caused by | feature request | 0029391 | | closed | Sandrahuguet | Add Payment refactor project | related to | defect | 0032579 | | closed | markmm82 | Generated credit is set as used although it is not possible to process the payment that uses it |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-04-16 18:23 | ngarcia | New Issue | |
2015-04-16 18:23 | ngarcia | Assigned To | => Triage Finance |
2015-04-16 18:23 | ngarcia | Modules | => Core |
2015-04-16 18:23 | ngarcia | Resolution time | => 1432159200 |
2015-04-16 18:23 | ngarcia | Triggers an Emergency Pack | => No |
2015-04-16 18:25 | ngarcia | Issue Monitored: networkb | |
2015-04-16 19:35 | umartirena | Regression level | => Production - Confirmed Stable |
2015-04-16 19:35 | umartirena | Regression date | => 2014-06-19 |
2015-04-16 19:35 | umartirena | Regression introduced in release | => 3.0PR14Q3 |
2015-04-16 19:35 | umartirena | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/f94f08e02e3a [^] |
2015-04-16 19:35 | umartirena | Triggers an Emergency Pack | No => Yes |
2015-04-16 19:38 | umartirena | Status | new => scheduled |
2015-04-16 19:38 | umartirena | Assigned To | Triage Finance => umartirena |
2015-04-17 14:42 | umartirena | Note Added: 0076609 | |
2015-04-20 14:21 | hgbot | Checkin | |
2015-04-20 14:21 | hgbot | Note Added: 0076632 | |
2015-04-20 14:22 | hgbot | Status | scheduled => resolved |
2015-04-20 14:22 | hgbot | Resolution | open => fixed |
2015-04-20 14:22 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/59ab316d379204bc4370719e9d45c4630da1ee0b [^] |
2015-04-20 14:22 | vmromanos | Review Assigned To | => vmromanos |
2015-04-20 14:22 | vmromanos | Note Added: 0076633 | |
2015-04-20 14:22 | vmromanos | Status | resolved => closed |
2015-04-22 10:12 | dmitry_mezentsev | Relationship added | caused by 0029391 |
2015-05-07 22:16 | hudsonbot | Checkin | |
2015-05-07 22:16 | hudsonbot | Note Added: 0077136 | |
2015-05-20 10:20 | umartirena | Note Added: 0077596 | |
2016-02-02 09:34 | hgbot | Checkin | |
2016-02-02 09:34 | hgbot | Note Added: 0083803 | |
2016-04-07 10:55 | aferraz | Relationship added | related to 0032579 |
Notes |
|
(0076609)
|
umartirena
|
2015-04-17 14:42
|
|
Test Plan:
1)
* Create a Payment In where you leave 100 EUR as credit to a Business Partner
* Create a Sales Invoice of 75 EUR for the same Business Partner
* Create a new Payment In, select the credit to use, the invoice to pay and Refund the amount to the Customer
* Check two payments are created:
- One with the refund payment has a record of 25 EUR in the Used Credit Source tab
- One with the invoice payment that has a record of 75 EUR in the Used Credit Source tab
* Post both payments:
- The invoice payment posts 75 to "Customer Prepayments"
- The refund payment posts 25 to "Customer Prepayments"
2)
* Create a Payment In where you leave 100 EUR as credit to a Business Partner
* Create a Payment In where you leave 50 EUR as credit to a Business Partner
* Create a Payment In where you leave 75 EUR as credit to a Business Partner
* Create a Sales Invoice of 75 EUR for the same Business Partner
* Create a new Payment In:
- select an amount of 50 of the second payment created.
- select an amount of 75 of the third payment created.
- select the invoice to pay
- select "Refund the amount to the Customer" (difference of 50)
* Check two payments are created:
- One with the refund payment has a record of 50 EUR in the Used Credit Source tab pointint to second or third payments.
- One with the invoice payment that has a record of 75 EUR in the Used Credit Source tab pointing. to second or third payments.
* Post both payments:
- The invoice payment posts 75 to "Customer Prepayments"
- The refund payment posts 50 to "Customer Prepayments" |
|
|
(0076632)
|
hgbot
|
2015-04-20 14:21
|
|
Repository: erp/devel/pi
Changeset: 59ab316d379204bc4370719e9d45c4630da1ee0b
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Fri Apr 17 14:56:13 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/59ab316d379204bc4370719e9d45c4630da1ee0b [^]
Fixes bug 29615: Correctly used credit when paying an invoice and refunding
There were two issues while managing this scenario:
[1] In 'addCredit' method inside AddPaymentActionHandler.java class, a loop of Credit to Use grid is done, creating Payment Credit Used records assigned to the new created payment of the invoice. This method was not taking into account that could be credit amount that exceeds the invoice amount (amount to be refunded) and it was assigning all the credit amount as used to the payment of the invoice. So the refund payment that is created right after was been left without any used credit payment.
[2] After fixing the previous method, the second issue appears. The 'updateUsedCredit' method inside FIN_PaymentProcess.java class retrieves all the payments of the business partner that has generated credit, and it assigns as used to the refund payment. The problem with this function is that before the Add Payment refactor it was not possible to select which credit payments we wanted to consume, it was only a total credit amount to be consumed and the system behind was being consuming any of them. But after the refactor it is possible to select the ones that want to be consumed.
In order to fix this last issue the selected credit line ids are added as a parameter to 'updateUsedCredit' method.
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
|
|
|
|
|
|
|
|
|
(0077596)
|
umartirena
|
2015-05-20 10:20
|
|
|
|
(0083803)
|
hgbot
|
2016-02-02 09:34
|
|
Repository: tools/automation/int
Changeset: cf90a167c46d3e1861737041feec679f622b2828
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Sep 21 09:43:16 2015 +0200
URL: http://code.openbravo.com/tools/automation/int/rev/cf90a167c46d3e1861737041feec679f622b2828 [^]
Related to issue 29615: Added some automated tests
---
M src-test/com/openbravo/test/integration/erp/gui/financial/receivablespayables/transactions/AddPaymentProcess.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/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/testscripts/financial/receivablespayables/transactions/PaymentOut.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/addpayment/testsuites/APR_Regressions/APRRegression015.java
---
|
|