Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039978Retail ModulesWeb POSpublic2019-01-18 14:242019-02-04 09:10
adrianromero 
adrianromero 
urgentmajorhave not tried
closedfixed 
5
 
RR19Q2 
marvintm
No
0039978: Tapping on the show services button in a negative line raises an error
If activated all the remote preferences. In a receipt with a return line that has a product with services, tapping on the show services button an error is raised.

The exception raised in the backed is:
2019-01-18 13:46:13,038 [http-bio-8080-exec-2] ERROR org.openbravo.mobile.core.process.ProcessHQLQuery - org.openbravo.retail.posterminal.master.Product: Error when generating query: null (null)
java.lang.NumberFormatException: null
    at java.math.BigDecimal.<init>(BigDecimal.java:494) ~[?:1.8.0_191]
    at java.math.BigDecimal.<init>(BigDecimal.java:383) ~[?:1.8.0_191]
    at java.math.BigDecimal.<init>(BigDecimal.java:806) ~[?:1.8.0_191]
    at org.openbravo.retail.posterminal.ServicesHQLCriteria.getHQLFilter(ServicesHQLCriteria.java:31) ~[ServicesHQLCriteria.class:?]
    at org.openbravo.retail.posterminal.ServicesHQLCriteria$Proxy$_$$_WeldClientProxy.getHQLFilter(ServicesHQLCriteria$Proxy$_$$_WeldClientProxy.java) ~[ServicesHQLCriteria.class:?]
    at org.openbravo.mobile.core.process.SimpleQueryBuilder$HQLCriteria.getPart(SimpleQueryBuilder.java:572) ~[SimpleQueryBuilder$HQLCriteria.class:?]

The error is because in this line: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/web/org.openbravo.retail.posterminal/js/components/servicesfilter.js#l241 [^]
minimumSelected === Infinity
1. In backend set all "Enable Remote..." preferences to 'Y'
2. Login in web pos add add a line with the product "Sofa"
3. Select the created line and tap on the button "Return Line". The quantity becomes -1.
4. Tap on the "Show services" button

Observe an error is raised
No tags attached.
Issue History
2019-01-18 14:24adrianromeroNew Issue
2019-01-18 14:24adrianromeroAssigned To => Retail
2019-01-18 14:24adrianromeroTriggers an Emergency Pack => No
2019-01-18 14:30adrianromeroDescription Updatedbug_revision_view_page.php?rev_id=18154#r18154
2019-01-18 14:30adrianromeroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18156#r18156
2019-01-18 14:49marvintmResolution time => 1548975600
2019-01-19 19:28rqueraltaAssigned ToRetail => rqueralta
2019-01-22 12:05hgbotCheckin
2019-01-22 12:05hgbotNote Added: 0109066
2019-01-22 12:05hgbotStatusnew => resolved
2019-01-22 12:05hgbotResolutionopen => fixed
2019-01-22 12:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/da22035f94c0b492f9a36477f8f53e05641293eb [^]
2019-01-24 10:08adrianromeroNote Added: 0109145
2019-01-24 10:08adrianromeroStatusresolved => new
2019-01-24 10:08adrianromeroResolutionfixed => open
2019-01-24 18:02adrianromeroAssigned Torqueralta => adrianromero
2019-01-24 18:02adrianromeroStatusnew => scheduled
2019-01-30 11:28hgbotCheckin
2019-01-30 11:28hgbotNote Added: 0109324
2019-01-30 11:28hgbotStatusscheduled => resolved
2019-01-30 11:28hgbotResolutionopen => fixed
2019-01-30 11:28hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/da22035f94c0b492f9a36477f8f53e05641293eb [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f0f44765333f38066245922f375090f747317b9f [^]
2019-01-30 11:28hgbotCheckin
2019-01-30 11:28hgbotNote Added: 0109325
2019-02-03 02:51hgbotCheckin
2019-02-03 02:51hgbotNote Added: 0109456
2019-02-04 09:10marvintmReview Assigned To => marvintm
2019-02-04 09:10marvintmStatusresolved => closed
2019-02-04 09:10marvintmFixed in Version => RR19Q2

Notes
(0109066)
hgbot   
2019-01-22 12:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: da22035f94c0b492f9a36477f8f53e05641293eb
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Mon Jan 21 17:14:07 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/da22035f94c0b492f9a36477f8f53e05641293eb [^]

Fixed issue 39978: Tapping on the show services button in a negative line raises
an error

- Replaced Infinity by Number.MAX_VALUE property

---
M web/org.openbravo.retail.posterminal/js/components/servicesfilter.js
---
(0109145)
adrianromero   
2019-01-24 10:08   
This fix does not work in Oracle. This is the error raised:

2019-01-24 06:11:17,643 [ajp-bio-127.0.0.1-8009-exec-1] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ORA-01426: numeric overflow
(0109324)
hgbot   
2019-01-30 11:28   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f0f44765333f38066245922f375090f747317b9f
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jan 24 18:14:39 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f0f44765333f38066245922f375090f747317b9f [^]

Fixes issue 39978: Tapping on the show services button in a negative line raises an error
Using 999999999999 as a safe maximum value common for PostgreSQL and Oracle

---
M web/org.openbravo.retail.posterminal/js/components/servicesfilter.js
---
(0109325)
hgbot   
2019-01-30 11:28   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9ffb537e19fa7e5990c18708339d5d5cff39586f
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Tue Jan 29 08:59:20 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9ffb537e19fa7e5990c18708339d5d5cff39586f [^]

Related to issue 39978: Tapping on the show services button in a negative line raises an error

---
M web/org.openbravo.retail.posterminal/js/components/servicesfilter.js
---
(0109456)
hgbot   
2019-02-03 02:51   
Repository: tools/automation/pi-mobile
Changeset: c598a2ae8f094631bbae0508029e738eada0f9d3
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Tue Jan 22 11:48:54 2019 -0500
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c598a2ae8f094631bbae0508029e738eada0f9d3 [^]

Related to issue 39978: added automated test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/services/I39978_VerifyNoErrorOnShowServicesInNegativeLine.java
---