287 lines
5.8 KiB
PHP
287 lines
5.8 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="#">Requisition </li>
|
|
<li class="active">Add Requisiton</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="req_id" id="req_id" />
|
|
</form>
|
|
<form name="export_form" method="post" id="export_form" action="">
|
|
|
|
<input type="hidden" name="pdf_action" id="pdf_action" value="pdf_requisition_list.php" />
|
|
<input type="hidden" name="excel_action" id="excel_action" value="excel_requisition_list.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: 'requisition_list_script.php',
|
|
dataType: 'json',
|
|
colModel: [{
|
|
display: 'Sr',
|
|
name: 'count',
|
|
width: w * .02,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Requisition No',
|
|
name: 'req_ref_no',
|
|
width: w * .08,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Requisition Date',
|
|
name: 'req_date',
|
|
width: w * .08,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'OHC Location',
|
|
name: '',
|
|
width: w * .07,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Item Desc',
|
|
name: '',
|
|
width: w * .18,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Requested Item Quantity',
|
|
name: '',
|
|
width: w * .2,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Pending Item Quantity',
|
|
name: '',
|
|
width: w * .2,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Issue Status',
|
|
name: '',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: 'Approval Status',
|
|
name: '',
|
|
width: w * .1,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
|
|
|
|
{
|
|
display: 'Remarks',
|
|
name: '',
|
|
width: w * .2,
|
|
sortable: true,
|
|
align: 'left'
|
|
},
|
|
{
|
|
display: '',
|
|
name: '',
|
|
width: w * .08,
|
|
sortable: false,
|
|
align: 'left'
|
|
},
|
|
|
|
|
|
],
|
|
buttons: [
|
|
|
|
{
|
|
name: 'Add',
|
|
bclass: 'add',
|
|
onpress: add
|
|
},
|
|
{
|
|
separator: true
|
|
},
|
|
{
|
|
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: 'Requisition Refno',
|
|
name: 'req_ref_no'
|
|
},
|
|
{
|
|
display: 'Requisition Date(DD/MM/YYYY)',
|
|
name: 'req_date'
|
|
},
|
|
{
|
|
display: 'Item Code',
|
|
name: 'item_code'
|
|
},
|
|
{
|
|
display: 'Item Desc',
|
|
name: 'item_desc'
|
|
},
|
|
{
|
|
display: 'Ohc Location',
|
|
name: 'ohc_location'
|
|
},
|
|
{
|
|
display: 'Remarks ',
|
|
name: 'remarks'
|
|
}
|
|
|
|
],
|
|
sortname: "req_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 open_requisition(req_id, action) {
|
|
if (action == "V") {
|
|
$("#req_id").val(req_id);
|
|
$("#flex_form_procurement").attr('method', 'POST');
|
|
$("#flex_form_procurement").attr('action', 'view_requisition.php');
|
|
$("#flex_form_procurement").submit();
|
|
} else {
|
|
$("#req_id").val(req_id);
|
|
$("#flex_form_procurement").attr('method', 'POST');
|
|
$("#flex_form_procurement").attr('action', 'edit_requisition.php');
|
|
$("#flex_form_procurement").submit();
|
|
}
|
|
|
|
}
|
|
|
|
function open_requisition_pdf(req_id) {
|
|
$("#req_id").val(req_id);
|
|
$("#flex_form_procurement").attr('target', '_blank');
|
|
$("#flex_form_procurement").attr('method', 'POST');
|
|
$("#flex_form_procurement").attr('action', 'requsition_pdf.php');
|
|
$("#flex_form_procurement").submit();
|
|
}
|
|
|
|
function add() {
|
|
location.href = "add_requisition.php";
|
|
}
|
|
|
|
function pdf() {
|
|
//window.open('pdf_manage_item.php');
|
|
|
|
window.open('ajax_pdf.php', 'Requisition List');
|
|
}
|
|
|
|
function excel() {
|
|
window.open('ajax_excel.php', 'Requisition List');
|
|
}
|
|
|
|
function download_template() {
|
|
window.location = 'download_template.php';
|
|
}
|
|
|
|
function upload_excel() {
|
|
window.location = 'upload_excel_procurement.php';
|
|
}
|
|
|
|
function delete_requisition(req_id) {
|
|
|
|
BootstrapDialog.confirm('Are you sure to delete the Requisition?', function(result) {
|
|
if (result) {
|
|
$.ajax({
|
|
url: 'delete_requisition.php',
|
|
type: "POST",
|
|
data: {
|
|
req_id: req_id
|
|
},
|
|
success: function(data) {
|
|
if (data.indexOf("SUCCESS") != -1) {
|
|
BootstrapDialog.alert('Requisition Deleted Successfully.');
|
|
$("#flex1").flexReload();
|
|
|
|
} else {
|
|
BootstrapDialog.alert('Error Deleting Requisition');
|
|
}
|
|
return;
|
|
},
|
|
error: function(data) {
|
|
BootstrapDialog.alert('Error Deleting Requisition');
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
</script>
|
|
|
|
<?php include('techsyn_footer.php'); ?>
|