reorder level
This commit is contained in:
parent
0fe29a960d
commit
b24a58b44b
@ -358,3 +358,6 @@ $route['MaterialHistory'] = "batchcard/material_history";
|
|||||||
|
|
||||||
$route['EditFinalProduct'] = "batchcard/EditFinalProduct";
|
$route['EditFinalProduct'] = "batchcard/EditFinalProduct";
|
||||||
|
|
||||||
|
|
||||||
|
$route['shortagematerialListing'] = 'rawmaterialdetails/shortagematerialListing';
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ class batchcard extends BaseController
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->load->model('batchcard_model');
|
$this->load->model('batchcard_model');
|
||||||
|
$this->load->model('inwardgateregister_model');
|
||||||
$this->isLoggedIn();
|
$this->isLoggedIn();
|
||||||
$this->load->helper(array('form','url'));
|
$this->load->helper(array('form','url'));
|
||||||
date_default_timezone_set('Asia/Kolkata');
|
date_default_timezone_set('Asia/Kolkata');
|
||||||
@ -1468,6 +1469,45 @@ class batchcard extends BaseController
|
|||||||
$historyadd = $this->batchcard_model->AddMaterialHistory($historytable);
|
$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)))
|
if((count($materialadjust)>0) &&(count($historyadd)))
|
||||||
{
|
{
|
||||||
echo "Material Details Added Successfully";
|
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'));
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
$createddt = $dt->format('Y-m-d H:i:s');
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
@ -1530,13 +1570,32 @@ class batchcard extends BaseController
|
|||||||
$rawqty = $this->input->post('rawQty'.$i);
|
$rawqty = $this->input->post('rawQty'.$i);
|
||||||
$rawvalue = $this->input->post('rawprice'.$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);
|
$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);
|
$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);
|
//print_r($rawarray);
|
||||||
|
|
||||||
$this->batchcard_model->save_finalraw($rawarray);
|
$this->batchcard_model->save_finalraw($rawarray);
|
||||||
@ -1550,12 +1609,32 @@ class batchcard extends BaseController
|
|||||||
$conqty = $this->input->post('consumeQty'.$i);
|
$conqty = $this->input->post('consumeQty'.$i);
|
||||||
$convalue = $this->input->post('consumeprice'.$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);
|
$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);
|
$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);
|
$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);
|
$this->batchcard_model->save_finalcon($conarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1567,12 +1646,34 @@ class batchcard extends BaseController
|
|||||||
$packqty = $this->input->post('packQty'.$i);
|
$packqty = $this->input->post('packQty'.$i);
|
||||||
$packvalue = $this->input->post('packprice'.$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);
|
$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);
|
$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);
|
$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);
|
$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');
|
$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";
|
echo "Details Saved Successfully";
|
||||||
@ -1652,6 +1753,12 @@ class batchcard extends BaseController
|
|||||||
$rawqty = $this->input->post('rawQty'.$i);
|
$rawqty = $this->input->post('rawQty'.$i);
|
||||||
$rawvalue = $this->input->post('rawprice'.$i);
|
$rawvalue = $this->input->post('rawprice'.$i);
|
||||||
$rawilneno = $this->input->post('RawId'.$i);
|
$rawilneno = $this->input->post('RawId'.$i);
|
||||||
|
|
||||||
|
$beforawqty = $this->input->post('beforerawQty'.$i);
|
||||||
|
|
||||||
|
// echo $beforawqty;
|
||||||
|
// die();
|
||||||
|
|
||||||
//echo $rawilneno;
|
//echo $rawilneno;
|
||||||
if($rawmaterial == '' && $rawsupplier == '' & $rawqty == '')
|
if($rawmaterial == '' && $rawsupplier == '' & $rawqty == '')
|
||||||
{
|
{
|
||||||
@ -1663,9 +1770,6 @@ class batchcard extends BaseController
|
|||||||
|
|
||||||
$rawarray =array('FPId'=>$FPID,'MaterialCode'=>$rawmaterial,'SupplierID'=>$rawsupplier,'Quantity'=>$rawqty,'Price'=>$rawvalue,'CreatedBy'=>$createdby,'CreatedDate'=>$createddt);
|
$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);
|
$rawmaterialhistory= array('MaterialCode'=>$rawmaterial,'Transaction_type'=>'Reduce','Ref_Type'=>'Final Product','Ref_No'=>$FPID,'SupplierID'=>$rawsupplier,'Quantity'=>$rawqty,'ItemValue'=>$rawvalue,'CreatedBy'=>$CreatedBy,'CreatedOn'=>$createddt);
|
||||||
|
|
||||||
|
|
||||||
@ -1673,7 +1777,45 @@ class batchcard extends BaseController
|
|||||||
|
|
||||||
$checkrawhistory = $this->batchcard_model->GetRawCheck($rawmaterial,$FPID);
|
$checkrawhistory = $this->batchcard_model->GetRawCheck($rawmaterial,$FPID);
|
||||||
|
|
||||||
// echo $checkrawhistory;
|
|
||||||
|
$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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(count($checkrawid)==0)
|
if(count($checkrawid)==0)
|
||||||
@ -1704,6 +1846,9 @@ class batchcard extends BaseController
|
|||||||
$convalue = $this->input->post('consumeprice'.$i);
|
$convalue = $this->input->post('consumeprice'.$i);
|
||||||
$consuline = $this->input->post('Consumable'.$i);
|
$consuline = $this->input->post('Consumable'.$i);
|
||||||
|
|
||||||
|
$beforeconqty = $this->input->post('beforeconsumeQty'.$i);
|
||||||
|
|
||||||
|
|
||||||
if($conmaterial == '' && $consupplier == '' & $conqty == '')
|
if($conmaterial == '' && $consupplier == '' & $conqty == '')
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1719,6 +1864,41 @@ class batchcard extends BaseController
|
|||||||
|
|
||||||
$checkconsuid=$this->batchcard_model->Getconsuid($consuline);
|
$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)
|
if(count($checkconsuid)>0)
|
||||||
{
|
{
|
||||||
$this->batchcard_model->update_finalconsu($conarray,$consuline);
|
$this->batchcard_model->update_finalconsu($conarray,$consuline);
|
||||||
@ -1746,6 +1926,9 @@ class batchcard extends BaseController
|
|||||||
$packvalue = $this->input->post('packprice'.$i);
|
$packvalue = $this->input->post('packprice'.$i);
|
||||||
$packlineId = $this->input->post('packId'.$i);
|
$packlineId = $this->input->post('packId'.$i);
|
||||||
|
|
||||||
|
$beforepacqty = $this->input->post('beforepackQty'.$i);
|
||||||
|
|
||||||
|
|
||||||
if($packmaterial == '' && $packsupplier == '' & $packqty == '')
|
if($packmaterial == '' && $packsupplier == '' & $packqty == '')
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1760,6 +1943,43 @@ class batchcard extends BaseController
|
|||||||
|
|
||||||
$checkpackid=$this->batchcard_model->Getpackid($packlineId);
|
$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)
|
if(count($checkpackid)>0)
|
||||||
{
|
{
|
||||||
$this->batchcard_model->update_finalpacking($packarray,$packlineId);
|
$this->batchcard_model->update_finalpacking($packarray,$packlineId);
|
||||||
|
|||||||
@ -1000,6 +1000,31 @@ $RequestedBy = $this->input->post('drpDepartment');
|
|||||||
//*=====================================================*/
|
//*=====================================================*/
|
||||||
|
|
||||||
|
|
||||||
|
//*===================================================*/
|
||||||
|
|
||||||
|
$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);
|
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class inwardgateregister extends BaseController
|
|||||||
|
|
||||||
function viewIGRDetails()
|
function viewIGRDetails()
|
||||||
{
|
{
|
||||||
|
$this->load->model('inwardgateregister_model');
|
||||||
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register Details';
|
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register Details';
|
||||||
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ class inwardgateregister extends BaseController
|
|||||||
|
|
||||||
function addloadfile()
|
function addloadfile()
|
||||||
{
|
{
|
||||||
$upfiles = '';
|
|
||||||
$pono= $this->input->post('PONO');
|
$pono= $this->input->post('PONO');
|
||||||
|
|
||||||
$igr= $this->input->post('igr');
|
$igr= $this->input->post('igr');
|
||||||
@ -573,7 +573,7 @@ $prefile =array();
|
|||||||
//echo $IGRNO;
|
//echo $IGRNO;
|
||||||
|
|
||||||
$IGRItemStatus = REQITEM_NEW;
|
$IGRItemStatus = REQITEM_NEW;
|
||||||
$TotalPendingQty = '';
|
|
||||||
|
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
@ -590,7 +590,6 @@ $prefile =array();
|
|||||||
//echo $QuantityAsPerInvoice;
|
//echo $QuantityAsPerInvoice;
|
||||||
//echo $PendingQty.'ReceivedQty'.$ReceivedQty;
|
//echo $PendingQty.'ReceivedQty'.$ReceivedQty;
|
||||||
//echo ' ';
|
//echo ' ';
|
||||||
$TotalPendingQty = $TotalPendingQty + $PendingQty;
|
|
||||||
|
|
||||||
if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0')
|
if(strlen($QuantityAsPerInvoice)>0 && $QuantityAsPerInvoice != '0')
|
||||||
{
|
{
|
||||||
@ -643,10 +642,26 @@ $prefile =array();
|
|||||||
|
|
||||||
$this->inwardgateregister_model->addmaterialhistory($historydetails);
|
$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);
|
$Recqty = $this->inwardgateregister_model->getPOLineItemReceivedQty($PONO,$MaterialCode);
|
||||||
|
|
||||||
$ReceivedQuantity = 0.00;
|
$ReceivedQuantity = 0.00;
|
||||||
if(count($Recqty)>0)
|
if(count($Recqty)>0)
|
||||||
{
|
{
|
||||||
@ -665,16 +680,7 @@ $prefile =array();
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$this->inwardgateregister_model->UpdatePOMaster($PONO,$CreatedBy);
|
||||||
$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' ;*/ }
|
|
||||||
echo "<script>alert('Successfully Created IGR Number:$IGRNO'); window.location.href='viewIGRDetails';</script>";
|
echo "<script>alert('Successfully Created IGR Number:$IGRNO'); window.location.href='viewIGRDetails';</script>";
|
||||||
//echo 'Successfully Created IGR Number:'. $IGRNO;
|
//echo 'Successfully Created IGR Number:'. $IGRNO;
|
||||||
}
|
}
|
||||||
@ -693,10 +699,7 @@ $prefile =array();
|
|||||||
function ViewIGRfile()
|
function ViewIGRfile()
|
||||||
{
|
{
|
||||||
$IGRNO= $this->input->post('id');
|
$IGRNO= $this->input->post('id');
|
||||||
$PO =$this->input->post('id1');
|
$data = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
||||||
$igrfile = $this->inwardgateregister_model->viewIGRFile($IGRNO);
|
|
||||||
$billfile = $this->inwardgateregister_model->viewIGRFile1($IGRNO);
|
|
||||||
$data = array_merge($igrfile,$billfile);
|
|
||||||
echo json_encode($data);
|
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->UpdateOGRMasterOGRStatus($OGRNO);
|
||||||
|
|
||||||
$this->inwardgateregister_model->UpdateMRIRMasterOGRStatus($MRIRNO,$OGRNO);
|
$this->inwardgateregister_model->UpdateMRIRMasterOGRStatus($MRIRNO,$OGRNO);
|
||||||
|
|||||||
@ -1398,6 +1398,38 @@ function edited(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($SkipInsert == "False")
|
if($SkipInsert == "False")
|
||||||
|
|||||||
@ -49,6 +49,21 @@ class rawmaterialdetails extends BaseController
|
|||||||
$this->loadViews("rawmaterialListing", $this->global, $data, NULL);
|
$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 */
|
* This function is used to load the add new cost */
|
||||||
function addRawMaterial()
|
function addRawMaterial()
|
||||||
@ -163,14 +178,56 @@ else
|
|||||||
$stock = $this->input->post('openstock');
|
$stock = $this->input->post('openstock');
|
||||||
$reorder = $this->input->post('reorder');
|
$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))
|
if (empty($stockdate))
|
||||||
{
|
{
|
||||||
$stockdate = NULL;
|
// $stockdate = NULL;
|
||||||
|
$stockdate = date("Y-m-d");
|
||||||
|
$currentstock = $stock;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$stockdate = strtotime( $stockdate);
|
$stockdate = strtotime( $stockdate);
|
||||||
$stockdate = date("Y-m-d ", $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';
|
$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();
|
//print_r($RawMaterial);die();
|
||||||
$result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial);
|
$result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial);
|
||||||
|
|
||||||
|
|||||||
@ -58,6 +58,18 @@ if(!function_exists('verifyHashedPassword'))
|
|||||||
return $CI->db->get('T_fav_add')->result();
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -119,25 +119,6 @@ return $afftectedRows;
|
|||||||
$this->db->from('T_Inwardgateregister_fileupload');
|
$this->db->from('T_Inwardgateregister_fileupload');
|
||||||
$this->db->where('IGRNO',$IGRNO);
|
$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();
|
$query = $this->db->get();
|
||||||
|
|
||||||
$result = $query->result();
|
$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)
|
function getitemvalue($pono,$MaterialCode)
|
||||||
{
|
{
|
||||||
$this->db->select('Rate,SupplierID');
|
$this->db->select('Rate,SupplierID');
|
||||||
@ -803,33 +805,4 @@ function getPOmaterial($PONO)
|
|||||||
return $r;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -271,5 +271,19 @@ WHERE MaterialCode=? AND CreatedOn >=? AND CreatedOn <=? ";
|
|||||||
|
|
||||||
return $temp;
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -536,7 +536,7 @@ $(function() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-primary font rootaddClick" ID="rootaddClick" > <span class="bold">Add</span></a>
|
<a class="btn btn-primary font rootaddClick" ID="rootaddClick" > <span class="bold">Add</span></a>
|
||||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -403,4 +403,6 @@ function Validate()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -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 '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/>
|
<input type="hidden" name="<?php echo 'rawprice'.$index ?>" id="<?php echo 'rawprice'.$index ?>" value="<?php echo $raw->Price ; ?>" readonly/>
|
||||||
|
|
||||||
@ -673,6 +675,8 @@ $(function() {
|
|||||||
<!-- <td id="consumaterialname<?php echo $inde?>"><?php echo $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="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 id="consumaterialPrice<?php echo $inde?>"><?php echo $cou->Price?></td>
|
||||||
<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 '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 ; ?>" />
|
<input type="hidden" name="<?php echo 'consumeprice'.$inde ?>" id="<?php echo 'consumeprice'.$inde ?>" value="<?php echo $cou->Price ; ?>" />
|
||||||
|
|
||||||
<?php }}?>
|
<?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 '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 ; ?>" />
|
<input type="hidden" name="<?php echo 'packprice'.$intt ?>" id="<?php echo 'packprice'.$intt ?>" value="<?php echo $pac->Price ; ?>" />
|
||||||
|
|
||||||
<?php }}?>
|
<?php }}?>
|
||||||
|
|||||||
@ -168,6 +168,43 @@ display: none;
|
|||||||
<i class="fa fa-star-half-o"></i>
|
<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 -->
|
<!-- User Account: style can be found in dropdown.less -->
|
||||||
<li class="dropdown user user-menu">
|
<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 -->
|
<!--STOCK -->
|
||||||
<?php if(empty($DepAccesslist)){?>
|
<?php if(empty($DepAccesslist)){?>
|
||||||
<?php if($DEPCode == PRODUCTION){?>
|
<?php if($DEPCode == PRODUCTION){?>
|
||||||
@ -872,6 +918,8 @@ else{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- RESIN BATCH CARD MODULE END-->
|
<!-- RESIN BATCH CARD MODULE END-->
|
||||||
|
|
||||||
<!-- <?php print_r($DepAccesslist)?> -->
|
<!-- <?php print_r($DepAccesslist)?> -->
|
||||||
@ -950,6 +998,15 @@ else{
|
|||||||
<span>Material Master</span>
|
<span>Material Master</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<!--
|
||||||
|
<li><a href="<?php echo base_url();?>shortagematerialListing" >
|
||||||
|
<i class="fa fa-files-o"></i>
|
||||||
|
<span>Reorder Level</span>
|
||||||
|
</a>
|
||||||
|
</li> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo base_url(); ?>batchcard/getHistListing">
|
<a href="<?php echo base_url(); ?>batchcard/getHistListing">
|
||||||
<i class="fa fa-history"></i>
|
<i class="fa fa-history"></i>
|
||||||
@ -1102,6 +1159,16 @@ else{
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<li><a href="<?php echo base_url();?>shortagematerialListing" >
|
||||||
|
<i class="fa fa-files-o"></i>
|
||||||
|
<span>Reorder Level</span>
|
||||||
|
</a>
|
||||||
|
</li> -->
|
||||||
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo base_url(); ?>batchcard/getHistListing">
|
<a href="<?php echo base_url(); ?>batchcard/getHistListing">
|
||||||
<i class="fa fa-history"></i>
|
<i class="fa fa-history"></i>
|
||||||
|
|||||||
85
application/views/shortagematerialListing.php
Normal file
85
application/views/shortagematerialListing.php
Normal 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>
|
||||||
Loading…
Reference in New Issue
Block a user