| 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(){
|
| 123 |
bootbox.alert("Purchase booked successfully");
|
124 |
bootbox.alert("Purchase booked successfully");
|
| 124 |
$("#scanModel").one("hidden.bs.modal", function () {
|
125 |
$("#scanModel").one("hidden.bs.modal", function () {
|
| 125 |
$("#purchase-reference-submit-button").click();
|
126 |
$("#purchase-reference-submit-button").click();
|
| 126 |
});
|
127 |
});
|
| 127 |
$('#scanModel').modal('hide');
|
128 |
$('#scanModel').modal('hide');
|
| - |
|
129 |
}, 300);
|
| 128 |
});
|
130 |
});
|
| 129 |
return false;
|
131 |
return false;
|
| 130 |
});
|
132 |
});
|
| 131 |
|
133 |
|
| 132 |
$("#grnNonSerializedSubmit").live('click', function(){
|
134 |
$("#grnNonSerializedSubmit").live('click', function(){
|
| Line 140... |
Line 142... |
| 140 |
var quantity = $("#scanNonSerializedModel .quantity").val();
|
142 |
var quantity = $("#scanNonSerializedModel .quantity").val();
|
| 141 |
var postData = JSON.stringify({"itemId":parseInt(itemId),"invoiceNumber":invoiceNumber,"quantity":parseInt(quantity)});
|
143 |
var postData = JSON.stringify({"itemId":parseInt(itemId),"invoiceNumber":invoiceNumber,"quantity":parseInt(quantity)});
|
| 142 |
doPostAjaxRequestWithJsonHandler(context+"/scanNonSerialized", postData, function(response){
|
144 |
doPostAjaxRequestWithJsonHandler(context+"/scanNonSerialized", postData, function(response){
|
| 143 |
if(typeof loaderDialogObj!="undefined")
|
145 |
if(typeof loaderDialogObj!="undefined")
|
| 144 |
loaderDialogObj.modal('hide');
|
146 |
loaderDialogObj.modal('hide');
|
| - |
|
147 |
setTimeout(function(){
|
| 145 |
bootbox.alert("Purchase booked successfully");
|
148 |
bootbox.alert("Purchase booked successfully");
|
| 146 |
$("#scanNonSerializedModel").one("hidden.bs.modal", function () {
|
149 |
$("#scanModel").one("hidden.bs.modal", function () {
|
| 147 |
$("#purchase-reference-submit-button").click();
|
150 |
$("#purchase-reference-submit-button").click();
|
| 148 |
});
|
151 |
});
|
| 149 |
$('#scanNonSerializedModel').modal('hide');
|
152 |
$('#scanModel').modal('hide');
|
| - |
|
153 |
}, 300);
|
| 150 |
});
|
154 |
});
|
| 151 |
return false;
|
155 |
return false;
|
| 152 |
});
|
156 |
});
|
| 153 |
|
157 |
|
| 154 |
$("#grnImeiInformation :input").live('change', function() {
|
158 |
$("#grnImeiInformation :input").live('change', function() {
|