Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0030439 | Openbravo ERP | Z. Others | public | 2015-07-28 13:48 | 2015-08-20 23:16 |
|
Reporter | ngarcia | |
Assigned To | aferraz | |
Priority | immediate | Severity | critical | 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 | OBPS |
Web browser | |
Modules | Advanced Payables and Receivables Mngmt |
Support ticket | 37618 |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0030439: Credit is consumed from other payment when refunding the difference to a customer who has available credit |
Description | Credit is consumed from other payment when refunding the difference to a customer who has available credit |
Steps To Reproduce | As group admin role:
Create a Payment In of 50 to a customer and leave the amount to be used later
Create a Sales Invoice of 60 to the same customer. Do not use the credit
Create a new Payment In of 70 to the same customer. Select the option to Refund the difference to the customer
Check the refund payment is pointing the payment where the credit was generated (first payment) instead of the payment where the invoice was paid (second payment): check the Used Credit Source tab of the refund payment and the used credit of the first payment |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-07-28 13:48 | ngarcia | New Issue | |
2015-07-28 13:48 | ngarcia | Assigned To | => Triage Finance |
2015-07-28 13:48 | ngarcia | OBNetwork customer | => Yes |
2015-07-28 13:48 | ngarcia | Modules | => Advanced Payables and Receivables Mngmt |
2015-07-28 13:48 | ngarcia | Support ticket | => 37618 |
2015-07-28 13:48 | ngarcia | Resolution time | => 1441058400 |
2015-07-28 13:48 | ngarcia | Triggers an Emergency Pack | => No |
2015-07-28 13:48 | ngarcia | Issue Monitored: networkb | |
2015-07-28 13:59 | jpcalvente | Issue Monitored: jpcalvente | |
2015-07-29 13:17 | ngarcia | Priority | urgent => immediate |
2015-07-29 13:17 | ngarcia | Severity | major => critical |
2015-08-04 11:23 | aferraz | Assigned To | Triage Finance => aferraz |
2015-08-05 13:50 | aferraz | Note Added: 0079201 | |
2015-08-05 13:54 | aferraz | Note Edited: 0079201 | bug_revision_view_page.php?bugnote_id=0079201#r9157 |
2015-08-07 08:36 | vmromanos | Status | new => scheduled |
2015-08-07 10:44 | vmromanos | Note Added: 0079245 | |
2015-08-07 10:47 | hgbot | Checkin | |
2015-08-07 10:47 | hgbot | Note Added: 0079246 | |
2015-08-07 10:47 | hgbot | Status | scheduled => resolved |
2015-08-07 10:47 | hgbot | Resolution | open => fixed |
2015-08-07 10:47 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/f0a9563883215bfb8e8d98eeeaf8b03aa55ef01e [^] |
2015-08-07 10:48 | vmromanos | Review Assigned To | => vmromanos |
2015-08-07 10:48 | vmromanos | Note Added: 0079247 | |
2015-08-07 10:48 | vmromanos | Status | resolved => closed |
2015-08-20 23:16 | hudsonbot | Checkin | |
2015-08-20 23:16 | hudsonbot | Note Added: 0079532 | |
Notes |
|
(0079201)
|
aferraz
|
2015-08-05 13:50
(edited on: 2015-08-05 13:54) |
|
Test Plan 1:
As F&B Admin:
Create a Payment In of 50 to a customer and leave the amount to be used later.
Create a Sales Invoice of 60 to the same customer. Do not use the credit.
Click on Add Payment.
Select an amount of 70.
Select the option to Refund the difference to the customer.
Check in the Used Credit Source tab of the refund payment, that it points to the payment where the invoice was paid (second payment).
Check also the Generated Credit and Used Credit fields of three payments are correct.
Test Plan 2:
As F&B Admin:
Create a Payment In of 50 to a customer and leave the amount to be used later.
Create a Sales Invoice of 60 to the same customer. Do not use the credit.
Click on Add Payment.
Select an amount of 70.
Select the available credit in Credit to Use grid.
Select the option to Refund the difference to the customer.
Check in the Used Credit Source tab of the refund payment, that a record points to the payment where the invoice was paid (second payment) with an amount of 10 and another record points to the payment where the credit was generated (first payment) with an amount of 50.
Check also the Generated Credit and Used Credit fields of three payments are correct.
Test Plan 3:
As F&B Admin:
Create a Payment In of 50 to a customer and leave the amount to be used later.
Create a Sales Invoice of 60 to the same customer. Do not use the credit.
Click on Add Payment.
Select an amount of 0.
Uncheck the invoice in the grid.
Select the available credit in Credit to Use grid.
Select the option to Refund the difference to the customer.
Check in the Used Credit Source tab of the refund payment, that a record points to the payment where the credit was generated (first payment) with an amount of 50.
Check also the Generated Credit and Used Credit fields of three payments are correct.
|
|
|
|
Before fixing this issue, the credit was consumed from the oldest to the newest one (FIFO).
After this fix, in case of a refund, the credit is directly consumed from the payment that pays the invoice and generates the refund (regardless of a previous credit payment already exists)
This is a semantic functional change that has been approved by DME because it makes it easier to understand the flow.
Since the data generated by the previous behavior is correct (amounts are correct, only the credit source is difference), we have decided not to create a script to modify the existing data. |
|
|
(0079246)
|
hgbot
|
2015-08-07 10:47
|
|
Repository: erp/devel/pi
Changeset: f0a9563883215bfb8e8d98eeeaf8b03aa55ef01e
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Aug 05 10:21:32 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f0a9563883215bfb8e8d98eeeaf8b03aa55ef01e [^]
Fixes issue 30439: Credit wrongly consumed when refunding a difference
When refunding a payment difference to a customer who has available credit, credit was consumed by first generated credit instead of current payment.
If case of refunding an amount generated as credit in the same payment, this payment will be now used to consume the credit, sending payment info through strSelectedCreditLinesIds parameter.
Then, updateUsedCredit method in FIN_PaymentProcess will link them correctly.
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java
---
|
|
|
|
|
|
|
|