From 1ceb046765ac4c36901e2148ad43b48cec744356 Mon Sep 17 00:00:00 2001 From: gandhimathi Bharathirajan Date: Sat, 6 May 2017 17:14:14 +0530 Subject: [PATCH] Cost center --- application/controllers/CostCenter.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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';