|
|
|
@ -163,6 +163,7 @@
|
|
|
|
|
<li class="active"><a href="#tab_1" data-toggle="tab">Search by Model No.</a></li>
|
|
|
|
|
<li><a href="#tab_2" data-toggle="tab">Search by Series</a></li>
|
|
|
|
|
<li><a href="#tab_3" data-toggle="tab">Search by Description</a></li>
|
|
|
|
|
<li><a href="#tab_4" data-toggle="tab">Search by Itemcode</a></li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="tab-content">
|
|
|
|
@ -187,7 +188,7 @@
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="txtSeriesNoInquiry" class="col-lg-2 control-label">Series No:</label>
|
|
|
|
|
<div class="col-lg-9">
|
|
|
|
|
<input type="text" id="txtSeriesNoInquiry" name="txtSeriesNoInquiry" class="form-control" placeholder="Enter Model Number">
|
|
|
|
|
<input type="text" id="txtSeriesNoInquiry" name="txtSeriesNoInquiry" class="form-control" placeholder="Enter Series Number">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-lg-1">
|
|
|
|
|
<button type="submit" class="btn btn-primary">Search</button>
|
|
|
|
@ -211,6 +212,21 @@
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.tab-pane -->
|
|
|
|
|
<div class="tab-pane" id="tab_4">
|
|
|
|
|
<p>Search for an item by Itemcode</p>
|
|
|
|
|
<form class="form-horizontal" id="frmItemcodeInquiry" name="frmItemcodeInquiry">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="txtItemcodeInquiry" class="col-lg-2 control-label">Itemcode:</label>
|
|
|
|
|
<div class="col-lg-9">
|
|
|
|
|
<input type="text" id="txtItemcodeInquiry" name="txtItemcodeInquiry" class="form-control" placeholder="Enter Itemcode">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-lg-1">
|
|
|
|
|
<button type="submit" class="btn btn-primary">Search</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.tab-pane -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.tab-content -->
|
|
|
|
|
</div>
|
|
|
|
@ -399,7 +415,7 @@
|
|
|
|
|
' </div>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showIteminquiredInformation(data, htmlTable, KWHData, KWHStockReceived)
|
|
|
|
|
function showIteminquiredInformation(data, htmlTable, KWHData, KWHStockReceived, htmlListOfBranchWithNoItem)
|
|
|
|
|
{
|
|
|
|
|
return '<div class="box">' +
|
|
|
|
|
' <div class="box-header with-border">' +
|
|
|
|
@ -432,11 +448,20 @@
|
|
|
|
|
' <div class="row">' +
|
|
|
|
|
' <div class="col-lg-12">' +
|
|
|
|
|
' <table id="dtAvailabilityInBranches" class="table table-bordered table-striped">' +
|
|
|
|
|
' <thead><th>Itemcode</th><th>Branch</th><th>Qty</th></thead>' +
|
|
|
|
|
' <thead><th>Branch</th><th>Itemcode</th><th>Qty</th></thead>' +
|
|
|
|
|
' <tbody>' + htmlTable + '</tbody>' +
|
|
|
|
|
' </table>' +
|
|
|
|
|
' </div>' +
|
|
|
|
|
' </div>' +
|
|
|
|
|
' <h3>List of branches where there is no item supplied</h3>' +
|
|
|
|
|
' <div class="row">' +
|
|
|
|
|
' <div class="col-lg-12">' +
|
|
|
|
|
' <table id="dtListOfBranchWithNoItem" class="table table-bordered table-striped">' +
|
|
|
|
|
' <thead><th>Branch Code</th><th>Description</th></thead>' +
|
|
|
|
|
' <tbody>' + htmlListOfBranchWithNoItem + '</tbody>' +
|
|
|
|
|
' </table>' +
|
|
|
|
|
' </div>' +
|
|
|
|
|
' </div>' +
|
|
|
|
|
' <p>Beginning quantity: ' + ((KWHStockReceived == null) ? "0" : KWHStockReceived["qty"]) + '</p>' +
|
|
|
|
|
' <h3>Quantity Remaining in Warehouse: ' + KWHData["endingqty"] + '</h3>' +
|
|
|
|
|
' </div>' +
|
|
|
|
@ -475,7 +500,7 @@
|
|
|
|
|
modelno: $("#txtModelNoInquiry").val()
|
|
|
|
|
}, function(data) {
|
|
|
|
|
if (data["success"] == true) {
|
|
|
|
|
$("#resultContainerStoreInquiry").prepend(showIteminquiredInformation(data["data"], data["htmlTable"], data["KWHData"], data["KWHStockReceived"]));
|
|
|
|
|
$("#resultContainerStoreInquiry").prepend(showIteminquiredInformation(data["data"], data["htmlTable"], data["KWHData"], data["KWHStockReceived"], data["htmlListOfBranchWithNoItem"]));
|
|
|
|
|
} else {
|
|
|
|
|
$("#resultContainerStoreInquiry").prepend(errorMessage(data["data"]));
|
|
|
|
|
}
|
|
|
|
@ -509,6 +534,20 @@
|
|
|
|
|
}
|
|
|
|
|
}, "json");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#frmItemcodeInquiry").on("submit", function(e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
|
|
$.post("getItemInfoByItemcode", {
|
|
|
|
|
itemcode: $("#txtItemcodeInquiry").val()
|
|
|
|
|
}, function(data) {
|
|
|
|
|
if (data["success"] == true) {
|
|
|
|
|
$("#resultContainerStoreInquiry").prepend(showIteminquiredInformation(data["data"], data["htmlTable"], data["KWHData"], data["KWHStockReceived"]));
|
|
|
|
|
} else {
|
|
|
|
|
$("#resultContainerStoreInquiry").prepend(errorMessage(data["data"]));
|
|
|
|
|
}
|
|
|
|
|
}, "json");
|
|
|
|
|
});
|
|
|
|
|
// ------- /.Item Search Area -------
|
|
|
|
|
|
|
|
|
|
$(document).on("click", "#btnRenewCard", function() {
|
|
|
|
|