Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036298Openbravo ERPZ. Otherspublic2017-06-20 13:102017-07-05 19:41
maite 
collazoandy4 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q2.23.0PR17Q2.2 
aferraz
Advanced Payables and Receivables Mngmt
Production - QA Approved
2017-03-04
3.0PR17Q2
https://code.openbravo.com/erp/devel/pi/rev/321aa371a03d [^]
No
0036298: 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-06-20 13:52aferrazTypedefect => backport
2017-06-20 13:52aferrazTarget Version => 3.0PR17Q2.1
2017-06-27 09:08vmromanosTarget Version3.0PR17Q2.1 => 3.0PR17Q2.2
2017-07-05 19:40hgbotCheckin
2017-07-05 19:40hgbotNote Added: 0097886
2017-07-05 19:40hgbotStatusscheduled => resolved
2017-07-05 19:40hgbotResolutionopen => fixed
2017-07-05 19:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q2.2/rev/7ee5d680c8a61eca271a1f2591e0e678893c1b83 [^]
2017-07-05 19:41aferrazReview Assigned To => aferraz
2017-07-05 19:41aferrazNote Added: 0097888
2017-07-05 19:41aferrazStatusresolved => closed
2017-07-05 19:41aferrazFixed in Version => 3.0PR17Q2.2

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

Fixes issue 36298: 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
---
(0097888)
aferraz   
2017-07-05 19:41   
Code review + Testing OK