currentstock
This commit is contained in:
parent
1f86b079f3
commit
d21d19ed95
@ -259,6 +259,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data['materialDetails'] = $this->rawmaterialdetails_model->getMaterialDetails($RawMaterialID);
|
$data['materialDetails'] = $this->rawmaterialdetails_model->getMaterialDetails($RawMaterialID);
|
||||||
|
$data['currentstock'] = $this->rawmaterialdetails_model->getMaterialstock($RawMaterialID);
|
||||||
$data['materialType'] = $this->rawmaterialdetails_model->getmaterialType($MaterialType );
|
$data['materialType'] = $this->rawmaterialdetails_model->getmaterialType($MaterialType );
|
||||||
$data['materialCategory'] = $this->rawmaterialdetails_model->getmaterialCategory($MaterialCategory);
|
$data['materialCategory'] = $this->rawmaterialdetails_model->getmaterialCategory($MaterialCategory);
|
||||||
$data['UOMList'] = $this->rawmaterialdetails_model->getUOM($UOM);
|
$data['UOMList'] = $this->rawmaterialdetails_model->getUOM($UOM);
|
||||||
|
|||||||
@ -119,6 +119,16 @@ class rawmaterialdetails_model extends CI_Model
|
|||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getMaterialstock($MaterialCode)
|
||||||
|
{
|
||||||
|
$subquery="SELECT SUM(IF(Transaction_type='Add',Quantity,0)) - SUM(IF(Transaction_type='Reduce',Quantity,0))as remainingqty
|
||||||
|
FROM T_Material_stock_history
|
||||||
|
where MaterialCode='$MaterialCode'";
|
||||||
|
$query = $this->db->query($subquery);
|
||||||
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function getAssetcode()
|
function getAssetcode()
|
||||||
{
|
{
|
||||||
$this->db->select('AssetCode,AssetName');
|
$this->db->select('AssetCode,AssetName');
|
||||||
|
|||||||
@ -182,7 +182,7 @@ $(function() {
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="conversionfactor">Open Stock</label>
|
<label for="conversionfactor">Opening Stock</label>
|
||||||
<input type="text" class="form-control" id="openstock" name="openstock" maxlength="255">
|
<input type="text" class="form-control" id="openstock" name="openstock" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -129,8 +129,8 @@ foreach($financialyear as $item)
|
|||||||
<th>PONO</th>
|
<th>PONO</th>
|
||||||
<th>Supplier Name</th>
|
<th>Supplier Name</th>
|
||||||
<th>Total PO Amount (₹)</th>
|
<th>Total PO Amount (₹)</th>
|
||||||
<th>Balance To Pay (₹)</th>
|
<th>Balance payable (₹)</th>
|
||||||
<th>Amount Paid (₹)</th>
|
<th>Balance Paid (₹)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@ -44,7 +44,7 @@ foreach($financialyear as $item)
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
|
||||||
|
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>view Invoice</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>View Invoice</b></p></h3></center>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -133,8 +133,8 @@ foreach($financialyear as $item)
|
|||||||
<th>Invoice Number</th>
|
<th>Invoice Number</th>
|
||||||
<th>Customer Name</th>
|
<th>Customer Name</th>
|
||||||
<th>Invoice Amount (₹)</th>
|
<th>Invoice Amount (₹)</th>
|
||||||
<th>Balance To Received</th>
|
<th> Balance Receivable</th>
|
||||||
<th>AmountReceived</th>
|
<th> Amount Received</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|||||||
@ -51,6 +51,16 @@ if(!empty($materialDetails))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!empty($currentstock))
|
||||||
|
{
|
||||||
|
foreach ($currentstock as $MC)
|
||||||
|
{
|
||||||
|
// print_r($currentstock);
|
||||||
|
// die();
|
||||||
|
$currentstock =$MC->remainingqty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
@ -211,7 +221,7 @@ $("#Date").datepicker({
|
|||||||
?>
|
?>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group autoSearch" id="mc">
|
<div class="form-group autoSearch" id="mc">
|
||||||
<label for="Matcate">Open Stock</label>
|
<label for="Matcate">Opening Stock</label>
|
||||||
<input type="text" class="form-control required " id="openstock" readonly name="openstock" value="<?php echo $openstock;?>" maxlength="255">
|
<input type="text" class="form-control required " id="openstock" readonly name="openstock" value="<?php echo $openstock;?>" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -223,7 +233,7 @@ $("#Date").datepicker({
|
|||||||
?>
|
?>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="conversionfactor">Open Stock</label>
|
<label for="conversionfactor">Opening Stock</label>
|
||||||
<input type="text" class="form-control" id="openstock" name="openstock" maxlength="255">
|
<input type="text" class="form-control" id="openstock" name="openstock" maxlength="255">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -266,8 +276,14 @@ $("#Date").datepicker({
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="conversionfactor">Current Stock</label>
|
||||||
|
<input type="text" class="form-control" id="currentstock" readonly value="<?php echo $currentstock; ?>" name="currentstock" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="remarks">Remarks</label>
|
<label for="remarks">Remarks</label>
|
||||||
<input type="text" class="form-control" id="remarks" name="remarks" maxlength="255" value="<?php echo $remarks;?>">
|
<input type="text" class="form-control" id="remarks" name="remarks" maxlength="255" value="<?php echo $remarks;?>">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user