Asset screen issue fixed
This commit is contained in:
parent
8f6561d726
commit
7fd5363327
@ -48,12 +48,12 @@ class assetdetails extends BaseController
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* This function is used to load the add new supplier */
|
* This function is used to load the add new supplier */
|
||||||
function addasset($PO='')
|
function addasset()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
$data['AssetStatus'] = $this->assetdetails_model->getConfigValue('C015');
|
$data['AssetStatus'] = $this->assetdetails_model->getConfigValue('C015');
|
||||||
$data['po'] = $this->assetdetails_model->getPO($PO);
|
$data['po'] = $this->assetdetails_model->getPO();
|
||||||
|
|
||||||
//print_r($data);die();
|
//print_r($data);die();
|
||||||
$this->global['pageTitle'] = 'siddharth : Add Asset';
|
$this->global['pageTitle'] = 'siddharth : Add Asset';
|
||||||
@ -95,14 +95,14 @@ class assetdetails extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
$type = $this->assetdetails_model->gettyp($line);
|
$type = $this->assetdetails_model->gettyp($line);
|
||||||
//print_r($type);die();
|
|
||||||
$data='';
|
$data='';
|
||||||
if(!empty($type)){
|
if(!empty($type)){
|
||||||
|
|
||||||
foreach($type as $item){
|
foreach($type as $item){
|
||||||
|
|
||||||
$data = $item->POType;
|
$data = $item->POType;
|
||||||
//print_r($data);die();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -193,7 +193,6 @@ class assetdetails extends BaseController
|
|||||||
$this->form_validation->set_rules('Location','Location','trim|required');
|
$this->form_validation->set_rules('Location','Location','trim|required');
|
||||||
$this->form_validation->set_rules('User','User','trim|required');
|
$this->form_validation->set_rules('User','User','trim|required');
|
||||||
$this->form_validation->set_rules('SupplierName','SupplierName','trim|callback_Supplier_validate');
|
$this->form_validation->set_rules('SupplierName','SupplierName','trim|callback_Supplier_validate');
|
||||||
$this->form_validation->set_rules('DateOfPurchase','DateOfPurchase','trim|required');
|
|
||||||
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim|required');
|
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim|required');
|
||||||
$this->form_validation->set_rules('Assetvalue','Assetvalue','trim|required');
|
$this->form_validation->set_rules('Assetvalue','Assetvalue','trim|required');
|
||||||
$this->form_validation->set_rules('AssetStatus','AssetStatus','trim|callback_Asset_validate');
|
$this->form_validation->set_rules('AssetStatus','AssetStatus','trim|callback_Asset_validate');
|
||||||
@ -211,18 +210,15 @@ class assetdetails extends BaseController
|
|||||||
$Location = $this->input->post('Location');
|
$Location = $this->input->post('Location');
|
||||||
$User = $this->input->post('User');
|
$User = $this->input->post('User');
|
||||||
$SupplierName = $this->input->post('SupplierName');
|
$SupplierName = $this->input->post('SupplierName');
|
||||||
$DateOfPurchase = $this->input->post('DateOfPurchase');
|
|
||||||
$DateOfCommission = $this->input->post('DateOfCommission');
|
$DateOfCommission = $this->input->post('DateOfCommission');
|
||||||
$CreatedBy = $this->session->userdata('userId');
|
$CreatedBy = $this->session->userdata('userId');
|
||||||
$AssetValue = $this->input->post('Assetvalue');
|
$AssetValue = $this->input->post('Assetvalue');
|
||||||
if($DateOfCommission != '')
|
|
||||||
{
|
if($DateOfCommission != '')
|
||||||
$DOPurchase = $this->getDateformat($DateOfPurchase);
|
{
|
||||||
}
|
$DOCommission= $this->getDateformat($DateOfCommission);
|
||||||
if($DateOfPurchase != '')
|
}
|
||||||
{
|
|
||||||
$DOCommission= $this->getDateformat($DateOfCommission);
|
|
||||||
}
|
|
||||||
$AssetStatus = $this->input->post('AssetStatus');
|
$AssetStatus = $this->input->post('AssetStatus');
|
||||||
$Remarks = $this->input->post('Remarks');
|
$Remarks = $this->input->post('Remarks');
|
||||||
$PONO = $this->input->post('PONO');
|
$PONO = $this->input->post('PONO');
|
||||||
@ -246,7 +242,7 @@ class assetdetails extends BaseController
|
|||||||
$asset = array();
|
$asset = array();
|
||||||
|
|
||||||
|
|
||||||
$asset = array('AssetName'=>$AssetName, 'Description'=>$Description,'DEPCode'=>$Department,'Location'=>$Location,'UserName'=>$User,'SupplierCode'=>$SupplierName,'DateOfPurchase'=>$DOPurchase,'DateOfCommison'=>$DOCommission,'AssetValue'=>$AssetValue,'AssetStatus'=>$AssetStatus,'IsActive'=>$IsActive,'Remarks'=>$Remarks,'CreatedBy'=>$CreatedBy,'PONO'=>$PONO,'POLineItem'=>$lineitem,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
|
$asset = array('AssetName'=>$AssetName, 'Description'=>$Description,'DEPCode'=>$Department,'Location'=>$Location,'UserName'=>$User,'SupplierCode'=>$SupplierName,'DateOfCommison'=>$DOCommission,'AssetValue'=>$AssetValue,'AssetStatus'=>$AssetStatus,'IsActive'=>$IsActive,'Remarks'=>$Remarks,'CreatedBy'=>$CreatedBy,'PONO'=>$PONO,'POLineItem'=>$lineitem,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
|
||||||
//print_r($asset);die();
|
//print_r($asset);die();
|
||||||
$result = $this->assetdetails_model->addNewasset($asset);
|
$result = $this->assetdetails_model->addNewasset($asset);
|
||||||
// print_r($result);die();
|
// print_r($result);die();
|
||||||
@ -322,8 +318,7 @@ class assetdetails extends BaseController
|
|||||||
$this->form_validation->set_rules('Location','Location','trim|required');
|
$this->form_validation->set_rules('Location','Location','trim|required');
|
||||||
$this->form_validation->set_rules('User','User','trim|required');
|
$this->form_validation->set_rules('User','User','trim|required');
|
||||||
$this->form_validation->set_rules('SupplierName','SupplierName','trim|callback_Supplier_validate');
|
$this->form_validation->set_rules('SupplierName','SupplierName','trim|callback_Supplier_validate');
|
||||||
$this->form_validation->set_rules('DateOfPurchase','DateOfPurchase','trim|required');
|
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim|required');
|
||||||
$this->form_validation->set_rules('DateOfCommission','DateOfCommission','trim|required');
|
|
||||||
$this->form_validation->set_rules('Assetvalue','Assetvalue','trim|required');
|
$this->form_validation->set_rules('Assetvalue','Assetvalue','trim|required');
|
||||||
$this->form_validation->set_rules('AssetStatus','AssetStatus','trim|callback_Asset_validate');
|
$this->form_validation->set_rules('AssetStatus','AssetStatus','trim|callback_Asset_validate');
|
||||||
|
|
||||||
@ -341,17 +336,14 @@ class assetdetails extends BaseController
|
|||||||
$Location = $this->input->post('Location');
|
$Location = $this->input->post('Location');
|
||||||
$User = $this->input->post('User');
|
$User = $this->input->post('User');
|
||||||
$SupplierName = $this->input->post('SupplierName');
|
$SupplierName = $this->input->post('SupplierName');
|
||||||
$DateOfPurchase = $this->input->post('DateOfPurchase');
|
|
||||||
|
|
||||||
// $DateOfPurchase = $DateOfPurchase ->format('d-m-y');
|
// $DateOfPurchase = $DateOfPurchase ->format('d-m-y');
|
||||||
$DateOfCommission = $this->input->post('DateOfCommission');
|
$DateOfCommission = $this->input->post('DateOfCommission');
|
||||||
$UpdatedBy = $this->session->userdata('userId');
|
$UpdatedBy = $this->session->userdata('userId');
|
||||||
$Assetvalue = $this->input->post('Assetvalue');
|
$Assetvalue = $this->input->post('Assetvalue');
|
||||||
if($DateOfCommission != '')
|
|
||||||
{
|
if($DateOfCommission != '')
|
||||||
$DOPurchase = $this->getDateformat($DateOfPurchase);
|
|
||||||
}
|
|
||||||
if($DateOfPurchase != '')
|
|
||||||
{
|
{
|
||||||
$DOCommission= $this->getDateformat($DateOfCommission);
|
$DOCommission= $this->getDateformat($DateOfCommission);
|
||||||
}
|
}
|
||||||
@ -378,7 +370,7 @@ class assetdetails extends BaseController
|
|||||||
$asset = array();
|
$asset = array();
|
||||||
|
|
||||||
|
|
||||||
$asset = array('AssetName'=>$AssetName, 'Description'=>$Description,'DEPCode'=>$Department,'Location'=>$Location,'UserName'=>$User,'SupplierCode'=>$SupplierName,'DateOfPurchase'=>$DOPurchase,'DateOfCommison'=>$DOCommission,'AssetValue'=>$Assetvalue,'AssetStatus'=>$AssetStatus,'IsActive'=>$IsActive,'Remarks'=>$Remarks,'UpdatedBy'=>$UpdatedBy,'PONO'=>$PONO,'POLineItem'=>$lineitem,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
|
$asset = array('AssetName'=>$AssetName, 'Description'=>$Description,'DEPCode'=>$Department,'Location'=>$Location,'UserName'=>$User,'SupplierCode'=>$SupplierName,'DateOfCommison'=>$DOCommission,'AssetValue'=>$Assetvalue,'AssetStatus'=>$AssetStatus,'IsActive'=>$IsActive,'Remarks'=>$Remarks,'UpdatedBy'=>$UpdatedBy,'PONO'=>$PONO,'POLineItem'=>$lineitem,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity);
|
||||||
|
|
||||||
//print_r($asset);die();
|
//print_r($asset);die();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user