110 lines
4.4 KiB
PHP
110 lines
4.4 KiB
PHP
|
||
<div class="content-wrapper">
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?php
|
||
helper('form');
|
||
$error = session()->getFlashdata('error');
|
||
if($error){
|
||
$type = "error";
|
||
echo show_alert($type, $error);
|
||
}
|
||
$success = session()->getFlashdata('success');
|
||
if($success){
|
||
$type = "success";
|
||
echo show_alert($type, $success);
|
||
}
|
||
?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-12">
|
||
<?php // \Config\Services::validation()->listErrors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>');
|
||
?> </div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<section class="content">
|
||
<div class="box">
|
||
<div class="box-header">
|
||
<CENTER><h3 class="box-title"> Material Master Details</h3></CENTER>
|
||
</div>
|
||
<div class="container-fluid">
|
||
<div class="row">
|
||
<div class="col-xs-12 text-right">
|
||
<div class="form-group">
|
||
<a class="btn btn-success" href="<?php echo base_url(); ?>addRawmaterial">Add New Material</a>
|
||
<a class="btn btn-success" href="<?php echo base_url(); ?>exportmaterial">Export Material Master <i class="fa fa-download"aira-hidden="true"></i></a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-xs-12">
|
||
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;font-size:12px;" >
|
||
<thead style="background-color: #ddd;">
|
||
<tr>
|
||
<th style="display: none;"></th>
|
||
<th>Created On</th>
|
||
<th>Material Code</th>
|
||
<th>Material Description</th>
|
||
<th>Type of Material</th>
|
||
<th>UOM</th>
|
||
<th>Opening Stock</th>
|
||
<th>Material Category</th>
|
||
<th>HSN Code</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php
|
||
if(!empty($userRecords))
|
||
{
|
||
foreach($userRecords as $record)
|
||
{
|
||
$date=date("Y-m-d");
|
||
?>
|
||
<tr>
|
||
|
||
<td style="display: none;"><?php echo $record->CreatedDate; ?></td>
|
||
<td style="width:8%;"><?php echo format_date($record->CreatedDate,0,'d/m/Y') ?></td>
|
||
<td style="width:9%;"><u><a class="a_tag_link" href="<?php echo base_url().'viewRawmaterial?RID='.$record->MaterialCode.'&MType='.$record->MaterialType.'&UOM='.$record->UOM.'&date1='.$date ?>" data-toggle="tooltip" title="<?php echo $record->MaterialCode; ?> - Click here to view Material details"><?php echo $record->MaterialCode ?> </a></u></td>
|
||
<td style="width:12%;"><?php echo $record->MaterialName ?></td>
|
||
<td style="width:10%;"><?php echo $record->MaterialType ?></td>
|
||
<td style="width:7%;"><?php echo $record->UOM ?></td>
|
||
<?php if($record->stock != null || ''){?>
|
||
<td style="width:7%;"><?php echo $record->stock?></td>
|
||
<?php } else{?>
|
||
<td style="width:7%;">0</td>
|
||
<?php }?>
|
||
<td style="width:11%;"><?php echo $record->Category ?></td>
|
||
<td style="width:8%;"><?php echo $record->HSNCODE ?></td>
|
||
</tr>
|
||
<?php
|
||
}
|
||
}
|
||
?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||
<script type="text/javascript">
|
||
|
||
$(function () {
|
||
|
||
$('#datatable').DataTable({
|
||
"paging": true,
|
||
"lengthChange": true,
|
||
"searching": true,
|
||
"ordering": true,
|
||
"info": true,
|
||
"autoWidth": true,
|
||
"aaSorting": [[ 0, "desc" ]],
|
||
|
||
});
|
||
});
|
||
|
||
</script>
|