Material history screen added

This commit is contained in:
gandhimathi 2018-06-05 17:36:20 +05:30
parent 8a861dbc88
commit c5446f2e15
5 changed files with 132 additions and 0 deletions

View File

@ -346,5 +346,7 @@ $route['MaterailAdjustmentlist'] = "batchcard/MaterailAdjustmentlist";
$route['EditMaterialAdjustment'] = "batchcard/EditMaterialAdjustment";
$route['MaterialHistory'] = "batchcard/material_history";
$route['EditFinalProduct'] = "batchcard/EditFinalProduct";

View File

@ -1793,6 +1793,16 @@ class batchcard extends BaseController
//return true;
}
function material_history()
{
$this->global['pageTitle'] = 'Siddharth : Material History';
$data['material']=$this->batchcard_model->getMaterial_history();
$this->loadviews("MaterialHistory",$this->global,$data,NULL);
}
function UpdateQuantity()
{
$adjquantity =$this->input->post('adjquantity');

View File

@ -1052,6 +1052,16 @@ and CreatedOn >= ? and CreatedOn<=? and SupplierID=? group by Addqty';
$res = $this->db->get();
return $res->result();
}
function getMaterial_history()
{
$sql="SELECT msh.StockId,sd.SupplierName,mm.MaterialName,msh.Transaction_type,msh.Ref_Type,msh.Ref_No,msh.Quantity,msh.ItemValue,msh.CreatedOn FROM T_Material_stock_history as msh
left join T_SupplierDetailsN as sd on sd.SupplierID=msh.SupplierID
left join T_MaterialMaster as mm on mm.MaterialCode=msh.MaterialCode";
$query =$this->db->query($sql);
return $query->result();
}
//created by TamilBala
//for update quantity stockhistory
function updateQuantityStockHistory($updatequantity,$id)

View File

@ -0,0 +1,105 @@
<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 - Material History</h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<table class="table table-bordered" id="cc" style="font-size:11px !important;">
<thead>
<tr>
<th style="text-align:center">Stock ID</th>
<th style="text-align:center">Supplier Name</th>
<th style="text-align:center">Material Name</th>
<th style="text-align:center">Transaction Type</th>
<th style="text-align:center">Ref Type</th>
<th style="text-align:center">Ref NO</th>
<th style="text-align:center">Quantity</th>
<th style="text-align:center">Item Value</th>
<th style="text-align:center">CreatedON</th>
</tr>
</thead>
<tbody>
<?php if(!empty($material)){
foreach($material as $rel)
{
?>
<tr>
<td style="text-align:center"><span><?php echo $rel->StockId;?></span></td>
<td><span><?php echo $rel->SupplierName;?></span></td>
<td><span><?php echo $rel->MaterialName;?></span></td>
<td><span><?php
echo $rel->Transaction_type;?></span></td>
<td><span><?php
echo $rel->Ref_Type;?></span></td>
<td><span><?php
echo $rel->Ref_No;?></span></td>
<td style="text-align:right"><span><?php
echo $rel->Quantity;?></span></td>
<td style="text-align:right"><span><?php
echo $rel->ItemValue;?></span></td>
<td style="text-align:right"><span><?php
echo $rel->CreatedOn;?></span></td>
</tr>
<?php
}
?>
</tbody>
<?php
}
?>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
<script>
$(function () {
$('#cc').DataTable({
"paging" : true,
"ordering" : true,
"scrollCollapse" : true,
"searching" : true,
"columnDefs" : [{"targets":3, "type":"date-eu"}],
"bInfo": true
});
});
</script>

View File

@ -493,6 +493,11 @@ else{
<i class="fa fa-dashboard"></i> <span>Material Adjustment List</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>MaterialHistory">
<i class="fa fa-dashboard"></i> <span>Material History</span>
</a>
</li>
</ul></li>
<?php } if($check25 == 1){break;} } } ?>