|View Issue Details|
|Type||Category||Severity||Reproducibility||Date Submitted||Last Update|
|defect||[Retail Modules] Web POS||major||always||2019-09-30 12:14||2019-10-18 13:13|
|Priority||high||Resolution||fixed||Fixed in Version||RR20Q1|
|Status||closed||Fix in branch||Fixed in SCM revision||961195450fef|
|OS Version||Database version||Ant version|
|Product Version||SCM revision|
|Review Assigned To||marvintm|
|Regression introduced in release|
|Regression introduced by commit|
|Triggers an Emergency Pack||No|
0041901: Services Query is not removing duplicated services in remote mode
|Description||When services related to a product are shown in webpos, services that are already added to the ticket are removed from the search list.|
When using the 'Enable Remote for Product' preference, if there are two services related to the same product, and services for the same product are shown, the removal of duplicates is not working and all services are shown on the Search tab.
|Steps To Reproduce||Log in backend, go to the Preference window and configure the preference 'Enable Remote for Product' with value 'Y'.|
Log in WebPOS
Create a new layaway
Search and add the product GPS Mini
The Mandatory services will be shown.
Add two of the services (i.e. Warranty (deferrable) and Warranty (not deferrable))
Click on Continue.
Click on the Show Related Services button of the GPS Mini.
Verify that all services are shown again, even if two of them are already added to the ticket.
If this happens in a Cancel and Replace or in an Order created from a Quotation, it is possible to add the same services again, and the relationship is duplicated in the line. When a ticket with duplicated relations is synchronized, an Error While Importing POS data is generated, with an error containing something like:
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "c_ordlinservrel_unique"
Detail: Key (c_orderline_id, c_orderline_related_id)=(98F335761254D06A16E7775158B27884, 86018679E82FB06ABC1921AF6DAAD375) already exists.
|Proposed Solution||In the ServicesHQLCriteria.java class, part of the hql filter is a filter to exclude products already added to the ticket ("and product.id not in ('$5')")|
This filter is sent from webpos as an array of IDs of the services already added. When there is more than one service, the filter is built wrong, and all services in the array are concatenated in a single comma-separated id instead of being a list of ids.
The issue is probably in the HQLCriteria inner class in SimpleQueryBuilder.java, in the replaceParams method.
|Tags||No tags attached.|
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Oct 09 10:04:22 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/961195450fef3743e3c891a002a32222815121d6 [^]
Fixed issue 41901: Services Query is not removing duplicated services in remote
- Removed join function to pass to the java class a right array object
|2019-09-30 12:14||aaroncalero||New Issue|
|2019-09-30 12:14||aaroncalero||Assigned To||=> Retail|
|2019-09-30 12:14||aaroncalero||Resolution time||=> 1571004000|
|2019-09-30 12:14||aaroncalero||Triggers an Emergency Pack||=> No|
|2019-09-30 12:19||aaroncalero||Steps to Reproduce Updated||View Revisions|
|2019-09-30 12:27||aaroncalero||Proposed Solution updated|
|2019-10-07 04:56||rqueralta||Assigned To||Retail => rqueralta|
|2019-10-07 04:57||rqueralta||Status||new => scheduled|
|2019-10-10 15:14||hgbot||Note Added: 0115003|
|2019-10-10 15:15||hgbot||Status||scheduled => resolved|
|2019-10-10 15:15||hgbot||Resolution||open => fixed|
|2019-10-10 15:15||hgbot||Fixed in SCM revision||=> http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/961195450fef3743e3c891a002a32222815121d6 [^]|
|2019-10-18 13:13||marvintm||Review Assigned To||=> marvintm|
|2019-10-18 13:13||marvintm||Status||resolved => closed|
|2019-10-18 13:13||marvintm||Fixed in Version||=> RR20Q1|
|Copyright © 2000 - 2009 MantisBT Group|