Subversion Repositories SmartDukaan

Rev

Rev 35458 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35458 Rev 35459
Line 50... Line 50...
50
    $(document).on('click', ".create-order", function () {
50
    $(document).on('click', ".create-order", function () {
51
        checkout("main-content");
51
        checkout("main-content");
52
    });
52
    });
53
 
53
 
54
    $(document).on('click', ".mk_check_plans", function (event, source) {
54
    $(document).on('click', ".mk_check_plans", function (event, source) {
-
 
55
        console.log("checkPlansssssss99999");
55
        let lines = $("#order-items").find('tbody>tr:gt(0)').length;
56
        let lines = $("#order-items").find('tbody>tr:gt(0)').length;
56
        if (lines > 3) {
57
        if (lines > 3) {
-
 
58
            //No need to check plans
57
            return;
59
            return;
58
        }
60
        }
59
        $('div.itemdetails').find('input').val('');
61
        $('div.itemdetails').find('input').val('');
-
 
62
        let price = mop;
60
        var mop = parseFloat($(this).data("mop"));
63
        var mop = parseFloat($(this).data("mop"));
61
        var sellingPrice = $(this).val();
64
        var sellingPrice = $(this).val();
62
        var itemId = $(this).closest(".input-group").find("input.insuranceamount").attr("itemid");
65
        var itemId = $(this).closest(".input-group").find("input.insuranceamount").attr("itemid");
63
        var price;
-
 
64
        if (!isNaN(sellingPrice) && parseFloat(sellingPrice) >= mop) {
66
        if (!isNaN(sellingPrice) && parseFloat(sellingPrice) >= mop) {
65
            price = parseFloat(sellingPrice);
67
            price = parseFloat(sellingPrice);
66
        } else {
68
        } else {
67
            price = mop;
69
            price = mop;
68
        }
70
        }