Subversion Repositories SmartDukaan

Rev

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

Rev 35232 Rev 35458
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");
-
 
56
        let lines = $("#order-items").find('tbody>tr:gt(0)').length;
55
        let lines = $("#order-items").find('tbody>tr:gt(0)').length;
57
        if (lines > 3) {
56
        if (lines > 3) {
58
            //No need to check plans
-
 
59
            return;
57
            return;
60
        }
58
        }
61
        $('div.itemdetails').find('input').val('');
59
        $('div.itemdetails').find('input').val('');
62
        let price = mop;
-
 
63
        var mop = parseFloat($(this).data("mop"));
60
        var mop = parseFloat($(this).data("mop"));
64
        var sellingPrice = $(this).val();
61
        var sellingPrice = $(this).val();
65
        var itemId = $(this).closest(".input-group").find("input.insuranceamount").attr("itemid");
62
        var itemId = $(this).closest(".input-group").find("input.insuranceamount").attr("itemid");
-
 
63
        var price;
66
        if (!isNaN(sellingPrice) && parseFloat(sellingPrice) >= mop) {
64
        if (!isNaN(sellingPrice) && parseFloat(sellingPrice) >= mop) {
67
            price = parseFloat(sellingPrice);
65
            price = parseFloat(sellingPrice);
68
        } else {
66
        } else {
69
            price = mop;
67
            price = mop;
70
        }
68
        }