Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039191Retail ModulesCash uppublic2018-08-27 13:562018-10-02 13:30
Leyre 
gorka_gil 
immediatemajoralways
closedfixed 
5
 
RR18Q4 
marvintm
Production - Confirmed Stable
2017-07-24
RR17Q4
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4effbcf40012566124172b75b2fc0a9c5ed6a893 [^]
No
0039191: Incorrect grouping by ad_user_id in SQL of insert invoice headers in cash-up process
There is a difference in the grouping of insert invoice headers and insert invoice lines during the cash-up process.
OrderGroupingProcessor_data.xsql:

The SQL of insert invoice header( grouping orders and no grouping orders), it is grouped by ad_user_id, unlike the SQL of insert invoice lines.

It may be caused by https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4effbcf40012566124172b75b2fc0a9c5ed6a893 [^]
No tags attached.
depends on backport 0039389RR18Q3.2 closed gorka_gil Incorrect grouping by ad_user_id in SQL of insert invoice headers in cash-up process 
depends on backport 0039390RR18Q2.4 closed gorka_gil Incorrect grouping by ad_user_id in SQL of insert invoice headers in cash-up process 
caused by defect 0036468 closed ranjith_qualiantech_com [SERQA 3100] User is not set for Invoices created in Cashup process 
diff issue39191.diff (3,365) 2018-08-31 12:24
https://issues.openbravo.com/file_download.php?file_id=12099&type=bug
Issue History
2018-08-27 13:56LeyreNew Issue
2018-08-27 13:56LeyreAssigned To => Retail
2018-08-27 13:56LeyreResolution time => 1537135200
2018-08-27 13:56LeyreTriggers an Emergency Pack => No
2018-08-27 14:44LeyrePriorityurgent => immediate
2018-08-27 14:57LeyreResolution time1537135200 => 1535580000
2018-08-27 14:58LeyreSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17574#r17574
2018-08-28 07:53ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-08-28 07:53ranjith_qualiantech_comStatusnew => scheduled
2018-08-28 08:09ranjith_qualiantech_comRelationship addedcaused by 0036468
2018-08-28 14:50jfrancesIssue Monitored: jfrances
2018-08-28 16:15achavesIssue Monitored: achaves
2018-08-29 09:25ranjith_qualiantech_comFile Added: issue 39191 source posterminal.patch
2018-08-29 09:25marvintmNote Added: 0106512
2018-08-29 09:25marvintmAssigned Toranjith_qualiantech_com => Leyre
2018-08-29 09:25marvintmStatusscheduled => feedback
2018-08-30 08:40LeyreNote Added: 0106528
2018-08-30 08:42LeyreAssigned ToLeyre => Retail
2018-08-30 08:42LeyreStatusfeedback => new
2018-08-30 15:25marvintmFile Deleted: issue 39191 source posterminal.patch
2018-08-31 12:24marvintmFile Added: issue39191.diff
2018-09-03 13:10gorka_gilAssigned ToRetail => gorka_gil
2018-09-03 13:29hgbotCheckin
2018-09-03 13:29hgbotNote Added: 0106584
2018-09-03 13:29hgbotStatusnew => resolved
2018-09-03 13:29hgbotResolutionopen => fixed
2018-09-03 13:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6887f3de710760293d267067bc0039daa2669299 [^]
2018-09-07 14:53marvintmReview Assigned To => marvintm
2018-09-07 14:53marvintmStatusresolved => closed
2018-09-07 14:53marvintmFixed in Version => RR18Q4
2018-10-02 13:28marvintmStatusclosed => new
2018-10-02 13:28marvintmResolutionfixed => open
2018-10-02 13:28marvintmFixed in VersionRR18Q4 =>
2018-10-02 13:28marvintmStatusnew => scheduled
2018-10-02 13:28marvintmStatusscheduled => resolved
2018-10-02 13:28marvintmFixed in Version => RR18Q4
2018-10-02 13:28marvintmResolutionopen => fixed
2018-10-02 13:28marvintmStatusresolved => closed
2018-10-02 13:30marvintmRegression level => Production - Confirmed Stable
2018-10-02 13:30marvintmRegression date => 2017-07-24
2018-10-02 13:30marvintmRegression introduced in release => RR17Q4
2018-10-02 13:30marvintmRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4effbcf40012566124172b75b2fc0a9c5ed6a893 [^]

Notes
(0106512)
marvintm   
2018-08-29 09:25   
Attached a possible solution for the problem. We need to validate that it is fully correct with the customer customizations
(0106528)
Leyre   
2018-08-30 08:40   
This patch has been tried but it does not work correctly.

The steps to reproduce the problem:

1. Generate a sales order in a POS Terminal, with a customer without contact (ad_user_id=null)

2. Add a contact to the same customer and generate more sales order.

3. Do the cash up and verify that it generates incorrect invoices.

** Possible solution:
In the query that inserts the lines, add to the clause where :

coalesce(i.ad_user_id,'') = coalesce(o.ad_user_id,'')
(0106584)
hgbot   
2018-09-03 13:29   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6887f3de710760293d267067bc0039daa2669299
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Mon Sep 03 13:29:05 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6887f3de710760293d267067bc0039daa2669299 [^]

Fixes issue 39191 : fix the grouping for invoices generated in cashup process

Add ad_user_id to the grouping in missing sqls.

Add condition that ad_user of the invoice and the order is the same.

If ad_user null, used coalesce to set to '1', for compare since nulls can not be compared.
Note: Used '1' instead '', because oracle consired '' like a null and con not be compared neither.

---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor_data.xsql
---