Requistion Approval
This commit is contained in:
parent
9d6c5fdf83
commit
051c1c97c4
@ -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));
|
||||
|
||||
@ -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 =? ';
|
||||
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@
|
||||
?>
|
||||
<tr id="<?php echo $index ?>" >
|
||||
<td><a data-toggle="modal" data-target="#myModal" data-id="<%=index%>" data-userid="<?php echo $record->StoreReqNo ?>" ><u><?php echo $record->StoreReqNo ?></u></a></td>
|
||||
<td><?php echo $record->Requestedby?></td>
|
||||
<td><?php echo $record->FirstName?></td>
|
||||
<td ><?php $Cdt = new DateTime($record->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']);
|
||||
|
||||
@ -180,7 +180,7 @@ if(!empty($Emp))
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<table class="table table-bordered" style="border:1px solid #333">
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -120,21 +120,11 @@
|
||||
<br/>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Supplier and Address :</label>
|
||||
<label>Supplier Name:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="text" id="Supplier" readonly>
|
||||
<textarea rows="3" cols="21" id="Add1" readonly>
|
||||
</textarea><br/>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Comments Of Special Instructions :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<textarea rows="4" cols="21" id="ser" readonly>
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Table to show the line item of po -->
|
||||
<div id="content" > </div>
|
||||
@ -154,7 +144,7 @@
|
||||
</table>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -164,28 +164,17 @@
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<label>Supplier and Address :</label>
|
||||
<label>Supplier Name :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'SupplierName', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data); echo"<br>";
|
||||
$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"<br>";
|
||||
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'SupplierName', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Comments Of Special Instructions :</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?php
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks', 'class' => 'form-control','readonly'=>'true');
|
||||
echo form_input($data); echo"<br>";
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@ -235,7 +224,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
<a class="btn btn-primary" data-dismiss="modal" value="Cancel">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user