Subversion Repositories SmartDukaan

Rev

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

Rev 26013 Rev 27198
Line 118... Line 118...
118
		var itemId = $("#scanModel .itemId").val();
118
		var itemId = $("#scanModel .itemId").val();
119
		var postData = JSON.stringify({"itemId":parseInt(itemId),"invoiceNumber":invoiceNumber,"serialNumbers":imeis});
119
		var postData = JSON.stringify({"itemId":parseInt(itemId),"invoiceNumber":invoiceNumber,"serialNumbers":imeis});
120
		doPostAjaxRequestWithJsonHandler(context+"/scanSerialized", postData, function(response){
120
		doPostAjaxRequestWithJsonHandler(context+"/scanSerialized", postData, function(response){
121
			if(typeof loaderDialogObj!="undefined")
121
			if(typeof loaderDialogObj!="undefined")
122
				loaderDialogObj.modal('hide');
122
				loaderDialogObj.modal('hide');
123
			setTimeout(function(){
-
 
124
				bootbox.alert("Purchase booked successfully");
123
			bootbox.alert("Purchase booked successfully", function() {
125
				$("#purchase-reference-submit-button").click();
-
 
126
				$('#scanModel').modal('hide');
124
				$('#scanModel').modal('hide');
-
 
125
				$("#purchase-reference-submit-button").click();
127
			}, 300);
126
			});
128
		});
127
		});
129
		return false;
128
		return false;
130
	});
129
	});
131
	
130
	
132
	$("#grnNonSerializedSubmit").live('click', function(){
131
	$("#grnNonSerializedSubmit").live('click', function(){
Line 142... Line 141...
142
		doPostAjaxRequestWithJsonHandler(context+"/scanNonSerialized", postData, function(response){
141
		doPostAjaxRequestWithJsonHandler(context+"/scanNonSerialized", postData, function(response){
143
			if(typeof loaderDialogObj!="undefined")
142
			if(typeof loaderDialogObj!="undefined")
144
			{
143
			{
145
				loaderDialogObj.modal('hide');
144
				loaderDialogObj.modal('hide');
146
			}
145
			}
147
			$("#purchase-reference-submit-button").click();
-
 
148
			setTimeout(function(){
-
 
149
				bootbox.alert("Purchase booked successfully");
146
			bootbox.alert("Purchase booked successfully", function() {
150
				$('#scanModel').modal('hide');
147
				$('#scanModel').modal('hide');
-
 
148
				$("#purchase-reference-submit-button").click();
151
			}, 300);
149
			});
152
		});
150
		});
153
		return false;
151
		return false;
154
	});
152
	});
155
 
153
 
156
	$("#grnImeiInformation :input").live('change', function() {
154
	$("#grnImeiInformation :input").live('change', function() {