Available Budget change
This commit is contained in:
parent
9a4ac13092
commit
7a806ffc9f
@ -158,15 +158,28 @@ class purchaseorder extends BaseController
|
||||
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
$data['RequistionDetails'] = $ReqDetails;
|
||||
$CostCode = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
|
||||
$Year = $dt->format('Y');
|
||||
|
||||
$this->load->model('costcenter_model');
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
{
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
|
||||
foreach ($ReqDetails as $Rs):
|
||||
$CostCode = $Rs->CostCenterCode;
|
||||
endforeach;
|
||||
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
@ -183,7 +196,7 @@ class purchaseorder extends BaseController
|
||||
$data['INRSYMBOL']=$this->purchaseorder_model->GetINRCurrencytype('INR');
|
||||
//print_r($data['INRSYMBOL']);
|
||||
|
||||
$AvlimportBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$Year,$ReqType);
|
||||
$AvlimportBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
// $AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
|
||||
@ -338,12 +351,25 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
|
||||
$CostCode = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
$Year = $dt->format('Y');
|
||||
$this->load->model('costcenter_model');
|
||||
$FYStart = '';
|
||||
$FYEnd = '';
|
||||
$FiscalYear = $this->costcenter_model->getFiscalYear();
|
||||
if(!empty($FiscalYear))
|
||||
{
|
||||
foreach ($FiscalYear as $Fy)
|
||||
{
|
||||
$FYStart =$Fy->StartYear;
|
||||
$FYEnd =$Fy->EndYear;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$FYdt = $FYStart." - ".$FYEnd ;
|
||||
foreach ($ReqDetails as $Rs):
|
||||
$CostCode = $Rs->CostCenterCode;
|
||||
endforeach;
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
@ -389,7 +415,7 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
else if($ReqType == IMPORT)
|
||||
{
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
@ -427,7 +453,7 @@ class purchaseorder extends BaseController
|
||||
{
|
||||
$CapitalRange = $_GET['CapitalRange'];
|
||||
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$Year,$ReqType);
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user