reorder level

This commit is contained in:
venbatechnologies@gmail.com 2018-07-17 18:45:14 +05:30
parent 0fe29a960d
commit b24a58b44b
14 changed files with 607 additions and 82 deletions

View File

@ -358,3 +358,6 @@ $route['MaterialHistory'] = "batchcard/material_history";
$route['EditFinalProduct'] = "batchcard/EditFinalProduct";
$route['shortagematerialListing'] = 'rawmaterialdetails/shortagematerialListing';

View File

@ -18,6 +18,7 @@ class batchcard extends BaseController
{
parent::__construct();
$this->load->model('batchcard_model');
$this->load->model('inwardgateregister_model');
$this->isLoggedIn();
$this->load->helper(array('form','url'));
date_default_timezone_set('Asia/Kolkata');
@ -1468,6 +1469,45 @@ class batchcard extends BaseController
$historyadd = $this->batchcard_model->AddMaterialHistory($historytable);
$get_pre_qty= $this->inwardgateregister_model->get_CurrentQty($materialcode);
$av_qty=0;
if(!empty($get_pre_qty))
{
foreach($get_pre_qty as $gt)
{
$av_qty=$gt->Current_stock;
}
}
if($status == 'Add')
{
$currentav_qty=$av_qty+$absaluteQty;
}
else if($status == 'Reduce')
{
$currentav_qty=$av_qty-$absaluteQty;
}
$current_qty= array('Current_stock'=>$currentav_qty);
$this->inwardgateregister_model->addmaterialmaster($current_qty,$materialcode);
if((count($materialadjust)>0) &&(count($historyadd)))
{
echo "Material Details Added Successfully";
@ -1496,7 +1536,7 @@ class batchcard extends BaseController
// $final_product_id= $final_master_save[0]['PId'];
//$final_product_id= $final_master_save[0]['PId'];
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$createddt = $dt->format('Y-m-d H:i:s');
@ -1530,13 +1570,32 @@ class batchcard extends BaseController
$rawqty = $this->input->post('rawQty'.$i);
$rawvalue = $this->input->post('rawprice'.$i);
$rawarray =array('FPId'=>$final_product_id,'MaterialCode'=>$rawmaterial,'SupplierID'=>$rawsupplier,'Quantity'=>$rawqty,'Price'=>$rawvalue,'CreatedBy'=>$createdby,'CreatedDate'=>$createddt);
$rawmaterialhistory= array('MaterialCode'=>$rawmaterial,'Transaction_type'=>'Reduce','Ref_Type'=>'Final Product','Ref_No'=>$final_product_id,'SupplierID'=>$rawsupplier,'Quantity'=>$rawqty,'ItemValue'=>$rawvalue,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
$this->batchcard_model->save_rawmaterialto_materialHistory($rawmaterialhistory);
$this->batchcard_model->save_rawmaterialto_materialHistory($rawmaterialhistory);
$rawget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($rawmaterial);
$av_qty=0;
if(!empty($rawget_pre_qty))
{
foreach($rawget_pre_qty as $gt)
{
$av_qty=$gt->Current_stock;
}
}
$currentav_qty=$av_qty-$rawqty;
$current_qty= array('Current_stock'=>$currentav_qty);
$this->inwardgateregister_model->addmaterialmaster($current_qty,$rawmaterial);
//print_r($rawarray);
$this->batchcard_model->save_finalraw($rawarray);
@ -1550,12 +1609,32 @@ class batchcard extends BaseController
$conqty = $this->input->post('consumeQty'.$i);
$convalue = $this->input->post('consumeprice'.$i);
$conarray =array('FPId'=>$final_product_id,'MaterialCode'=>$conmaterial,'SupplierID'=>$consupplier,'Quantity'=>$conqty,'Price'=>$convalue,'CreatedBy'=>$createdby,'CreatedDate'=>$createddt);
$consuhistory= array('MaterialCode'=>$conmaterial,'Transaction_type'=>'Reduce','Ref_Type'=>'Final Product','Ref_No'=>$final_product_id,'SupplierID'=>$consupplier,'Quantity'=>$conqty,'ItemValue'=>$convalue,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
$this->batchcard_model->save_rawmaterialto_materialHistory($consuhistory);
$conget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($conmaterial);
$conav_qty=0;
if(!empty($conget_pre_qty))
{
foreach($conget_pre_qty as $gt)
{
$conav_qty=$gt->Current_stock;
}
}
$concurrentav_qty=$conav_qty-$conqty;
$concurrent_qty= array('Current_stock'=>$concurrentav_qty);
$this->inwardgateregister_model->addmaterialmaster($concurrent_qty,$conmaterial);
$this->batchcard_model->save_finalcon($conarray);
}
@ -1567,12 +1646,34 @@ class batchcard extends BaseController
$packqty = $this->input->post('packQty'.$i);
$packvalue = $this->input->post('packprice'.$i);
$packarray =array('FPId'=>$final_product_id,'MaterialCode'=>$packmaterial,'SupplierID'=>$packsupplier,'Quantity'=>$packqty,'Price'=>$packvalue,'CreatedBy'=>$createdby,'CreatedDate'=>$createddt);
$packmathistory= array('MaterialCode'=>$packmaterial,'Transaction_type'=>'Reduce','Ref_Type'=>'Final Product','Ref_No'=>$final_product_id,'SupplierID'=>$packsupplier,'Quantity'=>$packqty,'ItemValue'=>$packvalue,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
$this->batchcard_model->save_rawmaterialto_materialHistory($packmathistory);
$pacget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($packmaterial);
$pacav_qty=0;
if(!empty($pacget_pre_qty))
{
foreach($pacget_pre_qty as $gt)
{
$pacav_qty=$gt->Current_stock;
}
}
$paccurrentav_qty=$pacav_qty-$packqty;
$paccurrent_qty= array('Current_stock'=>$paccurrentav_qty);
$this->inwardgateregister_model->addmaterialmaster($paccurrent_qty,$packmaterial);
$this->batchcard_model->save_finalpacking($packarray);
}
@ -1594,7 +1695,7 @@ class batchcard extends BaseController
$copfinal_history = array('RefID'=>$final_product_id,'ProductCode'=>$copmaterial,'Quantity'=>$copqty,'Price'=>$copvalue,'Transactiondate'=>$createddt,'TransactionType'=>'Inward');
$final_cophistory_save= $this->batchcard_model->SaveFinalHistory($copfinal_history);
$final_cophistory_save= $this->batchcard_model->SaveFinalHistory($copfinal_history);
}
echo "Details Saved Successfully";
@ -1652,6 +1753,12 @@ class batchcard extends BaseController
$rawqty = $this->input->post('rawQty'.$i);
$rawvalue = $this->input->post('rawprice'.$i);
$rawilneno = $this->input->post('RawId'.$i);
$beforawqty = $this->input->post('beforerawQty'.$i);
// echo $beforawqty;
// die();
//echo $rawilneno;
if($rawmaterial == '' && $rawsupplier == '' & $rawqty == '')
{
@ -1662,9 +1769,6 @@ class batchcard extends BaseController
{
$rawarray =array('FPId'=>$FPID,'MaterialCode'=>$rawmaterial,'SupplierID'=>$rawsupplier,'Quantity'=>$rawqty,'Price'=>$rawvalue,'CreatedBy'=>$createdby,'CreatedDate'=>$createddt);
$rawmaterialhistory= array('MaterialCode'=>$rawmaterial,'Transaction_type'=>'Reduce','Ref_Type'=>'Final Product','Ref_No'=>$FPID,'SupplierID'=>$rawsupplier,'Quantity'=>$rawqty,'ItemValue'=>$rawvalue,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
@ -1672,9 +1776,47 @@ class batchcard extends BaseController
$checkrawid=$this->batchcard_model->GetRawid($rawilneno);
$checkrawhistory = $this->batchcard_model->GetRawCheck($rawmaterial,$FPID);
$rawget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($rawmaterial);
$av_qty=0;
if(!empty($rawget_pre_qty))
{
foreach($rawget_pre_qty as $gt)
{
$av_qty=$gt->Current_stock;
}
}
// echo $av_qty;
// die();
$qty_dif= $rawqty - $beforawqty;
//echo $qty_dif;
// if($qty_dif >0)
// {
// echo 'if';
// $currentav_qty=$av_qty+$qty_dif;
// }
// else
// {
// echo 'else';
$currentav_qty=$av_qty-$qty_dif;
// }
//echo $currentav_qty;
//die();
$current_qty= array('Current_stock'=>$currentav_qty);
//print($current_qty);
$this->inwardgateregister_model->addmaterialmaster($current_qty,$rawmaterial);
// echo $checkrawhistory;
if(count($checkrawid)==0)
{
@ -1704,6 +1846,9 @@ class batchcard extends BaseController
$convalue = $this->input->post('consumeprice'.$i);
$consuline = $this->input->post('Consumable'.$i);
$beforeconqty = $this->input->post('beforeconsumeQty'.$i);
if($conmaterial == '' && $consupplier == '' & $conqty == '')
{
@ -1719,6 +1864,41 @@ class batchcard extends BaseController
$checkconsuid=$this->batchcard_model->Getconsuid($consuline);
$conget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($conmaterial);
$conav_qty=0;
if(!empty($conget_pre_qty))
{
foreach($conget_pre_qty as $gt)
{
$conav_qty=$gt->Current_stock;
}
}
$conqty_dif= $conqty - $beforeconqty;
// if($conqty_dif >0)
// {
// $concurrentav_qty=$conav_qty+$conqty_dif;
// }
// else
// {
$concurrentav_qty=$conav_qty-$conqty_dif;
//}
// $concurrentav_qty=$conav_qty-$conqty;
$concurrent_qty= array('Current_stock'=>$concurrentav_qty);
$this->inwardgateregister_model->addmaterialmaster($concurrent_qty,$conmaterial);
if(count($checkconsuid)>0)
{
$this->batchcard_model->update_finalconsu($conarray,$consuline);
@ -1746,6 +1926,9 @@ class batchcard extends BaseController
$packvalue = $this->input->post('packprice'.$i);
$packlineId = $this->input->post('packId'.$i);
$beforepacqty = $this->input->post('beforepackQty'.$i);
if($packmaterial == '' && $packsupplier == '' & $packqty == '')
{
@ -1759,6 +1942,43 @@ class batchcard extends BaseController
$packmathistory= array('MaterialCode'=>$packmaterial,'Transaction_type'=>'Reduce','Ref_Type'=>'Final Product','Ref_No'=>$FPID,'SupplierID'=>$packsupplier,'Quantity'=>$packqty,'ItemValue'=>$packvalue,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
$checkpackid=$this->batchcard_model->Getpackid($packlineId);
$pacget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($packmaterial);
$pacav_qty=0;
if(!empty($pacget_pre_qty))
{
foreach($pacget_pre_qty as $gt)
{
$pacav_qty=$gt->Current_stock;
}
}
$pacqty_dif= $packqty - $beforepacqty;
// if($pacqty_dif >0)
// {
// $paccurrentav_qty=$pacav_qty+$pacqty_dif;
// }
// else
// {
$paccurrentav_qty=$pacav_qty-$pacqty_dif;
//}
// $paccurrentav_qty=$pacav_qty-$packqty;
$paccurrent_qty= array('Current_stock'=>$paccurrentav_qty);
$this->inwardgateregister_model->addmaterialmaster($paccurrent_qty,$packmaterial);
if(count($checkpackid)>0)
{

View File

@ -997,7 +997,32 @@ $RequestedBy = $this->input->post('drpDepartment');
$this->inwardgateregister_model->addMaterialStockHistory($MaterialstockHistoryadd);
//*=====================================================*/
//*=====================================================*/
//*===================================================*/
$get_pre_qty= $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
$av_qty=0;
if(!empty($get_pre_qty))
{
foreach($get_pre_qty as $gt)
{
$av_qty=$gt->Current_stock;
}
}
$currentav_qty= $QuantityAsPerInvoice+$av_qty;
$current_qty= array('Current_stock'=>$currentav_qty);
$this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode);
//*==================================================*/

View File

@ -37,7 +37,7 @@ class inwardgateregister extends BaseController
function viewIGRDetails()
{
$this->load->model('inwardgateregister_model');
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register Details';
$data['IGR']= $this->inwardgateregister_model->igrListing();
@ -280,7 +280,7 @@ class inwardgateregister extends BaseController
function addloadfile()
{
$upfiles = '';
$pono= $this->input->post('PONO');
$igr= $this->input->post('igr');
@ -573,7 +573,7 @@ $prefile =array();
//echo $IGRNO;
$IGRItemStatus = REQITEM_NEW;
$TotalPendingQty = '';
for ($i = 1; $i <= $RowCount; $i++)
{
@ -590,7 +590,6 @@ $prefile =array();
//echo $QuantityAsPerInvoice;
//echo $PendingQty.'ReceivedQty'.$ReceivedQty;
//echo ' ';
$TotalPendingQty = $TotalPendingQty + $PendingQty;
if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0')
{
@ -643,10 +642,26 @@ $prefile =array();
$this->inwardgateregister_model->addmaterialhistory($historydetails);
$get_pre_qty= $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
$av_qty=0;
if(!empty($get_pre_qty))
{
foreach($get_pre_qty as $gt)
{
$av_qty=$gt->Current_stock;
}
}
$currentav_qty= $QuantityAsPerInvoice+$av_qty;
$current_qty= array('Current_stock'=>$currentav_qty);
$this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode);
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode);
$ReceivedQuantity = 0.00;
if(count($Recqty)>0)
{
@ -665,16 +680,7 @@ $prefile =array();
}
$this->inwardgateregister_model->UpdatePOMaster($PONO,$CreatedBy);
if($TotalPendingQty == 0.00){
$Newstatus = array('Status'=>IGR_CREATED);
$this->inwardgateregister_model->POLineItemsupdatestatus($PONO,$Newstatus);
$this->inwardgateregister_model->pomasterupdatestatus($PONO,$Newstatus);
}
else{ /*echo 'error' ;*/ }
$this->inwardgateregister_model->UpdatePOMaster($PONO,$CreatedBy);
echo "<script>alert('Successfully Created IGR Number:$IGRNO'); window.location.href='viewIGRDetails';</script>";
//echo 'Successfully Created IGR Number:'. $IGRNO;
}
@ -693,10 +699,7 @@ $prefile =array();
function ViewIGRfile()
{
$IGRNO= $this->input->post('id');
$PO =$this->input->post('id1');
$igrfile = $this->inwardgateregister_model->viewIGRFile($IGRNO);
$billfile = $this->inwardgateregister_model->viewIGRFile1($IGRNO);
$data = array_merge($igrfile,$billfile);
$data = $this->inwardgateregister_model->viewIGRFile($IGRNO);
echo json_encode($data);
}
@ -902,6 +905,28 @@ $prefile =array();
$get_pre_qty= $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
$av_qty=0;
if(!empty($get_pre_qty))
{
foreach($get_pre_qty as $gt)
{
$av_qty=$gt->Current_stock;
}
}
$currentav_qty=$av_qty-$Outwardtotal;
$current_qty= array('Current_stock'=>$currentav_qty);
$this->inwardgateregister_model->addmaterialmaster($current_qty,$MaterialCode);
$this->inwardgateregister_model->UpdateOGRMasterOGRStatus($OGRNO);
$this->inwardgateregister_model->UpdateMRIRMasterOGRStatus($MRIRNO,$OGRNO);

View File

@ -1395,6 +1395,38 @@ function edited(){
$this->purchaseorder_model->updateMatStock($itemNo,
$MaterialstockHistoryupdate);
$rawget_pre_qty= $this->inwardgateregister_model->get_CurrentQty($MaterialCode);
$av_qty=0;
if(!empty($rawget_pre_qty))
{
foreach($rawget_pre_qty as $gt)
{
$av_qty=$gt->Current_stock;
}
}
// echo $av_qty;
// die();
$qty_dif= $Quantity - $b4qty;
$currentav_qty=$av_qty-$qty_dif;
//echo $currentav_qty;
//die();
$current_qty= array('Current_stock'=>$currentav_qty);
//echo $current_qty;
$this->inwardgateregister_model->addmaterialmaster($current_qty,$rawmaterial);

View File

@ -49,6 +49,21 @@ class rawmaterialdetails extends BaseController
$this->loadViews("rawmaterialListing", $this->global, $data, NULL);
}
function shortagematerialListing()
{
$this->load->model('rawmaterialdetails_model');
$data['Records'] = $this->rawmaterialdetails_model->reOrderListing();
$this->global['pageTitle'] = 'Siddharth : ReOrderLevel Listing';
$this->loadViews("shortagematerialListing", $this->global, $data, NULL);
}
/**
* This function is used to load the add new cost */
function addRawMaterial()
@ -162,15 +177,57 @@ else
$CreatedBy = $this->session->userdata('userId');
$stock = $this->input->post('openstock');
$reorder = $this->input->post('reorder');
$stockdate = $this->input->post('Date');
$stockdate = $this->input->post('Date');
$currentstock = '';
$today_dt = date('Y-m-d');
if (empty($stockdate))
{
$stockdate = NULL;
// $stockdate = NULL;
$stockdate = date("Y-m-d");
$currentstock = $stock;
}
else
{
$stockdate = strtotime( $stockdate);
$stockdate = date("Y-m-d ", $stockdate);
$todaydateyear = date('Y', strtotime($today_dt));
$todaydatemonth = date('m', strtotime($today_dt));
$todaydatedate = date('d', strtotime($today_dt));
$openstockdateyear = date('Y', strtotime($stockdate));
$parts = explode('-',$stockdate);
$openstockdatemonth = $parts[1];
$openstockdatedate = $parts[2];
if($openstockdateyear==$todaydateyear)
{
if($openstockdatemonth<=03)
{
$currentstock= 0;
}
else
{
$currentstock = $stock;
}
}
else if($openstockdateyear<$todaydateyear)
{
//$total= $y;
$currentstock= 0;
}
else if($openstockdateyear>$todaydateyear)
{
$currentstock = $stock;
}
}
@ -218,7 +275,7 @@ else
$IsActive = '0';
}
$RawMaterial = array('MaterialName'=>$MaterialName, 'MaterialType'=>$MaterialType, 'UOM'=>$UOM,'Category'=>$MaterialCategory, 'CreatedBy'=>$CreatedBy,'IsActive' => $IsActive,'assetcode'=>$AssetCode,'CostCenterCode'=>$CostCenterCode,'ConversionFactorUnit'=>$ConversionFactor,'ConversionFactorUOM'=>$ConversionFactorUOM,'Remarks'=>$Remarks,'HSNCODE'=>$HSNcode ,'stock'=>$stock,'stockdate'=>$stockdate,'reorder'=>$reorder);
$RawMaterial = array('MaterialName'=>$MaterialName, 'MaterialType'=>$MaterialType, 'UOM'=>$UOM,'Category'=>$MaterialCategory, 'CreatedBy'=>$CreatedBy,'IsActive' => $IsActive,'assetcode'=>$AssetCode,'CostCenterCode'=>$CostCenterCode,'ConversionFactorUnit'=>$ConversionFactor,'ConversionFactorUOM'=>$ConversionFactorUOM,'Remarks'=>$Remarks,'HSNCODE'=>$HSNcode ,'stock'=>$stock,'stockdate'=>$stockdate,'reorder'=>$reorder,'Current_stock'=>$currentstock);
//print_r($RawMaterial);die();
$result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial);

View File

@ -58,6 +58,18 @@ if(!function_exists('verifyHashedPassword'))
return $CI->db->get('T_fav_add')->result();
}
function reOrderListing()
{
$CI = &get_instance();
$CI->load->database();
$CI->db->reconnect();
$subQuery='SELECT * from T_MaterialMaster where Current_stock < reorder?';
$query=$CI->db->query($subQuery,array());
//print_r($this->db->last_query());
return $query->result();
}
?>

View File

@ -119,25 +119,6 @@ return $afftectedRows;
$this->db->from('T_Inwardgateregister_fileupload');
$this->db->where('IGRNO',$IGRNO);
$query = $this->db->get();
$result = $query->result();
return $result;
}
function viewIGRFile1($IGRNO)
{
$this->db->distinct();
$this->db->select('igrm.file,igrm.PONO as pono'); //BillNo,IGRNO,FilePath,PONO
$this->db->from('T_IGR_Master igrm');
//$this->db->join('T_Inwardgateregister_fileupload igrf','igrm.IGRNO = igrf.IGRNO','left');
//$this->db->join('T_IGR_Details igrd','igrm.IGRNO = igrd.IGRNO','left');
$this->db->where('igrm.IGRNO',$IGRNO);
$query = $this->db->get();
$result = $query->result();
@ -256,6 +237,27 @@ return $afftectedRows;
}
function addmaterialmaster($current_qty,$MaterialCode)
{
$this->db->where('MaterialCode',$MaterialCode);
$this->db->update('T_MaterialMaster',$current_qty);
return TRUE;
}
function get_CurrentQty($MaterialCode)
{
$this->db->select('Current_stock');
$this->db->from('T_MaterialMaster');
$this->db->where('T_MaterialMaster.MaterialCode',$MaterialCode);
$query = $this->db->get();
// print_r( $this->db->last_query());
$result = $query->result();
return $result;
}
function getitemvalue($pono,$MaterialCode)
{
$this->db->select('Rate,SupplierID');
@ -803,33 +805,4 @@ function getPOmaterial($PONO)
return $r;
}
function getpolineqty($NewPO)
{
$this->db->select('sum(Quantity)as Qty,sum(ReceivedQuantity)as rec');
$this->db->from('T_PurchaseOrder_LineItem');
$this->db->where('PONO',$NewPO);
$query = $this->db->get();
return $query->result();
}
function POLineItemsupdatestatus($PONO,$Newstatus)
{
$this->db->where('PONO',$PONO);
$this->db->update('T_PurchaseOrder_LineItem',$Newstatus);
$update = $this->db->affected_rows();
return $update;
}
function pomasterupdatestatus($PONO,$Newstatus)
{
$this->db->where('PONO',$PONO);
$this->db->update('T_PurchaseOrder_Master',$Newstatus);
$update = $this->db->affected_rows();
return $update;
}
}

View File

@ -271,5 +271,19 @@ WHERE MaterialCode=? AND CreatedOn >=? AND CreatedOn <=? ";
return $temp;
}
function reOrderListing()
{
$subQuery='SELECT * from T_MaterialMaster where Current_stock < reorder?';
$query=$this->db->query($subQuery,array());
//print_r($this->db->last_query());
return $query->result();
}
}
?>

View File

@ -536,7 +536,7 @@ $(function() {
</div>
<div class="modal-footer">
<a class="btn btn-primary font rootaddClick" ID="rootaddClick" > &nbsp;&nbsp;<span class="bold">Add</span></a>
<a class="btn btn-primary font rootaddClick" ID="rootaddClick" > &nbsp;&nbsp;<span class="bold">Add</span></a>
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>

View File

@ -403,4 +403,6 @@ function Validate()
return false;
}
}
</script>

View File

@ -434,6 +434,8 @@ $(function() {
<input type="hidden" name="<?php echo 'rawQty'.$index ?>" id="<?php echo 'rawQty'.$index ?>" value="<?php echo $raw->Quantity ; ?>" readonly/>
<input type="hidden" name="<?php echo 'beforerawQty'.$index ?>" id="<?php echo 'beforerawQty'.$index ?>" value="<?php echo $raw->Quantity ; ?>" readonly/>
<input type="hidden" name="<?php echo 'rawprice'.$index ?>" id="<?php echo 'rawprice'.$index ?>" value="<?php echo $raw->Price ; ?>" readonly/>
@ -672,7 +674,9 @@ $(function() {
<td id="consumaterial<?php echo $inde?>"><?php echo $cou->MaterialCode."-".$cou->MaterialName?></td>
<!-- <td id="consumaterialname<?php echo $inde?>"><?php echo $cou->MaterialName?></td> -->
<td id="consusuppliername<?php echo $inde?>"><?php echo $cou->SupplierID."-".$cou->SupplierName?></td>
<td id="consuQuantiy<?php echo $inde?>"><?php echo $cou->Quantity?></td>
<td id="consuQuantiy<?php echo $inde?>"><?php echo $cou->Quantity?></td>
<td id="consumaterialPrice<?php echo $inde?>"><?php echo $cou->Price?></td>
<td>
@ -697,6 +701,9 @@ $(function() {
<input type="hidden" name="<?php echo 'consumeQty'.$inde ?>" id="<?php echo 'consumeQty'.$inde ?>" value="<?php echo $cou->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'beforeconsumeQty'.$inde ?>" id="<?php echo 'beforeconsumeQty'.$inde ?>" value="<?php echo $cou->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'consumeprice'.$inde ?>" id="<?php echo 'consumeprice'.$inde ?>" value="<?php echo $cou->Price ; ?>" />
<?php }}?>
@ -950,6 +957,9 @@ $(function() {
<input type="hidden" name="<?php echo 'packQty'.$intt ?>" id="<?php echo 'packQty'.$intt ?>" value="<?php echo $pac->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'beforepackQty'.$intt ?>" id="<?php echo 'beforepackQty'.$intt ?>" value="<?php echo $pac->Quantity ; ?>" />
<input type="hidden" name="<?php echo 'packprice'.$intt ?>" id="<?php echo 'packprice'.$intt ?>" value="<?php echo $pac->Price ; ?>" />
<?php }}?>

View File

@ -167,7 +167,44 @@ display: none;
<a href="<?php echo base_url(); ?>user/Favourite">
<i class="fa fa-star-half-o"></i>
</a> -->
</a> -->
<!-- start-->
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-bell-o"></i>
<?php $reOrderListing = reOrderListing();
if(!empty($reOrderListing)){
?>
<span class="label label-warning"><?php
echo sizeof($reOrderListing);
?></span>
<?php }?>
</a>
<?php if(sizeof($reOrderListing) !=0){?>
<ul class="dropdown-menu">
<li class="header">You have <?=sizeof($reOrderListing)?> notifications</li>
<?php
foreach($reOrderListing as $index=>$list){
if($index <5){
?>
<li>
<ul class="menu">
<li>
<a href="#">
<i class="fa fa-refresh text-aqua"></i> <?php echo $list->MaterialName?>
</a>
</li>
</ul>
</li>
<?php }}?>
<li class="footer"><a href="<?php echo base_url()?>shortagematerialListing" target="_blank">View all</a></li>
</ul>
<?php }?>
</li>
<!-- end-->
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
@ -448,6 +485,15 @@ display: none;
<!-- <li><a href="<?php echo base_url();?>shortagematerialListing" >
<i class="fa fa-files-o"></i>
<span>Reorder Level</span>
</a>
</li>
-->
<!--STOCK -->
<?php if(empty($DepAccesslist)){?>
<?php if($DEPCode == PRODUCTION){?>
@ -868,6 +914,8 @@ else{
<?php }?>
@ -950,6 +998,15 @@ else{
<span>Material Master</span>
</a>
</li>
<!--
<li><a href="<?php echo base_url();?>shortagematerialListing" >
<i class="fa fa-files-o"></i>
<span>Reorder Level</span>
</a>
</li> -->
<li>
<a href="<?php echo base_url(); ?>batchcard/getHistListing">
<i class="fa fa-history"></i>
@ -1102,6 +1159,16 @@ else{
</a>
</li>
<!--
<li><a href="<?php echo base_url();?>shortagematerialListing" >
<i class="fa fa-files-o"></i>
<span>Reorder Level</span>
</a>
</li> -->
<li>
<a href="<?php echo base_url(); ?>batchcard/getHistListing">
<i class="fa fa-history"></i>

View File

@ -0,0 +1,85 @@
<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 - ReOrder Level List</h3></center>
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="dataTableHistoriek" class="table table-bordered table-hover editableTable" style="font-size:12px;">
<thead>
<tr style="background-color:#ddf">
<th>#</th>
<th style="text-align:center">Material Code</th>
<th style="text-align:center">Material Name</th>
<th style="text-align:center">Available Quantity</th>
<th style="text-align:center">Reorder Level</th>
</tr>
</thead>
<tbody><?php
if(!empty($Records))
{
$index = 0;
foreach($Records as $index=>$re)
{
$index = $index + 1;
?>
<tr id="<?php echo $index ; ?>">
<td align="left"><?php echo $index ; ?></td>
<td style="text-align:center"><span><?php echo $re->MaterialCode;?></span></td>
<td style="text-align:center"><span><?php echo $re->MaterialName;?></span></td>
<td style="text-align:center"><span><?php echo $re->Current_stock;?></span></td>
<td style="text-align:center"><span><?php echo $re->reorder;?></span></td>
</tr>
<?php
}
}
?>
</tbody>
</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 src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(function () {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
$('#dataTableHistoriek').DataTable({
"paging" : true,
"ordering" : true,
"scrollCollapse" : true,
"aaSorting": [[ 3, "desc" ]],
"searching" : true,
//"columnDefs" : [{"targets":3, "type":"date"}],
"bInfo": true
});
});
</script>