diff --git a/application/models/dahsboard_Model.php b/application/models/dahsboard_model.php similarity index 100% rename from application/models/dahsboard_Model.php rename to application/models/dahsboard_model.php diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index be1270e4..a7c6ff69 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -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) diff --git a/application/views/poapproval_view.php b/application/views/poapproval_view.php index 888ca888..1b3a027f 100755 --- a/application/views/poapproval_view.php +++ b/application/views/poapproval_view.php @@ -29,17 +29,21 @@ if(empty($Status))

Purchase Order Approval List

- +
+
+ + + @@ -59,17 +63,20 @@ if(empty($Status)) { $index = $index +1; //echo $index; + ?> + + - - + + @@ -79,7 +86,8 @@ if(empty($Status)) echo $CreatedDate; ?> - @@ -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 }); }); diff --git a/application/views/porelease_view.php b/application/views/porelease_view.php index 684926f7..964ce2d2 100755 --- a/application/views/porelease_view.php +++ b/application/views/porelease_view.php @@ -39,13 +39,18 @@ if(empty($Status)) + + + + - - + + + @@ -70,14 +75,19 @@ if(empty($Status)) - - - + + + + + + + + + + ?> + @@ -363,9 +376,10 @@ $(function () { "paging": true, "lengthChange": true, "searching": true, - "ordering": true, + "ordering": false, "info": true, "autoWidth": true + //"data-sort-name":Status }); });
Purchase Order Number Purchase Order Type Cost Center NameCost Center CodeDepartment Available Budget Amount Total Order Value Created By
PONO ?> ReqType ?> CostCenterName ?> CostCenterCode?>DepartmentName?> BudgetAmount ?> TotalOrderValue ?> StatusName ?>StatusCode == PO_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){ ?> + StatusCode ==PO_CREATED or $record->StatusCode == PO_ONHOLD or $record->StatusCode == REQITEM_Emergency_PO_CREATED ){ ?> + Purchase Order Number Purchase Order Type Cost Center NameCost Center CodeCreated ByDepartmentCreated Date Available Budget Amount Total Order ValueCreated ByCreated DateApproved By Status Action Remarks
ReqType ?> CostCenterName ?> BudgetAmount ?> TotalOrderValue ?>CostCenterCode?> FirstName ?>DepartmentName?> CreatedDate); $CreatedDate = $Cdt->format('d-m-Y'); echo $CreatedDate; ?>BudgetAmount ?> TotalOrderValue ?>Approver?> StatusName ?>