Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0029619 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] Z. Others | major | always | 2015-04-16 18:23 | 2015-04-20 14:20 | |||
Reporter | ngarcia | View Status | public | |||||
Assigned To | umartirena | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 05d86072ac4e | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | vmromanos | |||||||
Web browser | ||||||||
Modules | Core | |||||||
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 | 0029619: 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 | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0076629) hgbot (developer) 2015-04-20 14:19 |
Repository: erp/backports/3.0PR15Q2 Changeset: 05d86072ac4e72903089f8d363365f9472fabb26 Author: Unai Martirena <unai.martirena <at> openbravo.com> Date: Mon Apr 20 09:23:09 2015 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/05d86072ac4e72903089f8d363365f9472fabb26 [^] Fixes bug 29619: 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 --- |
(0076631) vmromanos (manager) 2015-04-20 14:20 |
Code review + testing OK |
Issue History | |||
Date Modified | Username | Field | Change |
2015-04-16 19:38 | umartirena | Type | defect => backport |
2015-04-16 19:38 | umartirena | Target Version | => 3.0PR15Q2 |
2015-04-17 14:25 | umartirena | Assigned To | Triage Finance => umartirena |
2015-04-20 14:19 | hgbot | Checkin | |
2015-04-20 14:19 | hgbot | Note Added: 0076629 | |
2015-04-20 14:19 | hgbot | Status | scheduled => resolved |
2015-04-20 14:19 | hgbot | Resolution | open => fixed |
2015-04-20 14:19 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/05d86072ac4e72903089f8d363365f9472fabb26 [^] |
2015-04-20 14:20 | vmromanos | Review Assigned To | => vmromanos |
2015-04-20 14:20 | vmromanos | Note Added: 0076631 | |
2015-04-20 14:20 | vmromanos | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |