| Line 196... |
Line 196... |
| 196 |
}
|
196 |
}
|
| 197 |
});
|
197 |
});
|
| 198 |
|
198 |
|
| 199 |
var $html = $('<tr> <td> <input type="text" class="form-control typeaheaditem" autocomplete="off" placeholder="Search Model"/> </td> <td> <input type="number" class="form-control qty" name = "qty" placeholder="Quantity"/> </td><td> <input type="number" class="form-control transferPrice" disable placeholder="Transfer Price"/> </td> <td> <input type="number" class="form-control totalValue" disable placeholder="Total Value"/> </td> <td> <input class="form-control btn btn-primary removeInPurchaseOrder" type="button" value="Remove"></td> </tr> ');
|
199 |
var $html = $('<tr> <td> <input type="text" class="form-control typeaheaditem" autocomplete="off" placeholder="Search Model"/> </td> <td> <input type="number" class="form-control qty" name = "qty" placeholder="Quantity"/> </td><td> <input type="number" class="form-control transferPrice" disable placeholder="Transfer Price"/> </td> <td> <input type="number" class="form-control totalValue" disable placeholder="Total Value"/> </td> <td> <input class="form-control btn btn-primary removeInPurchaseOrder" type="button" value="Remove"></td> </tr> ');
|
| 200 |
|
200 |
|
| - |
|
201 |
var vendorId = $('#vendorId').val();
|
| 201 |
|
202 |
|
| 202 |
|
203 |
|
| 203 |
getItemAheadOptions($html.find('.typeaheaditem'), true, function(
|
204 |
getVendorItemAheadOptions($html.find('.typeaheaditem'), vendorId, function(
|
| 204 |
selectedItem) {
|
205 |
selectedItem) {
|
| 205 |
var itemId = selectedItem.itemId;
|
206 |
var itemId = selectedItem.itemId;
|
| 206 |
|
207 |
|
| 207 |
var vendorId = $('#vendorId').val();
|
- |
|
| 208 |
|
- |
|
| 209 |
if (purchaseItemIds.indexOf(itemId) > -1) {
|
208 |
if (purchaseItemIds.indexOf(itemId) > -1) {
|
| 210 |
alert("item already selected");
|
209 |
alert("item already selected");
|
| 211 |
$html.find('.typeaheaditem').val("")
|
210 |
$html.find('.typeaheaditem').val("")
|
| 212 |
|
211 |
|
| 213 |
return false;
|
212 |
return false;
|