Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040350Retail ModulesDiscounts by Totalpublic2019-03-11 17:182019-03-29 12:00
asiermartirena 
rqueralta 
normalmajoralways
closedfixed 
5
 
RR19Q2 
marvintm
No
0040350: Actually is possible to check/uncheck by total discounts
When adding a discount by total, the check to add the discounts or not to the lines is hidden. Also, the check to set/unset the discount to all lines is hidden. This is because if a by total discount is set, it must be applied to all lines.

Currently is possible to click on the receipt lines and even if the check set on the lines is hidden, it status changes, but the change is not visible for the user. Even if is true that the 'Apply' button is disabled, it shouldn't be possible to change this value. A warning should be shown when clicking on the line telling that is not possible to set the discount to single lines for 'By total' discounts.
Having the discounts by total module installed, add a line and click on the discount button.
Search for the discount 'Fixed Amount Discount By Total - 23 EUR'.
Click on a receipt line. Realize that the 'Apply' button is disabled. The tap action shouldn't do anything for this type of discount.
No tags attached.
Issue History
2019-03-11 17:18asiermartirenaNew Issue
2019-03-11 17:18asiermartirenaAssigned To => Retail
2019-03-11 17:18asiermartirenaResolution time => 1554069600
2019-03-11 17:18asiermartirenaTriggers an Emergency Pack => No
2019-03-11 20:34rqueraltaAssigned ToRetail => rqueralta
2019-03-12 08:49guillermogilReproducibilityhave not tried => always
2019-03-15 23:13hgbotCheckin
2019-03-15 23:13hgbotNote Added: 0110464
2019-03-15 23:14hgbotStatusnew => resolved
2019-03-15 23:14hgbotResolutionopen => fixed
2019-03-15 23:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.category/rev/d4eed87b7b4892be52d0e99da28f06baddba68a4 [^]
2019-03-15 23:15hgbotCheckin
2019-03-15 23:15hgbotNote Added: 0110465
2019-03-15 23:15hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.category/rev/d4eed87b7b4892be52d0e99da28f06baddba68a4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/716a6f2936cfecb5a26a10b6f98946b46bd78e4d [^]
2019-03-15 23:28hgbotCheckin
2019-03-15 23:28hgbotNote Added: 0110466
2019-03-22 17:01hgbotCheckin
2019-03-22 17:01hgbotNote Added: 0110594
2019-03-28 19:15marvintmNote Added: 0110903
2019-03-28 19:15marvintmStatusresolved => new
2019-03-28 19:15marvintmResolutionfixed => open
2019-03-28 19:17marvintmNote Edited: 0110903bug_revision_view_page.php?bugnote_id=0110903#r18559
2019-03-29 03:38hgbotCheckin
2019-03-29 03:38hgbotNote Added: 0110908
2019-03-29 03:38hgbotStatusnew => resolved
2019-03-29 03:38hgbotResolutionopen => fixed
2019-03-29 03:38hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/716a6f2936cfecb5a26a10b6f98946b46bd78e4d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/0e80e09b7570255b6402ff901fc127a28d53c70d [^]
2019-03-29 03:39hgbotCheckin
2019-03-29 03:39hgbotNote Added: 0110909
2019-03-29 03:39hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/0e80e09b7570255b6402ff901fc127a28d53c70d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.category/rev/d00c83f447a813b07942f4b3d16fe24f2f1fbd87 [^]
2019-03-29 09:19marvintmReview Assigned To => marvintm
2019-03-29 12:00marvintmStatusresolved => closed
2019-03-29 12:00marvintmFixed in Version => RR19Q2

Notes
(0110464)
hgbot   
2019-03-15 23:13   
Repository: erp/pmods/org.openbravo.retail.discounts.category
Changeset: d4eed87b7b4892be52d0e99da28f06baddba68a4
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Mar 15 17:48:32 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.category/rev/d4eed87b7b4892be52d0e99da28f06baddba68a4 [^]

Fixed issue 40350: Actually is possible to check/uncheck by total discounts

- Added new hook to avoid set disable 'Apply' button by check/uncheck single
line

---
M web/org.openbravo.retail.discounts.category/js/discountsButton.js
---
(0110465)
hgbot   
2019-03-15 23:15   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 716a6f2936cfecb5a26a10b6f98946b46bd78e4d
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Mar 15 17:48:45 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/716a6f2936cfecb5a26a10b6f98946b46bd78e4d [^]

Fixed issue 40350: Actually is possible to check/uncheck by total discounts

- Added new hook to avoid set disable 'Apply' button by check/uncheck single
line

---
M src/org/openbravo/retail/discounts/bytotal/DiscTComponentProvider.java
A web/org.openbravo.retail.discounts.bytotal/js/enableApplyButtonHook.js
---
(0110466)
hgbot   
2019-03-15 23:28   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 0725fea211af2dfc243242113fef60e48be7006c
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Mar 15 18:28:04 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/0725fea211af2dfc243242113fef60e48be7006c [^]

Related to issue 40350: Actually is possible to check/uncheck by total discounts

- Added message to show a warning when clicking on the line

---
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0110594)
hgbot   
2019-03-22 17:01   
Repository: tools/automation/pi-mobile
Changeset: e77799e4069b0e13dcbec5b51e9fbb6a774ad145
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Tue Mar 19 13:17:19 2019 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/e77799e4069b0e13dcbec5b51e9fbb6a774ad145 [^]

Related to issue 40350: added automated test

---
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/discounts_bytotal/I40350_VerifyApplyButtonNotDisabledForDiscount.java
---
(0110903)
marvintm   
2019-03-28 19:15   
(edited on: 2019-03-28 19:17)
Two changes need to be made:

- Hook should not be called "OBPOS_enableApplyButtonHook". It should start by the prefix of the discounts category module instead of OBPOS, and it should have some more meaningful name in which the specific popup affected is mentioned
- It should handle potential asynchronous execution correctly, so the code after the execution of the hook should happen inside the hook callback.
- As the hook may or may not be executed, to avoid duplicating code, the code after the hook should be moved to a separate function, and the function should be called both from the hook callback, and also if the hook is not executed.

(0110908)
hgbot   
2019-03-29 03:38   
Repository: erp/pmods/org.openbravo.retail.discounts.bytotal
Changeset: 0e80e09b7570255b6402ff901fc127a28d53c70d
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Mar 28 22:31:53 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.bytotal/rev/0e80e09b7570255b6402ff901fc127a28d53c70d [^]

Fixed issue 40350: Actually is possible to check/uncheck by total discounts

- The name of the hook was changed to a more significant one.

---
M web/org.openbravo.retail.discounts.bytotal/js/enableApplyButtonHook.js
---
(0110909)
hgbot   
2019-03-29 03:39   
Repository: erp/pmods/org.openbravo.retail.discounts.category
Changeset: d00c83f447a813b07942f4b3d16fe24f2f1fbd87
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Mar 28 22:20:05 2019 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.category/rev/d00c83f447a813b07942f4b3d16fe24f2f1fbd87 [^]

Fixed issue 40350: Actually is possible to check/uncheck by total discounts

- Code after the execution of the hook was moved inside the hook callback.

---
M web/org.openbravo.retail.discounts.category/js/discountsButton.js
---