list view
This commit is contained in:
parent
7d04eee02f
commit
2ae3c9ea0c
@ -1195,11 +1195,14 @@ function GetCurrencytype()
|
||||
{
|
||||
|
||||
$this->db->distinct();
|
||||
$this->db->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,mast.POType as ReqType,bud.BudgetAmount,mast.Remarks');
|
||||
$this->db->select('mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as ReqType,bud.BudgetAmount,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,
|
||||
(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");
|
||||
$this->db->join('T_Status st', 'st.StatusCode=mast.Status');
|
||||
$this->db->join('tbl_users tbl', 'mast.createdby=tbl.userid');
|
||||
$this->db->join('T_Employee_Details as emp', 'emp.empid=tbl.empid');
|
||||
$this->db->join('T_DepartmentDetails as Dep','Dep.DEPCode=emp.Departmentcode');
|
||||
$this->db->join('T_PurchaseOrder_LineItem req', 'req.PONO= mast.PONO');
|
||||
$this->db->join('T_Requestion_Master rmast','rmast.ReqNo=req.ReqNo');
|
||||
$this->db->join('T_CostCenter_Budget bud','bud.CostCenterCode = req.CostCenterCode and bud.BudgetType = rmast.ReqType');
|
||||
@ -1210,22 +1213,20 @@ function GetCurrencytype()
|
||||
$this->db->or_where('mast.Status',PO_ONHOLD);//ON HOLD
|
||||
$this->db->or_where('mast.Status',PO_AWAITING_RELEASE);// PO APPROVED
|
||||
$this->db->or_where('mast.Status',PO_RELEASED);//PO RELEASED
|
||||
$this->db->or_where('mast.Status',REQITEM_Emergency_PO_CREATED); // EMERGENGY PO
|
||||
$this->db->or_where('mast.Status',REQITEM_Emergency_PO_CREATED);
|
||||
$this->db->order_by('mast.Status'); // EMERGENGY PO
|
||||
// $this->db->or_where('mast.Status',PO_AMENDED); // EMERGENGY PO
|
||||
}
|
||||
else if($Amendment=='R'){ // R -RELEASED
|
||||
$this->db->or_where('mast.Status',PO_AWAITING_RELEASE);// PO APPROVED
|
||||
$this->db->or_where('mast.Status',PO_RELEASED);
|
||||
$this->db->order_by('mast.Status','asc');
|
||||
}
|
||||
$result=$this->db->get();
|
||||
// print_r($this->db->last_query());
|
||||
// print_r($this->db->last_query());
|
||||
return $result->result();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function UpdatePO($store, $PONO)
|
||||
|
||||
@ -29,17 +29,21 @@ if(empty($Status))
|
||||
|
||||
<div>
|
||||
<center><b><h2>Purchase Order Approval List </h2></b></center>
|
||||
<table id="Requisition" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
|
||||
<table id="Requisition" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
|
||||
|
||||
<div align="right" style="padding-right:10px">
|
||||
<div id="content" > </div>
|
||||
<div class="modal fade" role="dialog">
|
||||
|
||||
<thead style="background-color:#ddf">
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Purchase Order Number</th>
|
||||
<th>Purchase Order Type</th>
|
||||
<th>Cost Center Name</th>
|
||||
<th>Cost Center Code</th>
|
||||
<th>Department</th>
|
||||
<th>Available Budget Amount</th>
|
||||
<th>Total Order Value</th>
|
||||
<th>Created By</th>
|
||||
@ -59,17 +63,20 @@ if(empty($Status))
|
||||
{
|
||||
$index = $index +1;
|
||||
//echo $index;
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
<td><?php echo $record->ReqType ?> </td>
|
||||
<td><?php echo $record->CostCenterName ?> </td>
|
||||
<td><?php echo $record->CostCenterCode?></td>
|
||||
<td><?php echo $record->DepartmentName?></td>
|
||||
<td align="right"><?php echo $record->BudgetAmount ?> </td>
|
||||
|
||||
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
||||
@ -79,7 +86,8 @@ if(empty($Status))
|
||||
echo $CreatedDate;
|
||||
?></td>
|
||||
<td><?php echo $record->StatusName ?></td>
|
||||
<td><?php if($record->StatusCode == PO_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){ ?>
|
||||
<td><?php if($record->StatusCode ==PO_CREATED or $record->StatusCode == PO_ONHOLD or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){ ?>
|
||||
|
||||
|
||||
<select name="selectId" id="selectId" title="Select Your Option" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index ; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
|
||||
<option value="-1" >Select Option</option>
|
||||
@ -93,7 +101,7 @@ if(empty($Status))
|
||||
{
|
||||
?>
|
||||
|
||||
-
|
||||
|
||||
|
||||
<?php } ?>
|
||||
</td>
|
||||
@ -374,11 +382,13 @@ $(function () {
|
||||
});
|
||||
$('#Requisition').DataTable({
|
||||
"paging": true,
|
||||
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"ordering": false,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
"autoWidth": true,
|
||||
//"data-sort-name":Status
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -39,13 +39,18 @@ if(empty($Status))
|
||||
<th>Purchase Order Number</th>
|
||||
<th>Purchase Order Type</th>
|
||||
<th>Cost Center Name</th>
|
||||
<th>Cost Center Code</th>
|
||||
<th>Created By</th>
|
||||
<th>Department</th>
|
||||
<th>Created Date</th>
|
||||
<th>Available Budget Amount</th>
|
||||
<th>Total Order Value</th>
|
||||
<th>Created By</th>
|
||||
<th>Created Date</th>
|
||||
<th>Approved By</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
<th>Remarks</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="ApprovalList">
|
||||
@ -70,14 +75,19 @@ if(empty($Status))
|
||||
|
||||
<td><?php echo $record->ReqType ?> </td>
|
||||
<td><?php echo $record->CostCenterName ?> </td>
|
||||
<td align="right"><?php echo $record->BudgetAmount ?> </td>
|
||||
|
||||
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
||||
<td><?php echo $record->CostCenterCode?></td>
|
||||
<td><?php echo $record->FirstName ?></td>
|
||||
<td><?php echo $record->DepartmentName?></td>
|
||||
<td align="right"><?php $Cdt = new DateTime($record->CreatedDate);
|
||||
$CreatedDate = $Cdt->format('d-m-Y');
|
||||
echo $CreatedDate;
|
||||
?></td>
|
||||
<td align="right"><?php echo $record->BudgetAmount ?> </td>
|
||||
|
||||
<td align="right"><?php echo $record->TotalOrderValue ?></td>
|
||||
|
||||
|
||||
<td><?php echo $record->Approver?></td>
|
||||
<td><?php echo $record->StatusName ?></td>
|
||||
|
||||
<?php
|
||||
@ -107,10 +117,13 @@ if(empty($Status))
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
@ -363,9 +376,10 @@ $(function () {
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"ordering": false,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
//"data-sort-name":Status
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user