Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037099Retail ModulesWeb POSpublic2017-10-18 11:192017-10-18 11:52
inaki_garcia 
Retail 
normalminoralways
newopen 
5
main 
 
No
0037099: [RR17Q4] [UX] [Digital Coupons] Unhandled JS error is returned when trying to add a digital coupon with a duplicate check number
In the Web POS, when adding a Digital Coupon to a receipt which already has a coupon with the same check number, a JavaScript error is shown instead of a field validation message which validates the "Check Number" field. This is a critical usability issue which should be addressed.
-- PRECONDITIONS --
- Digital Coupons for Retail has to be installed
- Configure the "Voucher" payment method to be used as "Digital Coupon" (step one of the following test case:
https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-10731 [^])
- At least one Issuing Company has to be set for the coupon. Execute the following steps to configure it:
-- In the backend (ERP) ---
0. Log in as user "Openbravo" with the role "The White Valley Group Admin"
1. Go to the Issuing Company window, and create a record with the following data:
- Code: 123456
- Name: Chèque Test
2. Go to the Accounts sub tab, and create a record with the following data:
- Organization: Vall Blanca Store
- Financial Account: Voucher - Vall Blanca Store - EUR

-- STEPS TO REPRODUCE --
0. Log in as user "vallblanca"
1. Create a receipt by adding some items, and click on the Total button to add the payments
2. Click on the "Voucher" payment method. A "Digital Coupon" titled popup will appear
3. Fill the fields to pay the receipt partially, and click on the "Add" button:
- Issuing company: <any_existing_coupon>
- Check Number: <any alphanumerical string>
- Amount: <a part of the amount of the total amount of the receipt>
- Expiration date: <date of today>
4. Repeat step 3 with the same "Check Number". NOTICE that the following error is shown, as also depicted in the attached picture:

TypeError: Cannot read property 'getCouponProperty' of undefined
    at 0363e73dc24986fbd041b53058d01417.js:3189
    at underscore-1.3.3.min.js:13
    at Array.some (<anonymous>)
    at b.some.b.any (underscore-1.3.3.min.js:14)
    at Function.b.find.b.detect (underscore-1.3.3.min.js:13)
    at 0363e73dc24986fbd041b53058d01417.js:3189
    at Array.forEach (<anonymous>)
    at Function.b.each.b.forEach (underscore-1.3.3.min.js:11)
    at Object.getCouponFromPayments (0363e73dc24986fbd041b53058d01417.js:3189)
    at Object.addNewCoupon (0363e73dc24986fbd041b53058d01417.js:3202); line: Object.OB.UTIL.showError (http://qa-retail.openbravo.com/openbravo/web/js/gen/0363e73dc24986fbd041b53058d01417.js:630:798 [^]) (*,+)

Uncaught TypeError: Cannot read property 'getCouponProperty' of undefined
    at 0363e73dc24986fbd041b53058d01417.js:3189
    at underscore-1.3.3.min.js:13
    at Array.some (<anonymous>)
    at b.some.b.any (underscore-1.3.3.min.js:14)
    at Function.b.find.b.detect (underscore-1.3.3.min.js:13)
    at 0363e73dc24986fbd041b53058d01417.js:3189
    at Array.forEach (<anonymous>)
    at Function.b.each.b.forEach (underscore-1.3.3.min.js:11)
    at Object.getCouponFromPayments (0363e73dc24986fbd041b53058d01417.js:3189)
    at Object.addNewCoupon (0363e73dc24986fbd041b53058d01417.js:3202)
No tags attached.
png error_when_adding_a_coupon_with_an_existing_id.png (281,818) 2017-10-18 11:19
https://issues.openbravo.com/file_download.php?file_id=11194&type=bug
Issue History
2017-10-18 11:19inaki_garciaNew Issue
2017-10-18 11:19inaki_garciaAssigned To => Retail
2017-10-18 11:19inaki_garciaFile Added: error_when_adding_a_coupon_with_an_existing_id.png
2017-10-18 11:19inaki_garciaTriggers an Emergency Pack => No
2017-10-18 11:21inaki_garciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16128#r16128
2017-10-18 11:52inaki_garciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16133#r16133

There are no notes attached to this issue.