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 */
|
||||
function addasset($PO='')
|
||||
function addasset()
|
||||
{
|
||||
|
||||
|
||||
$data['AssetStatus'] = $this->assetdetails_model->getConfigValue('C015');
|
||||
$data['po'] = $this->assetdetails_model->getPO($PO);
|
||||
$data['po'] = $this->assetdetails_model->getPO();
|
||||
|
||||
//print_r($data);die();
|
||||
$this->global['pageTitle'] = 'siddharth : Add Asset';
|
||||
@ -95,14 +95,14 @@ class assetdetails extends BaseController
|
||||
|
||||
|
||||
$type = $this->assetdetails_model->gettyp($line);
|
||||
//print_r($type);die();
|
||||
|
||||
$data='';
|
||||
if(!empty($type)){
|
||||
|
||||
foreach($type as $item){
|
||||
|
||||
$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('User','User','trim|required');
|
||||
$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('Assetvalue','Assetvalue','trim|required');
|
||||
$this->form_validation->set_rules('AssetStatus','AssetStatus','trim|callback_Asset_validate');
|
||||
@ -211,18 +210,15 @@ class assetdetails extends BaseController
|
||||
$Location = $this->input->post('Location');
|
||||
$User = $this->input->post('User');
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$DateOfPurchase = $this->input->post('DateOfPurchase');
|
||||
|
||||
$DateOfCommission = $this->input->post('DateOfCommission');
|
||||
$CreatedBy = $this->session->userdata('userId');
|
||||
$AssetValue = $this->input->post('Assetvalue');
|
||||
if($DateOfCommission != '')
|
||||
{
|
||||
$DOPurchase = $this->getDateformat($DateOfPurchase);
|
||||
}
|
||||
if($DateOfPurchase != '')
|
||||
{
|
||||
$DOCommission= $this->getDateformat($DateOfCommission);
|
||||
}
|
||||
|
||||
if($DateOfCommission != '')
|
||||
{
|
||||
$DOCommission= $this->getDateformat($DateOfCommission);
|
||||
}
|
||||
$AssetStatus = $this->input->post('AssetStatus');
|
||||
$Remarks = $this->input->post('Remarks');
|
||||
$PONO = $this->input->post('PONO');
|
||||
@ -246,7 +242,7 @@ class assetdetails extends BaseController
|
||||
$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();
|
||||
$result = $this->assetdetails_model->addNewasset($asset);
|
||||
// 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('User','User','trim|required');
|
||||
$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('AssetStatus','AssetStatus','trim|callback_Asset_validate');
|
||||
|
||||
@ -341,17 +336,14 @@ class assetdetails extends BaseController
|
||||
$Location = $this->input->post('Location');
|
||||
$User = $this->input->post('User');
|
||||
$SupplierName = $this->input->post('SupplierName');
|
||||
$DateOfPurchase = $this->input->post('DateOfPurchase');
|
||||
|
||||
|
||||
// $DateOfPurchase = $DateOfPurchase ->format('d-m-y');
|
||||
$DateOfCommission = $this->input->post('DateOfCommission');
|
||||
$UpdatedBy = $this->session->userdata('userId');
|
||||
$Assetvalue = $this->input->post('Assetvalue');
|
||||
if($DateOfCommission != '')
|
||||
{
|
||||
$DOPurchase = $this->getDateformat($DateOfPurchase);
|
||||
}
|
||||
if($DateOfPurchase != '')
|
||||
|
||||
if($DateOfCommission != '')
|
||||
{
|
||||
$DOCommission= $this->getDateformat($DateOfCommission);
|
||||
}
|
||||
@ -378,7 +370,7 @@ class assetdetails extends BaseController
|
||||
$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();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user