Subversion Repositories SmartDukaan

Rev

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

Rev 34204 Rev 34798
Line 344... Line 344...
344
    var customerObj = {};
344
    var customerObj = {};
345
    var paymentOptionIdAmount = [];
345
    var paymentOptionIdAmount = [];
346
    var globalInsurance = false;
346
    var globalInsurance = false;
347
 
347
 
348
    $("#order-items").find("tr:not(:first-child)").each(function (index, el) {
348
    $("#order-items").find("tr:not(:first-child)").each(function (index, el) {
349
            // console.log(el);
349
        console.log("el------------", el);
350
            // console.log(index);
350
            // console.log(index);
351
            var $el = $(el);
351
            var $el = $(el);
352
            var $customerOfferItemId = $el.find('.offerSelect');
352
            var $customerOfferItemId = $el.find('.offerSelect');
353
            var $unitPriceElement = $el.find('.unitPrice');
353
            var $unitPriceElement = $el.find('.unitPrice');
354
            var itemId = parseInt($unitPriceElement.attr("itemId"));
354
            var itemId = parseInt($unitPriceElement.attr("itemId"));
Line 409... Line 409...
409
            var insuranceAmount = 0;
409
            var insuranceAmount = 0;
410
            if (insuranceEle.length > 0) {
410
            if (insuranceEle.length > 0) {
411
                insuranceAmount = parseFloat(insuranceEle.val());
411
                insuranceAmount = parseFloat(insuranceEle.val());
412
            }
412
            }
413
            var insuranceId = "";
413
            var insuranceId = "";
-
 
414
        var correlationId = "";
-
 
415
        var rawDate = "";
-
 
416
        var dateObj = new Date();
-
 
417
        var mfgdate = "";
-
 
418
 
414
            if (insuranceAmount > 0) {
419
        if (insuranceAmount > 0) {
415
                insuranceId = $(el).find('.insuranceid').val();
420
                insuranceId = $(el).find('.insuranceid').val();
-
 
421
            correlationId = $(el).find('.correlationid').val();
-
 
422
            rawDate = $(el).find('.mfgdate').val();
-
 
423
            dateObj = new Date(rawDate);
-
 
424
            mfgdate = dateObj.toISOString().split('.')[0];
416
            }
425
            }
417
            var ram = $(el).find('.ram').val();
426
            var ram = $(el).find('.ram').val();
418
            var memory = $(el).find('.memory').val();
427
            var memory = $(el).find('.memory').val();
-
 
428
 
419
            var mfgdate = $(el).find('.mfgdate').val();
429
        console.log("correlationId--------", correlationId);
420
            var serialNumberDetail = {
430
            var serialNumberDetail = {
421
                'serialNumber': $serialNumberElement.val(), 'insurance': insuranceId, 'amount': insuranceAmount,
431
                'serialNumber': $serialNumberElement.val(),
-
 
432
                'insurance': insuranceId,
-
 
433
                'correlationId': correlationId,
-
 
434
                'amount': insuranceAmount,
422
                'ram': ram, 'memory': memory, 'mfgDate': mfgdate
435
                'ram': ram, 'memory': memory, 'mfgDate': mfgdate
423
            };
436
            };
424
            tmpObj.serialNumberDetails.push(serialNumberDetail);
437
            tmpObj.serialNumberDetails.push(serialNumberDetail);
425
 
438
 
426
        }
439
        }