'Newscreenaddedandissuefixed'
This commit is contained in:
parent
246f489155
commit
d968350bd9
@ -40,8 +40,10 @@ class MRIRcontroller extends BaseController
|
|||||||
public function viewmrirforbilling()
|
public function viewmrirforbilling()
|
||||||
{
|
{
|
||||||
$this->global['pageTitle'] = 'Siddharth : Billing ';
|
$this->global['pageTitle'] = 'Siddharth : Billing ';
|
||||||
|
$data['Billing'] = $this->mrir_model->view_mrir_Billing();
|
||||||
|
|
||||||
$this->loadViews("viewmrirforbilling", $this->global, NULL , NULL);
|
|
||||||
|
$this->loadViews("viewmrirforbilling", $this->global,$data , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -59,6 +61,15 @@ class MRIRcontroller extends BaseController
|
|||||||
$this->loadViews("materialinspectionreport", $this->global, $data,NULL);
|
$this->loadViews("materialinspectionreport", $this->global, $data,NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function viewinwardgateregister()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->global['pageTitle'] = 'Siddharth : View Inward Gate Register';
|
||||||
|
|
||||||
|
$data['IGR']= $this->mrir_model->ViewigrListing();
|
||||||
|
|
||||||
|
$this->loadViews("viewinwardgateregister",$this->global,$data,NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/* For View MRIR Screen (view folder - view page)*/
|
/* For View MRIR Screen (view folder - view page)*/
|
||||||
function viewmaterialinspectionreport()
|
function viewmaterialinspectionreport()
|
||||||
@ -111,6 +122,9 @@ class MRIRcontroller extends BaseController
|
|||||||
$mrirmastervalues = array('IGRNO'=>$igrno,'PONO'=>$PONO,'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
|
$mrirmastervalues = array('IGRNO'=>$igrno,'PONO'=>$PONO,'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
|
||||||
|
|
||||||
$mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues);
|
$mrirmaster = $this->mrir_model->master_mrir($mrirmastervalues);
|
||||||
|
$IGRDetails = array('IGRStatus'=>MRIR_CREATED,'UpdateBY'=>$CreatedBy,'UpdatedOn'=>$createddt);
|
||||||
|
|
||||||
|
$this->mrir_model->UpdateIGRStatus($IGRDetails,$igrno);
|
||||||
|
|
||||||
|
|
||||||
$MRIRNO = '';
|
$MRIRNO = '';
|
||||||
@ -141,7 +155,7 @@ class MRIRcontroller extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
echo "successfully created : ".$MRIRNO;
|
echo "successfully created : ".$MRIRNO;
|
||||||
// redirect(MRIRcontroller/);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -154,34 +168,51 @@ class MRIRcontroller extends BaseController
|
|||||||
|
|
||||||
$mrir_no = $this->input->post('MRIRNO');
|
$mrir_no = $this->input->post('MRIRNO');
|
||||||
$RowCount = $this->input->post('RowCount');
|
$RowCount = $this->input->post('RowCount');
|
||||||
|
$Status = $this->input->post('status');
|
||||||
$UPdateby=$this->session->userdata('userId');
|
$UPdateby=$this->session->userdata('userId');
|
||||||
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
||||||
$UPdateon = $date->format('Y-m-d H:i:s');
|
$UPdateon = $date->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
//this array to store the updated value in master table..
|
//this array to store the updated value in master table..
|
||||||
$updatemastervalues = array('UpdateBY'=>$UPdateby,'UpdatedOn'=>$UPdateon);
|
$updatemastervalues = array('MRIRStatus'=>$Status,'UpdateBY'=>$UPdateby,'UpdatedOn'=>$UPdateon);
|
||||||
|
|
||||||
$updatemaster = $this->mrir_model->update_mrirmaster($updatemastervalues,$mrir_no);
|
$updatemaster = $this->mrir_model->update_mrirmaster($updatemastervalues,$mrir_no);
|
||||||
|
$strStatus = '';
|
||||||
//echo "outside for loop";
|
//echo "outside for loop";
|
||||||
for ($i = 1; $i <= $RowCount; $i++)
|
for ($i = 1; $i <= $RowCount; $i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$acceptquantity=$this->input->post('AcceptQuantity'.$i);
|
$acceptquantity=$this->input->post('AcceptQuantity'.$i);
|
||||||
$rejectquantity=$this->input->post('RejectQuantity'.$i);
|
$rejectquantity=$this->input->post('RejectQuantity'.$i);
|
||||||
|
$MaterialCode = $this->input->post('MaterialCode'.$i);
|
||||||
|
if(strlen($acceptquantity)>0)
|
||||||
|
{
|
||||||
|
$strStatus = MRIR_APPROVED;
|
||||||
|
$avlQty = 0;
|
||||||
|
$getAvailableqty = $this->mrir_model->getItemQuantityFromStock($MaterialCode);
|
||||||
|
if(count($getAvailableqty)>0)
|
||||||
|
{
|
||||||
|
$avlQty = $getAvailableqty[0]['Quantity'];
|
||||||
|
}
|
||||||
|
$updatStock = array('Quantity'=>($acceptquantity+$avlQty),'Status'=>'1','UpdatedOn'=>$UPdateon,'UpdatedBy'=>$UPdateby);
|
||||||
|
// print_r($updatStock);
|
||||||
|
}
|
||||||
|
elseif(strlen($acceptquantity)==0 && strlen($rejectquantity)>0)
|
||||||
|
{
|
||||||
|
$strStatus = MRIR_REJECTED;
|
||||||
|
}
|
||||||
|
|
||||||
$remark=$this->input->post('Remark'.$i);
|
$remark=$this->input->post('Remark'.$i);
|
||||||
$updateby=$this->session->userdata('userId');
|
$updateby=$this->session->userdata('userId');
|
||||||
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
|
||||||
$updateon = $date->format('Y-m-d H:i:s');
|
$updateon = $date->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
//this array to store the update value in child table..
|
//this array to store the update value in child table..
|
||||||
$updatedetailvalues = array('UpdateBy'=>$updateby,'UpdatedOn'=>$updateon,'QuantityAccepted'=>$acceptquantity,'QuantityRejected'=>$rejectquantity,'Remarks'=>$remark);
|
$updatedetailvalues = array('UpdateBy'=>$updateby,'UpdatedOn'=>$updateon,'QuantityAccepted'=>$acceptquantity,'QuantityRejected'=>$rejectquantity,'Remarks'=>$remark,'MRIRStatus'=>$strStatus);
|
||||||
|
|
||||||
$updatedetails = $this->mrir_model->update_mrirdetail($updatedetailvalues,$mrir_no);
|
$updatedetails = $this->mrir_model->update_mrirdetail($updatedetailvalues,$mrir_no);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "successfully updated :".$mrir_no;
|
echo "successfully updated :".$mrir_no;
|
||||||
|
|
||||||
|
|||||||
@ -34,14 +34,7 @@ class inwardgateregister extends BaseController
|
|||||||
$this->loadViews("viewinwardgateregister", $this->global,NULL , NULL);
|
$this->loadViews("viewinwardgateregister", $this->global,NULL , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
function viewinwardgateregister()
|
|
||||||
{
|
|
||||||
$this->load->model('inwardgateregister_model');
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : Inward Gate Register';
|
|
||||||
$data['IGR']= $this->inwardgateregister_model->igrListing();
|
|
||||||
|
|
||||||
$this->loadViews("viewinwardgateregister",$this->global,$data,NULL);
|
|
||||||
}
|
|
||||||
function viewIGRDetails()
|
function viewIGRDetails()
|
||||||
{
|
{
|
||||||
$this->load->model('inwardgateregister_model');
|
$this->load->model('inwardgateregister_model');
|
||||||
|
|||||||
@ -47,10 +47,67 @@ class storestatus extends BaseController
|
|||||||
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
$this->global['pageTitle'] = 'Siddharth Industries : Store Status';
|
||||||
//viewStock
|
//viewStock
|
||||||
$data['Stock'] = $this->store_model->viewStock();
|
$data['Stock'] = $this->store_model->viewStock();
|
||||||
|
$data['MaterialList'] = $this->store_model->GetAllMaterialList();
|
||||||
|
$data['StockStatus'] = $this->store_model->GetConfigValue('C021');
|
||||||
$this->loadViews("storestatus", $this->global, $data,null);
|
$this->loadViews("storestatus", $this->global, $data,null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is used to load the Supplier list
|
||||||
|
*/
|
||||||
|
function AddStock()
|
||||||
|
{
|
||||||
|
|
||||||
|
$MaterialCode = $this->input->post('MaterialCode');
|
||||||
|
$AvailableQty = $this->input->post('AddAvailableStock');
|
||||||
|
$AvailbilityStatus = $this->input->post('StockAvail');
|
||||||
|
$Remarks = $this->input->post('Remarks');
|
||||||
|
$CreatedBy = $this->session->userdata('EmpID');
|
||||||
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
|
$Status = 1;
|
||||||
|
if(trim($AvailbilityStatus) == 'YES')
|
||||||
|
{
|
||||||
|
$Status = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//this array to store the value in master table..
|
||||||
|
$Stockdetails = array('MaterialCode'=>$MaterialCode,'Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'CreatedBy'=>$CreatedBy,'Createdon'=>$createddt);
|
||||||
|
|
||||||
|
$data['Stock'] = $this->store_model->addStock($Stockdetails);
|
||||||
|
echo 'Stock Added successfully';
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function UpdateStock()
|
||||||
|
{
|
||||||
|
|
||||||
|
$MaterialCode = $this->input->post('EditMaterialCode');
|
||||||
|
$AvailableQty = $this->input->post('EditAvailableStock');
|
||||||
|
$AvailbilityStatus = $this->input->post('EditStockAvail');
|
||||||
|
$Remarks = $this->input->post('EditRemarks');
|
||||||
|
$CreatedBy = $this->session->userdata('EmpID');
|
||||||
|
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||||
|
$createddt = $dt->format('Y-m-d H:i:s');
|
||||||
|
$Status = 1;
|
||||||
|
if(trim($AvailbilityStatus) == 'YES')
|
||||||
|
{
|
||||||
|
$Status = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//this array to store the value in master table..
|
||||||
|
$Stockdetails = array('Quantity'=>$AvailableQty,'Status'=>$Status,'Remarks'=>$Remarks, 'UpdatedBy'=>$CreatedBy,'updatedOn'=>$createddt);
|
||||||
|
|
||||||
|
$data['Stock'] = $this->store_model->UpdateStock($Stockdetails,$MaterialCode);
|
||||||
|
echo 'Stock updated successfully';
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function pageNotFound()
|
function pageNotFound()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user