Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038809Retail ModulesDiscounts and Promotionspublic2018-06-21 17:462018-07-13 13:21
kchoperena 
rqueralta 
highmajoralways
closedfixed 
5
 
 
migueldejuana
No
0038809: [SERQA 4195]: JS error when applying discount without amount
There are several errors related to the next flow:

Apply a discount in WebPOS, checking previously product line check
(https://livebuilds.openbravo.com/retail_modules_pgsql_pi/web/org.openbravo.retail.posterminal/?terminal=YS-11#retail.pointofsale [^])
1.- Log into the WebPOS
2.- Create a new ticket
3.- Add a product
4.- Select previously added product line
5.- Click in DISCOUNT button
6.- Check the product line
7.- Select the discount disc_5_var_perc - 5%

EXPECTED RESULTS:

display JS Error ---- image: https://drive.google.com/open?id=13QqyFM6knuZqO26kyTbwcEnHUy5R4HDf [^]

video error:
https://drive.google.com/file/d/1YMy-bOZ1P2HY1Bn8DdENnAvtGGQKPIHY/view [^]
No tags attached.
? discounts_1.ogv (3,786,147) 2018-07-12 11:10
https://issues.openbravo.com/file_download.php?file_id=11947&type=bug
? discounts_2.ogv (4,679,668) 2018-07-12 11:26
https://issues.openbravo.com/file_download.php?file_id=11948&type=bug
Issue History
2018-06-21 17:46kchoperenaNew Issue
2018-06-21 17:46kchoperenaAssigned To => Retail
2018-06-21 17:46kchoperenaResolution time => 1530741600
2018-06-21 17:46kchoperenaTriggers an Emergency Pack => No
2018-06-28 14:01avicentePriorityurgent => high
2018-06-28 14:01avicenteSeveritycritical => major
2018-06-30 00:46rqueraltaAssigned ToRetail => rqueralta
2018-06-30 00:46rqueraltaStatusnew => scheduled
2018-07-03 17:43migueldejuanaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17374#r17374
2018-07-03 17:45migueldejuanaNote Added: 0105561
2018-07-04 15:04hgbotCheckin
2018-07-04 15:04hgbotNote Added: 0105577
2018-07-04 15:04hgbotStatusscheduled => resolved
2018-07-04 15:04hgbotResolutionopen => fixed
2018-07-04 15:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5db22f6f31dfb88f093b12098d2348b3729100df [^]
2018-07-06 13:08migueldejuanaNote Added: 0105661
2018-07-06 13:08migueldejuanaStatusresolved => new
2018-07-06 13:08migueldejuanaResolutionfixed => open
2018-07-09 18:47hgbotCheckin
2018-07-09 18:47hgbotNote Added: 0105688
2018-07-09 20:17rqueraltaStatusnew => scheduled
2018-07-09 20:17rqueraltaStatusscheduled => resolved
2018-07-09 20:17rqueraltaResolutionopen => fixed
2018-07-11 15:11hgbotCheckin
2018-07-11 15:11hgbotNote Added: 0105702
2018-07-12 11:10migueldejuanaFile Added: discounts_1.ogv
2018-07-12 11:26migueldejuanaFile Added: discounts_2.ogv
2018-07-12 11:28migueldejuanaNote Added: 0105711
2018-07-12 11:28migueldejuanaStatusresolved => new
2018-07-12 11:28migueldejuanaResolutionfixed => open
2018-07-12 23:21hgbotCheckin
2018-07-12 23:21hgbotNote Added: 0105717
2018-07-13 13:20migueldejuanaStatusnew => scheduled
2018-07-13 13:20migueldejuanaStatusscheduled => resolved
2018-07-13 13:20migueldejuanaResolutionopen => fixed
2018-07-13 13:21migueldejuanaReview Assigned To => migueldejuana
2018-07-13 13:21migueldejuanaNote Added: 0105740
2018-07-13 13:21migueldejuanaStatusresolved => closed

Notes
(0105561)
migueldejuana   
2018-07-03 17:45   
If you select the discount and the you check the line, it works.
(0105577)
hgbot   
2018-07-04 15:04   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5db22f6f31dfb88f093b12098d2348b3729100df
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Mon Jul 02 16:53:45 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5db22f6f31dfb88f093b12098d2348b3729100df [^]

Fixed issue 38809: [SERQA 4195]: JS error when applying discount without amount

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/ticketdiscount.js
---
(0105661)
migueldejuana   
2018-07-06 13:08   
1. The commit doesn't have a message explaining what was done.
2. Apply button get disabled and it mus be enabled:
  1.- Log into the WebPOS
  2.- Create a new ticket
  3.- Add a product
  4.- Select previously added product line
  5.- Click in DISCOUNT button
  6.- Check the product line
  7.- Select the discount disc_5_var_perc - 5%
  8.- ERROR! The Apply button is disabled!
(0105688)
hgbot   
2018-07-09 18:47   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c44191956005d3951e9c2f01b129cbd40ac4e9be
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Jul 06 15:25:23 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c44191956005d3951e9c2f01b129cbd40ac4e9be [^]

Related to issue 38809: [SERQA 4195]: JS error when applying discount without
amount

- Sometimes args.context.discounts is undefined but args.discountsContainer has
the corresponding discount, therefore now it is verified that
args.discountsContainer or args.discountsContainer.model is defined too

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/ticketdiscount.js
---
(0105702)
hgbot   
2018-07-11 15:11   
Repository: tools/automation/pi-mobile
Changeset: 66cb45a121d312ce0ca5e616aef31bb3424e7ba5
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Jul 04 11:22:02 2018 -0400
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/66cb45a121d312ce0ca5e616aef31bb3424e7ba5 [^]

Related to issue 38809: added automated test

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/I38809_VerifyDiscountWithoutAmount.java
---
(0105711)
migueldejuana   
2018-07-12 11:28   
See discounts_1.ogv: We can press Apply button without selecting any discount.
See discounts_2.ogv: When previously a discount is choosen in the selector, if we allow to press apply button without any discount selected, the last discount is applied.

Play with the discount functionality and ensure that all is working fine. Add more lines, different discounts...
(0105717)
hgbot   
2018-07-12 23:21   
Repository: erp/pmods/org.openbravo.retail.discounts.category
Changeset: 889a8cd9da8f0c658e7008e27cab23eb62fc573e
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Jul 12 14:29:32 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts.category/rev/889a8cd9da8f0c658e7008e27cab23eb62fc573e [^]

Related to issue 38809: [SERQA 4195]: JS error when applying discount without
amount

-Verified if disocuntList contect is diferent of OBPOS_LblReceiptDiscounts label
to enable or disable "Apply" button

---
M web/org.openbravo.retail.discounts.category/js/discountsButton.js
---
(0105740)
migueldejuana   
2018-07-13 13:21   
Tested and reviewed