Subversion Repositories SmartDukaan

Rev

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

Rev 28395 Rev 28479
Line 80... Line 80...
80
		var $element = $(this);
80
		var $element = $(this);
81
		var unitPrice = parseFloat($element.val());
81
		var unitPrice = parseFloat($element.val());
82
		if (!isNaN(unitPrice)) {
82
		if (!isNaN(unitPrice)) {
83
			var itemType = parseFloat($(this).closest('tr').find('.serialNumber').attr("itemType"));
83
			var itemType = parseFloat($(this).closest('tr').find('.serialNumber').attr("itemType"));
84
			var mopPrice = parseFloat($(this).attr('mopPrice'));
84
			var mopPrice = parseFloat($(this).attr('mopPrice'));
-
 
85
			var isMop = parseBoolean($(this).attr('isMop'));
85
			var dp = parseFloat($(this).attr('dp'));
86
			var dp = parseFloat($(this).attr('dp'));
86
			var mrp = parseFloat($(this).attr('mrp'));
87
			var mrp = parseFloat($(this).attr('mrp'));
87
			if (mrp != 0 && unitPrice > mrp) {
88
			if (mrp != 0 && unitPrice > mrp) {
88
				alert("Selling Price should not be greater than MRP");
89
				alert("Selling Price should not be greater than MRP");
89
				$element.addClass("border-highlight");
90
				$element.addClass("border-highlight");
90
			} else if (!accessoriesDeals && unitPrice < mopPrice) {
91
			} else if (!accessoriesDeals && unitPrice < mopPrice) {
91
				alert("Selling Price must be greater than equal to MOP");
92
				alert("Selling Price must be greater than equal to MOP");
92
				$element.addClass("border-highlight");
93
				$element.addClass("border-highlight");
93
			} else if (itemType == 'SERIALIZED' && unitPrice < mopPrice) {
94
			} else if (itemType == 'SERIALIZED' && unitPrice < mopPrice) {
-
 
95
				if(isMop) {
94
				alert("Selling Price must be greater than equal to MOP");
96
					alert("Selling Price must be greater than equal to MOP");
95
				$element.addClass("border-highlight");
97
					$element.addClass("border-highlight");
-
 
98
				}
96
			} else if (itemType == 'NON_SERIALIZED' && unitPrice < dp) {
99
			} else if (itemType == 'NON_SERIALIZED' && unitPrice < dp) {
97
				alert("Selling Price must be greater than equal to DP");
100
				alert("Selling Price must be greater than equal to DP");
98
				$element.addClass("border-highlight");
101
				$element.addClass("border-highlight");
99
			} else {
102
			} else {
100
				$element.removeClass("border-highlight");
103
				$element.removeClass("border-highlight");