diff --git a/application/controllers/CostCenter.php b/application/controllers/CostCenter.php index 9b5cef01..d6a857d0 100644 --- a/application/controllers/CostCenter.php +++ b/application/controllers/CostCenter.php @@ -159,16 +159,23 @@ class CostCenter extends BaseController * This function is used load user edit information * @param number $userId : Optional : This is user id */ - function editOldcost($CostCenterID = NULL) + function editOldcost($CostCode = NULL) { - if($CostCenterID == null) - { - redirect('costListing'); - } + if($CostCode == '') + { + $CostCenterID = $_GET['CostCode']; + } + else + { + + $CostCenterID = $CostCode; } - $data['Cost'] = $this->costcenter_model->getuserinfo($CostCenterID); - //$data['users'] = $this->purchaseorder_model->getusers(); + $data['CostMaster'] = $this->costcenter_model->GetCostCenterMaster($CostCenterID); + $data['CostDepts'] = $this->costcenter_model->GetCostCenterDepartment($CostCenterID); + $data['CostBudget'] = $this->costcenter_model->GetCostCenterBudget($CostCenterID); + // $data['DeptList'] = $this->costcenter_model->GetDepartmentNotinCostCenter($CostCenterID); + $this->global['pageTitle'] = 'Siddharth : Edit Cost';