Fiscal year change in Cost center
This commit is contained in:
parent
ac969d3ca7
commit
15ce7862e7
@ -61,6 +61,8 @@ class CostCenter extends BaseController
|
|||||||
|
|
||||||
$data['Approver'] = $this->costcenter_model->getApproverName();
|
$data['Approver'] = $this->costcenter_model->getApproverName();
|
||||||
|
|
||||||
|
$data['FiscalYear'] = $this->costcenter_model->getFiscalYear();
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'siddharth : Add Cost Center';
|
$this->global['pageTitle'] = 'siddharth : Add Cost Center';
|
||||||
|
|
||||||
$this->loadViews("addCostCenter", $this->global,$data, NULL);
|
$this->loadViews("addCostCenter", $this->global,$data, NULL);
|
||||||
@ -169,6 +171,7 @@ class CostCenter extends BaseController
|
|||||||
$data['DeptList'] = $this->costcenter_model->GetDepartmentNotinCostCenter($CostCenterID);
|
$data['DeptList'] = $this->costcenter_model->GetDepartmentNotinCostCenter($CostCenterID);
|
||||||
$data['BudType'] = $this->costcenter_model->GetBudgetTypeNotinCostCenter($CostCenterID,'C004');
|
$data['BudType'] = $this->costcenter_model->GetBudgetTypeNotinCostCenter($CostCenterID,'C004');
|
||||||
$data['BudYear'] = $this->costcenter_model->GetBudgetYear($CostCenterID);
|
$data['BudYear'] = $this->costcenter_model->GetBudgetYear($CostCenterID);
|
||||||
|
$data['FiscalYear'] = $this->costcenter_model->getFiscalYear();
|
||||||
//print_r(count($data['BudType']));
|
//print_r(count($data['BudType']));
|
||||||
|
|
||||||
$this->global['pageTitle'] = 'Siddharth : Edit Cost';
|
$this->global['pageTitle'] = 'Siddharth : Edit Cost';
|
||||||
|
|||||||
@ -111,15 +111,26 @@ class servicepurchaseorder extends BaseController
|
|||||||
function AvilBudgetAmount()
|
function AvilBudgetAmount()
|
||||||
{
|
{
|
||||||
// echo 'Controller called';
|
// echo 'Controller called';
|
||||||
|
$this->load->model('costcenter_model');
|
||||||
$CostCode = $this->input->post('id');
|
$CostCode = $this->input->post('id');
|
||||||
$ReqType = $_GET['ReqType'];
|
$ReqType = $_GET['ReqType'];
|
||||||
|
$FYStart = '';
|
||||||
|
$FYEnd = '';
|
||||||
|
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||||
|
if(!empty($FiscalYear))
|
||||||
|
{
|
||||||
|
foreach ($FiscalYear as $Fy)
|
||||||
|
{
|
||||||
|
$FYStart =$Fy->StartYear;
|
||||||
|
$FYEnd =$Fy->EndYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
$FYdt = $FYStart." - ".$FYEnd ;
|
||||||
|
|
||||||
$Year = $dt->format('Y');
|
|
||||||
$this->load->model('purchaseorder_model');
|
$this->load->model('purchaseorder_model');
|
||||||
$result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
|
||||||
|
$result = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||||
//print_r($result);
|
//print_r($result);
|
||||||
$AvilBudAmt = '0';
|
$AvilBudAmt = '0';
|
||||||
if(count($result)>0)
|
if(count($result)>0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user