Subversion Repositories SmartDukaan

Rev

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

Rev 30725 Rev 30730
Line 49... Line 49...
49
			$(this).focus();
49
			$(this).focus();
50
			return;
50
			return;
51
		}
51
		}
52
 
52
 
53
		calculateTotalAmount();
53
		calculateTotalAmount();
54
		//$('.mk_check_plans').click();
54
		$('.mk_check_plans').trigger('click', ['manual']);
55
	});
55
	});
56
 
56
 
57
 
57
 
58
	$(document).on('change', "form#cd input.insuranceamount", function () {
58
	$(document).on('change', "form#cd input.insuranceamount", function () {
59
		calculateTotalAmount();
59
		calculateTotalAmount();
Line 61... Line 61...
61
 
61
 
62
	$(document).on('click', ".create-order", function () {
62
	$(document).on('click', ".create-order", function () {
63
		checkout("main-content");
63
		checkout("main-content");
64
	});
64
	});
65
 
65
 
66
	$(document).on('click', ".mk_check_plans", function () {
66
	$(document).on('click', ".mk_check_plans", function (event, source) {
67
		$('div.itemdetails').find('input').val('');
67
		$('div.itemdetails').find('input').val('');
68
		var mop = parseFloat($(this).data("mop"));
68
		var mop = parseFloat($(this).data("mop"));
69
		var sellingPrice = $(this).val();
69
		var sellingPrice = $(this).val();
70
		var itemId = $(this).closest(".input-group").find("input.insuranceamount").attr("itemid");
70
		var itemId = $(this).closest(".input-group").find("input.insuranceamount").attr("itemid");
71
		if (!isNaN(sellingPrice) && parseFloat(sellingPrice) >= mop) {
71
		if (!isNaN(sellingPrice) && parseFloat(sellingPrice) >= mop) {
Line 82... Line 82...
82
			var obj = JSON.parse(response);
82
			var obj = JSON.parse(response);
83
			if (obj != null) {
83
			if (obj != null) {
84
				getInsurancePlansModal(obj);
84
				getInsurancePlansModal(obj);
85
				planCheckedOn = that;
85
				planCheckedOn = that;
86
				return;
86
				return;
-
 
87
			} else {
-
 
88
				if (typeof source === "undefined") {
-
 
89
					alert("Product is not eligible for insurance");
-
 
90
				}
87
			}
91
			}
88
		});
92
		});
89
	});
93
	});
90
 
94
 
91
});
95
});