From 051c1c97c4a72d48603361eb7f83ca2ee2781416 Mon Sep 17 00:00:00 2001 From: venbatechnologies Date: Thu, 27 Jul 2017 19:26:27 +0530 Subject: [PATCH] Requistion Approval --- application/models/requistion_model.php | 4 +++- application/models/storerequistion_model.php | 14 +++++++------ .../views/approvalstorerequisitionslip.php | 4 ++-- application/views/requisitionform.php | 2 +- application/views/requisitionlistapproval.php | 4 ++-- application/views/viewinwardgateregister.php | 16 +++----------- application/views/viewmrirforbilling.php | 21 +++++-------------- 7 files changed, 24 insertions(+), 41 deletions(-) diff --git a/application/models/requistion_model.php b/application/models/requistion_model.php index eb896e9c..9abc05d4 100755 --- a/application/models/requistion_model.php +++ b/application/models/requistion_model.php @@ -283,10 +283,12 @@ class requistion_model extends CI_Model function getRequistDetails($ReqID,$NoArray='') { - $subQuery = 'select distinct ReqNo,ReqType,Status,Requestedby,DATE_FORMAT(mast.CreatedDate, "%d-%m-%Y") as CreatedDate,Schedule_Type,NumberOfService,Service_Period ,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,DATE_FORMAT(mast.ReqDate, "%d-%m-%Y") as ReqDate,CostCenterCode + $subQuery = 'select distinct ReqNo,ReqType,Status,Requestedby,DATE_FORMAT(mast.CreatedDate, "%d-%m-%Y") as CreatedDate,Schedule_Type,NumberOfService,Service_Period ,emp.FirstName,emp.EmpID,emp.Designation, Dept.DEPCode,Dept.DepartmentName,DATE_FORMAT(mast.ReqDate, "%d-%m-%Y") as ReqDate,mast.CostCenterCode,Cost.CostCenterName from T_Requestion_Master mast + join T_CostCenter_Master Cost on Cost.CostCenterCode = mast.CostCenterCode join T_Employee_Details emp on mast.Requestedby = emp.EmpID join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode + where ReqNo=?'; $query = $this->db->query($subQuery, array($ReqID)); diff --git a/application/models/storerequistion_model.php b/application/models/storerequistion_model.php index 46ae76d4..fcfc42fe 100755 --- a/application/models/storerequistion_model.php +++ b/application/models/storerequistion_model.php @@ -298,16 +298,17 @@ class storerequistion_model extends CI_Model * This function is used to get the List of Store Requist details to the approver * @return array $result : This is result of the query */ - function getApproverRequistList($UserID) + function getApproverRequistList($UserID) { // echo 'UserId: '.$UserID . 'From: '.$FromDate .'TO: '. $ToDate. 'Status: '. $Status; - $subQuery = 'select distinct Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Str.Status,Str.CreatedDate,Str.Comments,St.StatusName + $subQuery = ' select distinct Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Str.Status,Str.CreatedDate,Str.Comments,St.StatusName,Emp.FirstName from T_Store_Requestion_Master Str join T_Status St on St.StatusCode = Str.Status - join T_Employee_Details Emp on Emp.Departmentcode =Str.DepartmentCode - join T_DepartmentDetails Dept on Dept.DEPCode = Emp.Departmentcode + -- join T_Employee_Details Emp on Emp.Departmentcode =Str.DepartmentCode + join T_Employee_Details Emp on Emp.EmpID =Str.Requestedby + join T_DepartmentDetails Dept on Dept.DEPCode = Emp.Departmentcode where Str.Status not in(?,?,?) and Emp.Departmentcode in (select DEPCode from T_DepartmentDetails where HeadDept= (select HeadDept from T_DepartmentDetails where DEPCode = (select Departmentcode from T_Employee_Details where EmpID=(select EmpID from tbl_users where userId=?))))'; @@ -325,12 +326,13 @@ class storerequistion_model extends CI_Model * This function is used to get the Store Requsition List for the login user * @return array $result : This is result of the query */ - function getRequistDetails($StoreReqNo='') + function getRequistDetails($StoreReqNo='') { - $subQuery = 'select Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Dept.DEPCode,Dept.DepartmentName,Cm.CostCenterCode,Cm.CostCenterName from T_Store_Requestion_Master Str + $subQuery = ' select Str.StoreReqNo,Str.Requestedby,Str.ReqDate,Dept.DEPCode,Dept.DepartmentName,Cm.CostCenterCode,Cm.CostCenterName,Emp.FirstName from T_Store_Requestion_Master Str join T_DepartmentDetails Dept on Dept.DEPCode = Str.DepartmentCode join T_CostCenter_Master Cm on Cm.CostCenterCode =Str.CostCenterCode + join T_Employee_Details Emp on Emp.EmpID =Str.Requestedby where StoreReqNo =? '; diff --git a/application/views/approvalstorerequisitionslip.php b/application/views/approvalstorerequisitionslip.php index 85f83482..d71ed357 100755 --- a/application/views/approvalstorerequisitionslip.php +++ b/application/views/approvalstorerequisitionslip.php @@ -165,7 +165,7 @@ ?> StoreReqNo ?> - Requestedby?> + FirstName?> ReqDate); $ReqDate= $Cdt->format('d-m-Y'); echo $ReqDate; @@ -256,7 +256,7 @@ function Reset() if(json.Requist != '') { //alert(json.Requist[0]['Requestedby']) ; - $("#Requestedby").val(json.Requist[0]['Requestedby']); + $("#Requestedby").val(json.Requist[0]['FirstName']); $("#ReqDate").val(json.Requist[0]['ReqDate']); $("#Desigination").val(json.Requist[0]['DepartmentName']); $("#CostCenter").val(json.Requist[0]['CostCenterName']); diff --git a/application/views/requisitionform.php b/application/views/requisitionform.php index 7964887f..67d6f731 100755 --- a/application/views/requisitionform.php +++ b/application/views/requisitionform.php @@ -180,7 +180,7 @@ if(!empty($Emp)) - +
diff --git a/application/views/requisitionlistapproval.php b/application/views/requisitionlistapproval.php index ada5393c..891aedb9 100755 --- a/application/views/requisitionlistapproval.php +++ b/application/views/requisitionlistapproval.php @@ -310,10 +310,10 @@ $("#myModal").on("shown.bs.modal", function(e) { $('#content').loader('hide'); //alert(data); $("#ReqType").val(json.Requist[0]['ReqType']); - $("#ReqBy").val(json.Requist[0]['Requestedby']); + $("#ReqBy").val(json.Requist[0]['FirstName']); $("#ReqDate").val(json.Requist[0]['CreatedDate']); $("#Desigination").val(json.Requist[0]['Designation']); - $("#CostCenter").val(json.Requist[0]['CostCenterCode']); + $("#CostCenter").val(json.Requist[0]['CostCenterName']); $("#AvlBudgetAmount").val(json.AvilBudAmount); $("#tbleAppend").append(json.Items); diff --git a/application/views/viewinwardgateregister.php b/application/views/viewinwardgateregister.php index b214cd91..c206fbd5 100755 --- a/application/views/viewinwardgateregister.php +++ b/application/views/viewinwardgateregister.php @@ -120,21 +120,11 @@
- +
-
- -
-
- -
-
- -
+
@@ -154,7 +144,7 @@
diff --git a/application/views/viewmrirforbilling.php b/application/views/viewmrirforbilling.php index a2807cf7..d0cecc60 100755 --- a/application/views/viewmrirforbilling.php +++ b/application/views/viewmrirforbilling.php @@ -164,28 +164,17 @@
- +
'SupplierName','value' => set_value('SupplierName'),'id'=>'SupplierName', 'class' => 'form-control','readonly'=>'true'); - echo form_input($data); echo"
"; - $data = array('name' => 'Address','value' => set_value('Address'),'id'=>'Address','class' =>'form-control','rows' => '4','cols' => '50','style' => 'width:100%' ,'readonly'=>'true'); - echo form_textarea($data); echo"
"; + $data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'SupplierName', 'class' => 'form-control','readonly'=>'true'); + echo form_input($data); ?>
-
- -
-
- 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks', 'class' => 'form-control','readonly'=>'true'); - echo form_input($data); echo"
"; - ?> - -
+
@@ -235,7 +224,7 @@