Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0029620 | ||||||||
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 | 8bace9b56a9b | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q1.4 | |||
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 | 0029620: 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 | |
(0076628) hgbot (developer) 2015-04-20 14:19 |
Repository: erp/backports/3.0PR15Q1.4 Changeset: 8bace9b56a9b0a1e145015e99ec5043967d75af9 Author: Unai Martirena <unai.martirena <at> openbravo.com> Date: Mon Apr 20 09:49:30 2015 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.4/rev/8bace9b56a9b0a1e145015e99ec5043967d75af9 [^] Fixes bug 29620: 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 --- |
(0076630) 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.0PR15Q1.3 |
2015-04-17 14:25 | umartirena | Assigned To | Triage Finance => umartirena |
2015-04-17 14:47 | umartirena | Target Version | 3.0PR15Q1.3 => 3.0PR15Q1.4 |
2015-04-20 14:19 | hgbot | Checkin | |
2015-04-20 14:19 | hgbot | Note Added: 0076628 | |
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.0PR15Q1.4/rev/8bace9b56a9b0a1e145015e99ec5043967d75af9 [^] |
2015-04-20 14:20 | vmromanos | Review Assigned To | => vmromanos |
2015-04-20 14:20 | vmromanos | Note Added: 0076630 | |
2015-04-20 14:20 | vmromanos | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |