porelease view
This commit is contained in:
parent
e6346e50b5
commit
fea3efb777
@ -499,6 +499,138 @@ class purchaseorder extends BaseController
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function PurchaseOrderFinanceView()
|
||||
{
|
||||
$PONO = $_GET['PONO'];
|
||||
$POType = $_GET['POType'];
|
||||
|
||||
$ReqType= $_GET['ReqType'];
|
||||
|
||||
$Req = $this->purchaseorder_model->getRequistionNoFromPO($PONO);
|
||||
|
||||
$data['ReqList'] = $Req ;
|
||||
|
||||
$result = array();
|
||||
$ReqArray = array();
|
||||
foreach ($Req as $SID):
|
||||
$ReqArray[] = $SID->ReqNo ;
|
||||
$result[] = $this->purchaseorder_model->getRawPOMaterialList($SID->ReqNo);
|
||||
endforeach;
|
||||
|
||||
$data['MaterialList'] = $result;//$this->purchaseorder_model->getRawMaterialList($ReqType,$ReqArray);
|
||||
$data['Suplist'] = $this->purchaseorder_model->getSupplierName();
|
||||
|
||||
$data['Payment']=$this->purchaseorder_model->getPaymentTermsDetails();
|
||||
$data['INRSYMBOL']=$this->purchaseorder_model->GetINRCurrencytype('INR');
|
||||
/* Cost code from Requisition - Client Review Fix
|
||||
Start here */
|
||||
|
||||
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
|
||||
$data['RequistionDetails'] = $ReqDetails;
|
||||
foreach ($data['RequistionDetails'] as $ReqDet)
|
||||
{
|
||||
|
||||
$Status=$ReqDet->Status;
|
||||
}
|
||||
|
||||
$data['POSTATUS']=$this->purchaseorder_model->GetPOStatus($Status);
|
||||
|
||||
foreach ($data['POSTATUS'] as $POST)
|
||||
{
|
||||
$Status=$POST->StatusName;
|
||||
}
|
||||
|
||||
$CostCode = '';
|
||||
$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,$FYdt,$ReqType);
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
/* End Here */
|
||||
|
||||
$data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO);
|
||||
//$data['POSTATUS']=$this->purchaseorder_model->GetServicePurchaseOrder($PONO);
|
||||
//print_r($data['POMaster']);
|
||||
foreach ($data['POMaster'] as $Exc)
|
||||
{
|
||||
$exRate=$Exc->ExchangeRate;
|
||||
}
|
||||
foreach ($data['POMaster'] as $TER)
|
||||
{
|
||||
$PAYTERM=$TER->PaymentTerms;
|
||||
}
|
||||
|
||||
|
||||
$data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate();
|
||||
$data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006');
|
||||
$data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018');
|
||||
|
||||
|
||||
if($POType == IMPORT)
|
||||
{
|
||||
$AvlBudget = $this->purchaseorder_model->GetAvailableImportBudgetAmount($CostCode,$FYdt,'IMPORT');
|
||||
|
||||
|
||||
//print_r($AvlBudget);
|
||||
|
||||
|
||||
if(count($AvlBudget)>0)
|
||||
{
|
||||
$data['AvlBudAmt'] = $AvlBudget[0]['BudgetAmount'] - $AvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
//print_r($data['AvlBudAmt']);
|
||||
$data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO);
|
||||
// print_r($data['POItem']);
|
||||
$data['Currency']=$this->purchaseorder_model->GetCurrencytype();
|
||||
foreach($data['POMaster'] as $CUR)
|
||||
{
|
||||
//print_r($CUR->CurrencyType);
|
||||
$Currency=$CUR->CurrencyType;
|
||||
}
|
||||
// $data[$Rate->ExchangeRate]=$Rate->ExchangeRate;
|
||||
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
|
||||
$data['PaymentTerms']=$this->purchaseorder_model->GetPaymentTerms($PONO);
|
||||
$data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026');
|
||||
//print_r($data['PaymentTerms']);
|
||||
$unicode ='';
|
||||
foreach ($data['CurrencyDetail'] as $Detail)
|
||||
{
|
||||
$unicode=$Detail->FontCode2000;
|
||||
}
|
||||
foreach ($data['CurrencyDetail'] as $Detail)
|
||||
{
|
||||
$currencycode=$Detail->Currency_Code;
|
||||
}
|
||||
//print_r($unicode);
|
||||
$data['unicode']=$unicode;
|
||||
$data['currencycode']=$currencycode;
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form';
|
||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// To get the Material value based on the MaterialCode
|
||||
function getDetailsforReq()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user