siddharth_application/application/views/ogrlist.php
venbatechnologies@gmail.com 6d38bb5117 ogr change
2018-04-25 17:05:14 +05:30

147 lines
4.1 KiB
PHP

<style>
.pagination {
margin:0px !important;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<center><h3 class="box-title">Siddharth Industries-Outward Gate Entry List</h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-hover editableTable" style="font-size:12px;">
<thead>
<tr style="background-color:#ddf">
<th>#</th>
<th>OGR No</th>
<th>Type</th>
<th>PO/INVOICE No</th>
<th>MRIR No</th>
<th>Supplier/Customer Name</th>
<th>Date</th>
<th>Vehicle</th>
<th>Actions</th>
</tr>
</thead>
<tbody><?php
if(!empty($OGR_Data)){
$index = 0;
foreach($OGR_Data as $ogr)
{
$index =$index+1;
//$dt= $nc->Created_Date;
$Ddt = new DateTime($ogr->CreatedDate);
$dt = $Ddt->format('d-m-Y');
?>
<tr id="<?php echo $index ; ?>">
<td><?php echo $index;?></td>
<td><?php echo "OGR".$ogr->OGRNO;?></td>
<td><?php echo $ogr->OgrType;?></td>
<td><?php echo $ogr->PONO_INV;?></td>
<td><?php echo $ogr->MRIRNO;?></td>
<?php if($ogr->OgrType == 'PO'){?>
<td><?php echo $ogr->SupplierName?></td>
<? } else{ ?>
<td><?php echo $ogr->Servicesupplier?></td>
<?php }?>
<td><?php echo $dt;?></td>
<td><?php echo $ogr->VehicleNo?></td>
<td><a data-toggle="tooltip" href="<?php echo base_url().'EditOGR?OGRNO='.$ogr->OGRNO.'&MRIRNO='.$ogr->MRIRNO ;?>"><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $ogr->OGRNO; ?> - Click here to View details"></i></a></td>
</tr>
<?php } }?>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script>
$(function () {
$('#example1').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
<script type="text/javascript">
function saveToDatabase(editableObj,Index)
{
//alert(Index)
var tr= document.getElementById(Index);
var cellval = tr.cells;
var date= cellval[1].innerHTML;
var cname=cellval[2].innerHTML;
var servicedetails=cellval[3].innerHTML;
var detailsofcoplaint=cellval[4].innerHTML;
var modeofcommunication=cellval[5].innerHTML;
var actiontaken=cellval[6].innerHTML;
var actioncardno=cellval[7].innerHTML;
var remark=cellval[8].innerHTML;
$.ajax(
{
data:{date:date,cname:cname,servicedetails:servicedetails,detailsofcoplaint:detailsofcoplaint,modeofcommunication:modeofcommunication,actiontaken:actiontaken,actioncardno,actioncardno,remark:remark},
// dataType:'json',
type:"POST",
url:"<?php echo base_url();?>purchaseorder/Savencrlist",
success:function(data)
{
$('#content').loader('hide');
if(data)
{
alert(data);
//window.location ="enquirylisting";
}
else
{
alert("Error");
}
}
});
}
</script>