Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028551Retail ModulesWeb POSpublic2015-01-09 13:022015-03-30 11:31
jecharri 
mario_castello 
urgentmajoralways
closedfixed 
5
 
RR15Q2RR15Q2 
malsasua
No
0028551: Preference Web POS action Apply discount is not working fine the first time
Preference Web POS action Apply discount is not working fine the first time
-Configure a role as manual
-Go to Web POS
-Verify that by default you don't have permission to discount button
-Create a preference with property "Web POS action Apply discount" and value "Y"
-Refresh the browser
-Verify that preference has value true
OB.POS.terminal.terminal.attributes.permissions['OBPOS_order.discount']
false
but the button still is disabled
-Refresh again and button will be enabled
No tags attached.
related to design defect 0028832 closed Retail Changing the document or quotation prefix does not work in WebPOS 
causes defect 0030109 scheduled Retail keyboard discount button is disabled with preference set to N and automatic roles 
diff issue28551.diff (4,541) 2015-02-16 17:16
https://issues.openbravo.com/file_download.php?file_id=7795&type=bug
png Selection_116.png (314,800) 2015-03-10 19:02
https://issues.openbravo.com/file_download.php?file_id=7878&type=bug
png Selection_115.png (734,634) 2015-03-10 19:02
https://issues.openbravo.com/file_download.php?file_id=7879&type=bug
Issue History
2015-01-09 13:02jecharriNew Issue
2015-01-09 13:02jecharriAssigned To => marvintm
2015-01-09 13:02jecharriResolution time => 1423004400
2015-01-09 13:02jecharriTriggers an Emergency Pack => No
2015-01-13 16:02mario_castelloAssigned Tomarvintm => mario_castello
2015-01-13 16:02mario_castelloStatusnew => scheduled
2015-01-13 16:02mario_castellofix_in_branch => pi
2015-01-26 20:51hgbotCheckin
2015-01-26 20:51hgbotNote Added: 0073795
2015-01-26 20:51hgbotStatusscheduled => resolved
2015-01-26 20:51hgbotResolutionopen => fixed
2015-01-26 20:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b60cf73b8abef6d15c2486d7e120e059c3967f11 [^]
2015-01-27 15:30hgbotCheckin
2015-01-27 15:30hgbotNote Added: 0073816
2015-01-27 15:30hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b60cf73b8abef6d15c2486d7e120e059c3967f11 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d4142ec1a5ec12466f13f646de481845c121d146 [^]
2015-02-16 17:16migueldejuanaFile Added: issue28551.diff
2015-02-16 17:17migueldejuanaNote Added: 0074519
2015-02-16 17:17migueldejuanaStatusresolved => new
2015-02-16 17:17migueldejuanaResolutionfixed => open
2015-02-24 10:32OrekariaRelationship addedrelated to 0028832
2015-02-24 16:09hgbotCheckin
2015-02-24 16:09hgbotNote Added: 0074852
2015-02-24 16:09hgbotStatusnew => resolved
2015-02-24 16:09hgbotResolutionopen => fixed
2015-02-24 16:09hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d4142ec1a5ec12466f13f646de481845c121d146 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff3e2e0bb50898c7a441d36c7fb514e08736ce8a [^]
2015-02-24 17:25hgbotCheckin
2015-02-24 17:25hgbotNote Added: 0074865
2015-02-24 17:25hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff3e2e0bb50898c7a441d36c7fb514e08736ce8a [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9156df3b60fc984d8096ad0154b91e937d00cba4 [^]
2015-02-27 16:55marvintmReview Assigned To => marvintm
2015-02-27 16:55marvintmStatusresolved => closed
2015-02-27 16:55marvintmFixed in Version => RR15Q2
2015-03-10 19:02mtaalNote Added: 0075419
2015-03-10 19:02mtaalStatusclosed => new
2015-03-10 19:02mtaalResolutionfixed => open
2015-03-10 19:02mtaalFixed in VersionRR15Q2 =>
2015-03-10 19:02mtaalFile Added: Selection_116.png
2015-03-10 19:02mtaalFile Added: Selection_115.png
2015-03-10 21:37hgbotCheckin
2015-03-10 21:37hgbotNote Added: 0075422
2015-03-10 21:37hgbotStatusnew => resolved
2015-03-10 21:37hgbotResolutionopen => fixed
2015-03-10 21:37hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9156df3b60fc984d8096ad0154b91e937d00cba4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7564ee29fa2f328e32f2ae33aa458dee4e89d7d5 [^]
2015-03-30 11:30hgbotCheckin
2015-03-30 11:30hgbotNote Added: 0076123
2015-03-30 11:30hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7564ee29fa2f328e32f2ae33aa458dee4e89d7d5 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/11a3edf21d4db9c0e27bf88383bd59b48fab6fd5 [^]
2015-03-30 11:31malsasuaReview Assigned Tomarvintm => malsasua
2015-03-30 11:31malsasuaNote Added: 0076124
2015-03-30 11:31malsasuaStatusresolved => closed
2015-03-30 11:31malsasuaFixed in Version => RR15Q2
2015-06-10 13:18dmitry_mezentsevRelationship addedcauses 0030109

Notes
(0073795)
hgbot   
2015-01-26 20:51   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: b60cf73b8abef6d15c2486d7e120e059c3967f11
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Mon Jan 26 13:51:01 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b60cf73b8abef6d15c2486d7e120e059c3967f11 [^]

fixed issue 28551: Preference Web POS action Apply discount is not working fine the first time

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0073816)
hgbot   
2015-01-27 15:30   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: d4142ec1a5ec12466f13f646de481845c121d146
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Jan 27 08:29:19 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d4142ec1a5ec12466f13f646de481845c121d146 [^]

fixed issue 28551: Add validation

---
M web/org.openbravo.mobile.core/source/component/ob-keyboard.js
---
(0074519)
migueldejuana   
2015-02-16 17:17   
- We must backout the actual fix
- I have attached a possible solution, see issue28551.diff file
- Do not forget to apply JSBeautyfier and JSLint
(0074852)
hgbot   
2015-02-24 16:09   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ff3e2e0bb50898c7a441d36c7fb514e08736ce8a
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Feb 24 09:08:55 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff3e2e0bb50898c7a441d36c7fb514e08736ce8a [^]

fixed issue 28551: Correct validation and apply JSBeautyfier

---
M web/org.openbravo.mobile.core/source/component/ob-keyboard.js
---
(0074865)
hgbot   
2015-02-24 17:25   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 9156df3b60fc984d8096ad0154b91e937d00cba4
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Feb 24 10:23:55 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9156df3b60fc984d8096ad0154b91e937d00cba4 [^]

fixed issue 28551: Display information to the user that need to refresh the page

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0075419)
mtaal   
2015-03-10 19:02   
As far as I can see this fix causes a js error, see attached screenshots.

Specifically a call to OB.UTIL.isDisableDiscount like here:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff3e2e0bb508#l1.8 [^]

The OB.UTIL.isDisableDiscount function expects a second parameter a callback, this is not passed so it fails inside the OB.UTIL.isDisableDiscount. The OB.UTIL.isDisableDiscount does not return a value so is always false.

The js error can be reproduced by setting the apply discount preference and then creating a ticket and adding/removing lines.

I attached some screen shots.
(0075422)
hgbot   
2015-03-10 21:37   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7564ee29fa2f328e32f2ae33aa458dee4e89d7d5
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Mar 10 14:36:16 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7564ee29fa2f328e32f2ae33aa458dee4e89d7d5 [^]

fixed issue 28551: Change validation with OB.UTIL.isDisableDiscount function

---
M web/org.openbravo.mobile.core/source/component/ob-keyboard.js
---
(0076123)
hgbot   
2015-03-30 11:30   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 11a3edf21d4db9c0e27bf88383bd59b48fab6fd5
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Mon Mar 30 11:25:53 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/11a3edf21d4db9c0e27bf88383bd59b48fab6fd5 [^]

fixed issue 28551: changed variable name from 'indice' to 'i' + JSLint

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0076124)
malsasua   
2015-03-30 11:31   
verified