Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029817Openbravo ERPZ. Otherspublic2015-05-07 18:182015-05-12 17:40
ngarcia 
aferraz 
urgentmajoralways
closedfixed 
5
 
pi 
umartirena
Core
No
0029817: Two invoices with the same document number are grouped when adding a payment
Two invoices with the same document number are grouped when adding a payment. They cannot be paid separately
As group admin role:
   Create a Sales Invoice and complete it
   Create another Sales Invoice header with the same values of the previous one (same document number too) but different document type and complete it
   Add a payment to it and check the outstanding amount is the sum of both invoices' total
   Repeat the process for the purchase flow and check it is wrong too
No tags attached.
Issue History
2015-05-07 18:18ngarciaNew Issue
2015-05-07 18:18ngarciaAssigned To => Triage Finance
2015-05-07 18:18ngarciaModules => Core
2015-05-07 18:18ngarciaResolution time => 1433973600
2015-05-07 18:18ngarciaTriggers an Emergency Pack => No
2015-05-07 18:20ngarciaIssue Monitored: networkb
2015-05-08 10:16aferrazStatusnew => scheduled
2015-05-08 10:16aferrazAssigned ToTriage Finance => aferraz
2015-05-08 12:41aferrazNote Added: 0077230
2015-05-11 17:56hgbotCheckin
2015-05-11 17:56hgbotNote Added: 0077301
2015-05-11 17:56hgbotStatusscheduled => resolved
2015-05-11 17:56hgbotResolutionopen => fixed
2015-05-11 17:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/bb2bb339df34f1b46d2adfbcca855947ff9e8670 [^]
2015-05-11 17:58umartirenaReview Assigned To => umartirena
2015-05-11 17:58umartirenaNote Added: 0077302
2015-05-11 17:58umartirenaStatusresolved => closed
2015-05-11 17:58umartirenaFixed in Version => pi
2015-05-12 17:40hudsonbotCheckin
2015-05-12 17:40hudsonbotNote Added: 0077348

Notes
(0077230)
aferraz   
2015-05-08 12:41   
Test plan:

As group admin role:
   Create a Sales Invoice and complete it
   Create another Sales Invoice header with the same values of the previous one (same document number too) but different document type and complete it
   Add a payment to it and check the outstanding amount is correct (the amount of the second invoice only)

Repeat the same flow for Purchase Invoice, Sales Order and Purchase Order
(0077301)
hgbot   
2015-05-11 17:56   
Repository: erp/devel/pi
Changeset: bb2bb339df34f1b46d2adfbcca855947ff9e8670
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri May 08 12:32:19 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bb2bb339df34f1b46d2adfbcca855947ff9e8670 [^]

Fixes issue 29817: Invoices with same documentno are grouped in Add Payment

Query in AddPaymentOrderInvoicesTransformer has been changed in order to take into account id and documenttype in the group by clause.
DocumentNo was taking into account but not id nor documenttype. Then, when there were two orders/invoices with the same documentno but different documenttypes, they were grouped in the Order/Invoice grid in Add Payment process.
Id group by has been added also to avoid grouping orders/invoices with the same documentno and documenttype.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java
---
(0077302)
umartirena   
2015-05-11 17:58   
Code Review + Testing OK

Issue tested in:
 * Sales/Purchase Order windows
 * Sales/Purchase Invoice windows
 * Payment In/Out windows
(0077348)
hudsonbot   
2015-05-12 17:40   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6d9fee60cdbd [^]
Maturity status: Test