176 lines
5.6 KiB
PHP
176 lines
5.6 KiB
PHP
<?php include ('techsyn_header.php'); ?>
|
|
<!-- Main Content Container for side bar and body-->
|
|
<div class="main-container ace-save-state" id="main-container">
|
|
<script type="text/javascript">
|
|
try { ace.settings.loadState('main-container') } catch (e) { }
|
|
</script>
|
|
<?php include ('techsyn_sidebar.php'); ?>
|
|
|
|
<!--breadcrumb-->
|
|
<div class="main-content">
|
|
<div class="main-content-inner">
|
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
|
<ul class="breadcrumb">
|
|
|
|
<li class="#">Inventory Management</li>
|
|
<li class="active">Pending CleanUp Expiry List</li>
|
|
</ul>
|
|
</div>
|
|
<!-- End of breadcrumb -->
|
|
|
|
<div class="page-content">
|
|
<div id="flexigridDiv" class="table-responsive">
|
|
|
|
<form name="f1" method="post" action="" id="flex_form_procurement">
|
|
<div id="flex1" style="width:100%">
|
|
</div>
|
|
<input type="hidden" name="flex_procurement_id" id="flex_procurement_id" />
|
|
<input type="hidden" name="item_id" id="item_id" />
|
|
</form>
|
|
<form name="export_form" method="post" id="export_form" action="">
|
|
<input type="hidden" name="flex_medical_form" id="flex_medical_form" />
|
|
<input type="hidden" name="pdf_action" id="pdf_action" value="pending_expiry_list_pdf.php" />
|
|
<input type="hidden" name="excel_action" id="excel_action"
|
|
value="pending_expiry_list_excel.php" />
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div><!-- /.page-content -->
|
|
</div>
|
|
</div><!-- /.main-content -->
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
var w = screen.width * .90;
|
|
var h = 0;
|
|
h = (window.innerHeight - ($("#navbar").height() + $(".breadcrumbs").height())) * .75;
|
|
$("#flex1").flexigrid({
|
|
url: 'pending_expiry_list_script.php',
|
|
dataType: 'json',
|
|
colModel: [
|
|
{ display: 'Sr', name: 'count', width: w * .04, sortable: false, align: 'left' },
|
|
{ display: 'Item ', name: 'item_id', width: w * .3, sortable: true, align: 'left' },
|
|
{ display: 'Total Qty', name: 'item_stock_id', width: w * .1, sortable: true, align: 'left' },
|
|
{ display: 'Consumption Qty', name: 'item_stock_id', width: w * .1, sortable: true, align: 'left' },
|
|
{ display: 'Available Qty', name: 'item_stock_id', width: w * .1, sortable: true, align: 'left' },
|
|
{ display: 'Batch', name: 'item_stock_id', width: w * .1, sortable: true, align: 'left' },
|
|
{ display: 'Expiry Date', name: 'expiry_date', width: w * .1, sortable: true, align: 'left' },
|
|
{ display: '', name: '', width: w * .1, sortable: true, align: 'left' },
|
|
|
|
|
|
],
|
|
buttons: [
|
|
|
|
|
|
{ name: 'PDF', bclass: 'print', onpress: pdf },
|
|
{ separator: true },
|
|
{ name: 'Excel', bclass: 'print_excel', onpress: excel },
|
|
{ separator: true }
|
|
],
|
|
searchitems: [
|
|
|
|
// {display: 'Parent ID', name: 'parent_id', isdefault: true},
|
|
{ display: 'Item', name: 'item' },
|
|
{ display: 'Qty', name: 'qty' },
|
|
{ display: 'Batch', name: 'batch' },
|
|
{ display: 'Expiry Date (dd/mm/yyyy)', name: 'expiry' },
|
|
{ display: 'Expiry Date Between (dd/mm/yyyy-dd/mm/yyyy)', name: 'expiry_date_between' },
|
|
|
|
],
|
|
sortname: "expiry_date",
|
|
sortorder: "desc",
|
|
usepager: true, //pagination
|
|
|
|
useRp: true,
|
|
rp: 50, //records per page
|
|
showTableToggleBtn: false, //toggle button for the whole table
|
|
resizable: true,
|
|
//width: w,
|
|
height: h,
|
|
singleSelect: true
|
|
});
|
|
});
|
|
|
|
|
|
|
|
function add() {
|
|
location.href = "procurement.php";
|
|
}
|
|
|
|
function pdf() {
|
|
//window.open('pdf_manage_item.php');
|
|
|
|
window.open('ajax_pdf.php', 'Pending Expiry List');
|
|
}
|
|
function excel() {
|
|
window.open('ajax_excel.php', 'Pending Expiry List');
|
|
}
|
|
var item_stock_id1 = "";
|
|
function open_pending_expiry(item_stock_id) {
|
|
//$("#modal-pending-cleanup").modal("show")
|
|
item_stock_id1 = item_stock_id;
|
|
$.ajax({
|
|
url: 'get_pending_expiry_item.php',
|
|
type: "POST",
|
|
data: { item_stock_id: item_stock_id },
|
|
dataType: 'json',
|
|
success: function (data) {
|
|
//$("#pending_expiry_details").remove("tr:gt(0)");
|
|
$("#pending_expiry_details").find("tr:gt(0)").remove();
|
|
|
|
var content = "";
|
|
if (data != null && data != "") {
|
|
|
|
content = "<tr><td>" + data.itemwithformname + "</td><td>" + data.stock_qty + "</td><td>" + data.item_batch_no + "</td><td>" + data.expiry_date + "</td><td><input type=\"hidden\" readonly name=\"item_stock_id\" value=" + item_stock_id + " id=\"item_stock_id\"/><input type=\"hidden\" readonly name=\"item_id\" value=" + data.item_id + " id=\"item_id\"/><input type=\"hidden\" readonly name=\"batch_no\" value=" + data.item_batch_no + " id=\"batch_no\"/><input type=\"text\" readonly name=\"cleanup_qty\" value=" + data.stock_qty + " id=\"cleanup_qty\"/></td></tr>"
|
|
}
|
|
$("#pending_expiry_details").append(content);
|
|
$("#modal-pending-cleanup").modal("show")
|
|
|
|
/*if(data.indexOf("SUCCESS")!=-1){
|
|
BootstrapDialog.alert('Item Successfully.');
|
|
//$("#flex1").flexReload();
|
|
|
|
}else{
|
|
BootstrapDialog.alert('Error Deleting Item');
|
|
}*/
|
|
return;
|
|
},
|
|
error: function (data) {
|
|
BootstrapDialog.alert('Error Pulling Item Details');
|
|
return;
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function save_pending_expiry() {
|
|
$.ajax({
|
|
url: 'save_pending_expiry_item.php',
|
|
type: "POST",
|
|
data: $("#pending_cleanup_form").serialize(),
|
|
dataType: 'json',
|
|
success: function (data) {
|
|
BootstrapDialog.alert('CleanUp Activity For Expiry Items Successfully');
|
|
$("#flex1").flexReload();
|
|
return;
|
|
},
|
|
error: function (data) {
|
|
BootstrapDialog.alert('Error In CleanUp Activity For Expiry Items Successfully');
|
|
return;
|
|
}
|
|
});
|
|
$('.close').click();
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
<?php include ('pending_cleanup_expiry_list.php'); ?>
|
|
<?php include ('techsyn_footer.php'); ?>
|