Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037331Retail ModulesWeb POSpublic2017-11-20 16:342018-08-09 17:16
asiermartirena 
rqueralta 
highmajoralways
closedfixed 
5
 
 
migueldejuana
No
0037331: The totalAmount button can be disabled for draft ticket
It is possible to have the total amount button disabled for a ticket in draft, when should be enabled.

This occurs when having a ticket with some lines and a total amount of 0, and a new ticket created in background. After moving from the new ticket to the one with amount 0, the total amount button maintains disable.
Create a ticket with some lines and a total amount of 0 (can be done setting the amount of each line to 0 or having positive and negative lines).

Click on the '*' button to have a new draft ticket.

Move to the other ticket.

Realize that the total amount button is still disable.
No tags attached.
diff clearWithProcess.diff (3,267) 2018-06-08 11:09
https://issues.openbravo.com/file_download.php?file_id=11841&type=bug
Issue History
2017-11-20 16:34asiermartirenaNew Issue
2017-11-20 16:34asiermartirenaAssigned To => asiermartirena
2017-11-20 16:34asiermartirenaTriggers an Emergency Pack => No
2017-11-22 15:41hgbotCheckin
2017-11-22 15:41hgbotNote Added: 0100668
2017-11-22 15:41hgbotStatusnew => resolved
2017-11-22 15:41hgbotResolutionopen => fixed
2017-11-22 15:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2c61812255231dbb9823511d34a1ebf19157d554 [^]
2017-12-01 12:36migueldejuanaNote Added: 0100892
2017-12-01 12:36migueldejuanaStatusresolved => new
2017-12-01 12:36migueldejuanaResolutionfixed => open
2018-05-28 03:54rqueraltaAssigned Toasiermartirena => rqueralta
2018-06-07 03:48hgbotCheckin
2018-06-07 03:48hgbotNote Added: 0104990
2018-06-07 03:48hgbotStatusnew => resolved
2018-06-07 03:48hgbotResolutionopen => fixed
2018-06-07 03:48hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2c61812255231dbb9823511d34a1ebf19157d554 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3edd617ad84f0475cb3f517a624678e499af2081 [^]
2018-06-07 11:56migueldejuanaNote Added: 0105000
2018-06-07 11:56migueldejuanaStatusresolved => new
2018-06-07 11:56migueldejuanaResolutionfixed => open
2018-06-07 16:21migueldejuanaNote Edited: 0105000bug_revision_view_page.php?bugnote_id=0105000#r17269
2018-06-07 16:21migueldejuanaNote Edited: 0105000bug_revision_view_page.php?bugnote_id=0105000#r17270
2018-06-07 16:21migueldejuanaNote Edited: 0105000bug_revision_view_page.php?bugnote_id=0105000#r17271
2018-06-08 11:09migueldejuanaFile Added: clearWithProcess.diff
2018-06-11 15:37hgbotCheckin
2018-06-11 15:37hgbotNote Added: 0105065
2018-06-11 16:02rqueraltaStatusnew => scheduled
2018-06-11 16:02rqueraltaStatusscheduled => resolved
2018-06-11 16:02rqueraltaResolutionopen => fixed
2018-06-11 17:09migueldejuanaReview Assigned To => migueldejuana
2018-06-11 17:09migueldejuanaNote Added: 0105068
2018-06-11 17:09migueldejuanaStatusresolved => closed
2018-08-09 17:16alekosmp86Note Added: 0106263

Notes
(0100668)
hgbot   
2017-11-22 15:41   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2c61812255231dbb9823511d34a1ebf19157d554
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Nov 20 16:36:30 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2c61812255231dbb9823511d34a1ebf19157d554 [^]

Fixed issue 37331: The totalAmount button can be disabled for draft ticket

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
---
(0100892)
migueldejuana   
2017-12-01 12:36   
The function disabledChanged has this:

    function requirementsAreMet(model) {
      // This function is in charge of managing all the requirements of the pay button to be enabled and disabled
      // Any attribute or parameter used to change the state of the button MUST be managed here
(0104990)
hgbot   
2018-06-07 03:48   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 3edd617ad84f0475cb3f517a624678e499af2081
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Jun 06 11:46:34 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/3edd617ad84f0475cb3f517a624678e499af2081 [^]

Fixed issue 37331: The totalAmount button can be disabled for draft ticket

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
---
(0105000)
migueldejuana   
2018-06-07 11:56   
(edited on: 2018-06-07 16:21)
Please, fix following topics:

- When pushing a commit, write a detailed explanation of what was done in the changeset.

- Perhaps we could replace this:
requirements.isReceiptLinesLengthGreaterThanZero = (model.get('orderList').current.get('lines').length > 0) ? model.get('orderList').current.get('lines').length > 0 : receipt.get('lines').length > 0;

with this(check if this would work in all cases):
requirements.isReceiptLinesLengthGreaterThanZero = model.get('orderList').current.get('lines').length > 0

- The following case is not covered yet:
1.- Login Webpos
2.- Add a product
3.- Set the price of the line to 0
4.- The total button is 0.00 and it is enabled
5.- Press F5
6.- ERROR! It is 0.00 but is disabled and it should be enabled

(0105065)
hgbot   
2018-06-11 15:37   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 36215ed446756625d45a43bd1eb83b57818bf06c
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Sat Jun 09 23:47:34 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/36215ed446756625d45a43bd1eb83b57818bf06c [^]

Related to issue 37331: The totalAmount button can be disabled for draft ticket

- Creates a Mobile Process for clearWith. clearWith is the function which sets
the order attributes

---
M src-db/database/sourcedata/OBMOBC_PROCESS_DEFINITION.xml
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
---
(0105068)
migueldejuana   
2018-06-11 17:09   
Tested and reviewed
(0106263)
alekosmp86   
2018-08-09 17:16   
Added automated test

https://code.openbravo.com/tools/automation/pi-mobile/rev/7c3ec1908496 [^]