Subversion Repositories SmartDukaan

Rev

Rev 34798 | Rev 35232 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34798 Rev 34805
Line 361... Line 361...
361
                var $discountElement = $el.find('.discount');
361
                var $discountElement = $el.find('.discount');
362
                var $poiId = $el.find('.poiId');
362
                var $poiId = $el.find('.poiId');
363
                var unitPrice = parseFloat($unitPriceElement.val());
363
                var unitPrice = parseFloat($unitPriceElement.val());
364
                var discount = parseFloat($discountElement.val());
364
                var discount = parseFloat($discountElement.val());
365
                var poiId = $poiId.val();
365
                var poiId = $poiId.val();
366
                var customerOfferItemId;
366
                var customerOfferItemId = [];
367
                if ($customerOfferItemId) {
367
                if ($customerOfferItemId && $customerOfferItemId.length > 0) {
368
                    customerOfferItemId = $customerOfferItemId.val();
368
                    var selectedOption = $customerOfferItemId.find("option:selected");
-
 
369
                    var offerIds = selectedOption.data("customeroffer-ids");
369
                } else {
370
                    if (offerIds) {
-
 
371
                        customerOfferItemId = offerIds.toString().split(",").map(id => id.trim());
370
                    customerOfferItemId = 0;
372
                    }
371
                }
373
                }
372
 
374
 
373
                if (isNaN(discount)) {
375
                if (isNaN(discount)) {
374
                    discount = 0;
376
                    discount = 0;
375
                }
377
                }