160 lines
4.3 KiB
PHP
Executable File
160 lines
4.3 KiB
PHP
Executable File
<?php
|
|
|
|
$DraftCount =0;
|
|
$StoreReqNo = '';
|
|
//echo $StoreReqNo;
|
|
|
|
if(!empty($Store))
|
|
{
|
|
foreach ($Store as $St)
|
|
{
|
|
|
|
if ($St->StatusName=='DRAFT')
|
|
{
|
|
$DraftCount++;
|
|
$StoreReqNo = $St->StoreReqNo;
|
|
}
|
|
|
|
}
|
|
//echo $StoreReqNo;
|
|
}?>
|
|
|
|
|
|
<style>
|
|
span.highlight {
|
|
background-color: yellow;
|
|
}
|
|
</style>
|
|
<div class="content-wrapper">
|
|
|
|
<section class="content">
|
|
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<div class="box">
|
|
<div class=" container-fluid">
|
|
<div class="box-header">
|
|
<CENTER><h3 class="box-title">Siddharth Industries - Requisition Listing</h3></CENTER>
|
|
</div>
|
|
<?php if($DraftCount > 0 ) { ?><p>
|
|
<span class="highlight">The Store Requisition No <b><?php echo $StoreReqNo;?></b> is in Draft status.</span> Please act on the requisition.<span class="highlight">Then only you can raise New StoreRequisition. </span>
|
|
</p> <?php } ?>
|
|
<div class="row">
|
|
<div class="col-xs-12 text-right" style="margin-bottom:-3%;">
|
|
<div class="form-group">
|
|
<?php if($DraftCount == 0)
|
|
{ ?>
|
|
<a class="btn btn-primary" href="<?php echo base_url(); ?>storerequisitionlist/addstores"/>Raise Store Requisition</a><?php
|
|
}?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table id="Requisition" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
|
<thead style="background-color:#ddf">
|
|
<tr>
|
|
<th>Store Requisition No</th>
|
|
<th>Tot No.OfLineItem </th>
|
|
<th>Issued Item Count</th>
|
|
<th>Pending Item Count</th>
|
|
<th>Status</th>
|
|
<th>Requested Date</th>
|
|
|
|
<th>Action</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if(!empty($Store))
|
|
{
|
|
// echo "VIEW";
|
|
// print_r($Store);
|
|
foreach($Store as $record)
|
|
{ //print_r($record);
|
|
?>
|
|
<tr>
|
|
<td><?php echo $record->StoreReqNo ?></td>
|
|
|
|
<td align="right"><?php echo $record->TotalNoofLineItems ?></td>
|
|
<td align="right"><?php echo $record->IssuesItems ?></td>
|
|
<td align="right"><?php echo $record->PendingItems ?></td>
|
|
|
|
|
|
|
|
<td><?php echo $record->StatusName ?></td>
|
|
<td align="right"><?php $dt = new DateTime($record->ReqDate);
|
|
$ReqDate = $dt->format('d-m-Y'); echo $ReqDate ?>
|
|
|
|
|
|
<td> <a data-toggle="tooltip" href="<?php echo base_url().'EditStoreRequisition?StoreReqNo='.$record->StoreReqNo; ?>"><i class="fa fa-pencil" data-toggle="tooltip" title="<?php echo $record->StoreReqNo; ?> - Click here to view addstorerequisitionslip"></i> </a> <a data-toggle="tooltip" onclick="DeleteRow('<?php echo $record->StoreReqNo; ?>' )" ><span class="glyphicon glyphicon-trash" title="<?php echo $record->StoreReqNo; ?> - Click here to Delete Requisition details"></span></a> </td>
|
|
</tr>
|
|
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
</div>
|
|
<script>
|
|
|
|
|
|
function DeleteRow(rowid)
|
|
{
|
|
|
|
id = rowid;
|
|
|
|
var answer = confirm(" Do you want to delete the Requisition?")
|
|
if (answer)
|
|
{
|
|
|
|
$.ajax({
|
|
data:{id:id},
|
|
type:"POST",
|
|
url:"<?php echo base_url() ?>storerequisitionlist/DeleteReqNo",
|
|
success:function(data) {
|
|
if(data)
|
|
{
|
|
$('#content').loader('hide');
|
|
alert(data);
|
|
|
|
location.reload();
|
|
|
|
|
|
}
|
|
else
|
|
{
|
|
alert("Error");
|
|
}
|
|
|
|
}});
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
<script>
|
|
$(function () {
|
|
|
|
$('#Requisition').DataTable({
|
|
"paging": true,
|
|
"lengthChange": true,
|
|
"searching": true,
|
|
"ordering": true,
|
|
"info": true,
|
|
"autoWidth": true
|
|
|
|
});
|
|
});
|
|
</script>
|