Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036386Openbravo ERPZ. Otherspublic2017-06-20 13:102017-07-05 19:40
maite 
collazoandy4 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q33.0PR17Q3 
aferraz
Advanced Payables and Receivables Mngmt
Production - QA Approved
2017-03-04
3.0PR17Q2
https://code.openbravo.com/erp/devel/pi/rev/321aa371a03d [^]
No
0036386: Wrong schedule details information when Voiding an invoice which is prepaid via sales order
In case prepaid order has several invoices related and one of them is voided:
  - proper dummy payment is created to cancel voided invoice's schedule detail
  - the other invoice's schedule detail is wrongly updated
1. Register Sales Order for "Alimentos y Supermercados, S.A" and Invoice terms=immediate
2. Remove record added in Basic Discount tab, to simplify the flow
3. Add new line for product "Agua sin Gas 1L", price=53 and tax= Ventas exentas
4. Add new line for product "Agua sin Gas 1L", price=53 and tax= Ventas exentas
5. Add new line for product "Agua sin Gas 1L", price=53 and tax= Ventas exentas
6. Process order
7. Run Add payment to completely prepaid the order
8. Register Sales Invoice for "Alimentos y Supermercados, S.A", run "create lines from" and select one line. Process invoice
9. Register another Sales Invoice for "Alimentos y Supermercados, S.A", run "create lines from" and select one line. Process invoice
10. Access to payment related with the order and verify that Lines information is correct: there are 3 lines with amount 53. 2 of them related with each previous invoice and the other no associated to any invoice
11. Access last Sales Invoice and run "Void" process
12. Come back to the payment and realize that there are only 2 lines (which is correct as invoice's detail has been associated with created dummy payment) but that line related with invoice has incorrect amount of 106 instead of 53
No tags attached.
blocks defect 0036297 closed collazoandy4 Wrong schedule details information when Voiding an invoice which is prepaid via sales order 
Issue History
2017-07-03 11:22aferrazTypedefect => backport
2017-07-03 11:22aferrazTarget Version => 3.0PR17Q3
2017-07-05 19:39hgbotCheckin
2017-07-05 19:39hgbotNote Added: 0097885
2017-07-05 19:39hgbotStatusscheduled => resolved
2017-07-05 19:39hgbotResolutionopen => fixed
2017-07-05 19:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q3/rev/4f8b6743e711346236cc1d2043ab6ffd9e43565d [^]
2017-07-05 19:40aferrazReview Assigned To => aferraz
2017-07-05 19:40aferrazNote Added: 0097887
2017-07-05 19:40aferrazStatusresolved => closed
2017-07-05 19:40aferrazFixed in Version => 3.0PR17Q3

Notes
(0097885)
hgbot   
2017-07-05 19:39   
Repository: erp/backports/3.0PR17Q3
Changeset: 4f8b6743e711346236cc1d2043ab6ffd9e43565d
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Fri Jun 23 10:40:44 2017 -0400
URL: http://code.openbravo.com/erp/backports/3.0PR17Q3/rev/4f8b6743e711346236cc1d2043ab6ffd9e43565d [^]

Fixes issue 36386: Wrong schedule details when voiding a prepaid invoice

The void process of prepaid invoice was taking into account all payments schedule
detail to update their amount with the invoice payment schedule amount.

Now the order payment schedule detail update it it's the one not asociated to any invoice
or a new one is created if the order have no pending payment schedule detail.

The invoice prepayment amount was also incorrect when the invoice is created from
CreateInvoicesFromOrder process and the order have a discount line.

Now the compute of prepayment amount is made without join the order lines to prevent
duplicate the payment schedule paidamt.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
M src-db/database/model/functions/C_INVOICE_POST.xml
---
(0097887)
aferraz   
2017-07-05 19:40   
Code review + Testing OK