capital po view for finance
This commit is contained in:
parent
65e679e84b
commit
7d20ecbbff
@ -528,7 +528,7 @@ class purchaseorder extends BaseController
|
||||
$data['INRSYMBOL']=$this->purchaseorder_model->GetINRCurrencytype('INR');
|
||||
/* Cost code from Requisition - Client Review Fix
|
||||
Start here */
|
||||
|
||||
$data['PoTypeOptions'] = $this->purchaseorder_model->getConfigValue('C026');
|
||||
$ReqDetails = $this->purchaseorder_model->getRequistDetails($ReqArray);
|
||||
|
||||
$data['RequistionDetails'] = $ReqDetails;
|
||||
@ -631,6 +631,62 @@ class purchaseorder extends BaseController
|
||||
$this->loadViews("editimportpo", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
else if($POType == CAPITAL)
|
||||
{
|
||||
$CapitalRange = $_GET['CapitalRange'];
|
||||
|
||||
$CapitalAvlBudget = $this->purchaseorder_model->GetAvailableCapitalBudgetAmount($CostCode,$FYdt,$ReqType);
|
||||
|
||||
|
||||
if(count($CapitalAvlBudget)>0)
|
||||
{
|
||||
|
||||
|
||||
$data['AvlCapitalBudAmt'] = $CapitalAvlBudget[0]['BudgetAmount'] - $CapitalAvlBudget[0]['Totalvalue'];
|
||||
}
|
||||
|
||||
if($CapitalRange=='0'){
|
||||
$data['POItem'] = $this->purchaseorder_model->getCapitalPurchaseOrderDetails($PONO);
|
||||
}
|
||||
else if($CapitalRange=='1'){
|
||||
$data['POItem'] = $this->purchaseorder_model->getDomesticCapitalPurchaseOrderDetails($PONO);
|
||||
}
|
||||
$data['requestedBy'] = $this->purchaseorder_model->GetRequesedByDetails($PONO);
|
||||
|
||||
|
||||
//$CapitalRange='';
|
||||
foreach($data['POItem'] as $Rate)
|
||||
{
|
||||
$exRate=$Rate->ExchangeRate;
|
||||
$CapitalRange=$Rate->CapitalRange;
|
||||
}
|
||||
foreach($data['POItem'] as $CUR)
|
||||
{
|
||||
|
||||
$Currency=$CUR->CurrencyType;
|
||||
}
|
||||
|
||||
if($CapitalRange=='0'){
|
||||
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency);
|
||||
$data['ExchangeRate']=$exRate;
|
||||
$data['Currency']=$this->purchaseorder_model->GetCurrencytype();
|
||||
}
|
||||
else if($CapitalRange=='1'){
|
||||
$data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail('INR');
|
||||
$data['ExchangeRate']=$exRate;
|
||||
$data['Currency']=$this->purchaseorder_model->GetCurrencytype();
|
||||
}
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Capital Purchase order form';
|
||||
$this->loadViews("editCapitalPo", $this->global, $data, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// To get the Material value based on the MaterialCode
|
||||
|
||||
@ -1251,7 +1251,7 @@ function GetCurrencytype()
|
||||
{
|
||||
|
||||
$this->db->distinct();
|
||||
$this->db->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,
|
||||
$this->db->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
|
||||
(select FirstName from T_Employee_Details where EmpID=EID)as Approver');
|
||||
$this->db->from('T_PurchaseOrder_Master mast');
|
||||
// $this->db->order_by('mast.Status',"PO_CREATED");
|
||||
|
||||
@ -3356,15 +3356,46 @@ $("#PaymentMethod").select2();
|
||||
<input type="hidden" name="txtDeletedRow" id="txtDeletedRow" />
|
||||
|
||||
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED ) {
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php }?>
|
||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
|
||||
<?php }else { if($CapitalRange!=1){?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(2)" > <span class="bold">Submit</span></a>
|
||||
<?php } ?><a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> <?php } ?>
|
||||
<?php if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED )
|
||||
{
|
||||
|
||||
if($PONOStatus == PO_DRAFT || $PONOStatus == PO_CREATED)
|
||||
{?>
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> <?php
|
||||
}?>
|
||||
|
||||
<a class="btn btn-primary Save" ID="Submit" onclick="Save(1)" > <span class="bold">Submit</span></a>
|
||||
<a class="btn btn-primary Save" ID="Cancel" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">Cancel</span></a>
|
||||
|
||||
<?php }
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
if($DEPCode== FINANCE){?>
|
||||
<a class="btn btn-primary" ID="OK" onclick="PageRedirect()">OK</a>
|
||||
|
||||
<?php }
|
||||
|
||||
|
||||
else if($DEPCode!= FINANCE){
|
||||
|
||||
|
||||
|
||||
|
||||
if(($CapitalRange!=1))
|
||||
{?>
|
||||
|
||||
<a class="btn btn-primary Save" ID="Save" onclick="Save(2)" > <span class="bold">Submit</span></a>
|
||||
|
||||
|
||||
<a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a>
|
||||
<?php
|
||||
}} ?>
|
||||
|
||||
<!-- <a class="btn btn-primary" ID="OK" href="<?php echo base_url().'purchaseorderListing'; ?>"> <span class="bold">OK</span></a> --> <?php
|
||||
|
||||
} ?>
|
||||
|
||||
</div>
|
||||
|
||||
@ -6988,6 +7019,15 @@ function updateDiscountValuesChange(totAmt,disType,disAmt){
|
||||
return discount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function PageRedirect()
|
||||
{
|
||||
window.location = "poapproval";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -58,13 +58,13 @@ if(empty($Status))
|
||||
<tr id="<?php echo $index ?>" >
|
||||
|
||||
|
||||
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->ReqType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>" ><u><?php echo $record->PONO ?>
|
||||
<td><a target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->ReqType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>" ><u><?php echo $record->PONO ?></u>
|
||||
|
||||
|
||||
<?php if(($record->RType=='IMPORT')&&($record->StatusCode!='ST015'))
|
||||
<?php if(($record->RType=='IMPORT' || $record->RType=='CAPITAL')&&($record->StatusCode!='ST015'))
|
||||
{?>
|
||||
|
||||
<a target="_blank" href="<?php echo base_url() ?>purchaseorder/PurchaseOrderFinanceView?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->ReqType ?>&POType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="" ><u><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to View the Purchase Order details"></i>
|
||||
<a target="_blank" href="<?php echo base_url() ?>purchaseorder/PurchaseOrderFinanceView?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->ReqType ?>&POType=<?php echo $record->RType.'&CapitalRange='.$record->CapitalRange; ?>" data-id="<%=index%>" data-userid="" ><u><i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to View the Purchase Order details"></i>
|
||||
|
||||
<?php }?>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user