Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040223Retail ModulesWeb POSpublic2019-02-15 13:492019-03-04 15:28
aaroncalero 
rqueralta 
highmajoralways
closedfixed 
5
 
RR19Q2 
marvintm
No
0040223: The HasServices process can return wrong information if a service has no price defined
When a product is added to a ticket in WebPOS in remote mode, the HasServices process is called to check if said product has related services (in non-remote mode websql queries are used).

In the process, there is a where clause[1] that expects the product to have a price defined and to be active. These clauses will always be true, since the product has been added to a ticket in WebPOS.

Although the active clause already exists for the services in another line in the query, the price clause is not checked for the services, which can cause the query to return more results that it should.


[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/src/org/openbravo/retail/posterminal/process/HasServices.java#l112 [^]
Login in backend.
Go to the Preference window and enable the Remote For Products preference
Go to the Product window, find the Customize Pants service and remove its price.

Login in web pos.
Add the product Pants
Verify that the Mandatory Services search is shown, but the services list is empty.
Click on Continue
Click on the Services icon on the Pants line and verify again that no services are shown on the product search.
The clause that is causing this error[1] should be changed to filter services that have no price, instead of filtering the product.

[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/src/org/openbravo/retail/posterminal/process/HasServices.java#l112 [^]
No tags attached.
Issue History
2019-02-15 13:49aaroncaleroNew Issue
2019-02-15 13:49aaroncaleroAssigned To => Retail
2019-02-15 13:49aaroncaleroResolution time => 1549234800
2019-02-15 13:49aaroncaleroTriggers an Emergency Pack => No
2019-02-16 04:13rqueraltaAssigned ToRetail => rqueralta
2019-02-16 04:14rqueraltaStatusnew => scheduled
2019-02-18 08:00guillermogilResolution time1549234800 => 1551654000
2019-02-24 14:03hgbotCheckin
2019-02-24 14:03hgbotNote Added: 0110041
2019-02-24 14:03hgbotStatusscheduled => resolved
2019-02-24 14:03hgbotResolutionopen => fixed
2019-02-24 14:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/56dfd5b6b6ed93cd1ad33921bd87b95c81643e80 [^]
2019-02-25 15:41hgbotCheckin
2019-02-25 15:41hgbotNote Added: 0110069
2019-03-01 09:30marvintmReview Assigned To => marvintm
2019-03-01 09:30marvintmStatusresolved => closed
2019-03-01 09:30marvintmFixed in Version => RR19Q2
2019-03-04 15:28hgbotCheckin
2019-03-04 15:28hgbotNote Added: 0110198

Notes
(0110041)
hgbot   
2019-02-24 14:03   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 56dfd5b6b6ed93cd1ad33921bd87b95c81643e80
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Feb 21 15:35:40 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/56dfd5b6b6ed93cd1ad33921bd87b95c81643e80 [^]

Fixed issue 40223: The HasServices process can return wrong information if a
service has no price defined

- The HQL where clause was changed to filter services without price

---
M src/org/openbravo/retail/posterminal/process/HasServices.java
---
(0110069)
hgbot   
2019-02-25 15:41   
Repository: tools/automation/pi-mobile
Changeset: fa361dc75e2b5ebb21df09f4aaecbd3576220e11
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Thu Feb 21 11:18:31 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/fa361dc75e2b5ebb21df09f4aaecbd3576220e11 [^]

Related to issue 40223: added automated test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/services/I40223_VerifyServicesWithNoPrices.java
---
(0110198)
hgbot   
2019-03-04 15:28   
Repository: tools/automation/pi-mobile
Changeset: 482b02d22ef943324acc7c1d9828a45bb219b508
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Fri Mar 01 10:45:36 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/482b02d22ef943324acc7c1d9828a45bb219b508 [^]

Related to issue 40223: test has been refactored to properly test the issue's fix

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/services/I40223_VerifyServicesWithNoPrices.java
---