Requistion Flow
This commit is contained in:
parent
1cfb823cbd
commit
3f7df8d6ab
@ -1,4 +1,20 @@
|
||||
<?php
|
||||
$EmpID = "";
|
||||
$Designation = "";
|
||||
$DepartmentName = "";
|
||||
$FirstName = "";
|
||||
|
||||
if(!empty($Emp))
|
||||
{
|
||||
foreach ($Emp as $Emp)
|
||||
{
|
||||
$EmpID = $Emp->EmpID ;
|
||||
$FirstName = $Emp->FirstName ;
|
||||
$Designation = $Emp->Designation;
|
||||
$DepartmentName =$Emp->DepartmentName;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {border: 1px solid #333;}
|
||||
</style>
|
||||
@ -22,6 +38,7 @@
|
||||
<div>
|
||||
<?php
|
||||
$options = array("-1"=>'Select Request Type');
|
||||
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($RequestType))
|
||||
@ -43,32 +60,19 @@
|
||||
<div class="col-md-3">
|
||||
<label>Requested By</label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("-1"=>'Select Requested By');
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($EmpList))
|
||||
{
|
||||
foreach ($EmpList as $EID):
|
||||
|
||||
|
||||
$options[$EID->EmpID] = $EID->EmpID.' '.' - '.' '.$EID->FirstName.' . '.' '.$EID->LastName;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('EmpID', $options,set_value('EmpID'),'id="EmpID"' ,'class = "form-control"','disabled="disabled"');
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
$data = array('name' => 'EmpID','value' => set_value('EmpID',$FirstName),'id'=>'EmpID', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
<input type="hidden" name="EmpID" id="EmpID" value=<?php echo $EmpID?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label>Department Name</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'DeptName','value' => set_value('DeptName'),'id'=>'DeptName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
$data = array('name' => 'DeptName','value' => set_value('DeptName',$DepartmentName),'id'=>'DeptName', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -77,7 +81,7 @@
|
||||
<label>Designation</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Designation','value' => set_value('Designation'),'id'=>'Designation', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
$data = array('name' => 'Designation','value' => set_value('Designation',$Designation),'id'=>'Designation', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -89,19 +93,19 @@
|
||||
<label>Cost Center Name</label>
|
||||
<div>
|
||||
<?php
|
||||
$options = array("-1"=>'Select Cost Center Name');
|
||||
$Costs = array("-1"=>'Select Cost Center Name');
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($Cost))
|
||||
if(!empty($CostCenter))
|
||||
{
|
||||
foreach ($Cost as $SID):
|
||||
foreach ($CostCenter as $SID):
|
||||
// echo $SID->ConfigValue;
|
||||
$Budget[$SID->CostCenterCode] = $SID->CostCenterCode;
|
||||
$Costs[$SID->CostCenterCode] = $SID->CostCenterCode .'-'. $SID->CostCenterName ;
|
||||
|
||||
endforeach;
|
||||
|
||||
}
|
||||
echo form_dropdown('CostCenter', $options,set_value('CostCenter'),'id="CostCenter"' ,'class = "form-control"');
|
||||
echo form_dropdown('CostCenter', $Costs,set_value('CostCenter'),'id="CostCenter"' ,'class = "form-control"');
|
||||
|
||||
?>
|
||||
|
||||
@ -520,7 +524,7 @@ function Save()
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
|
||||
//window.location = baseurl + 'CostCenter/CostListing';
|
||||
window.location = baseurl + 'Requisition';
|
||||
|
||||
}
|
||||
else
|
||||
@ -707,7 +711,7 @@ $('.EditClick').click(function(){
|
||||
$('#txtRowCount').val('');
|
||||
$('#txtDeletedRow').val('');
|
||||
|
||||
//window.location = baseurl + 'CostCenter/CostListing';
|
||||
window.location = baseurl + 'Requisition';
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
@ -1,3 +1,15 @@
|
||||
<?php
|
||||
|
||||
$DraftCount = '';
|
||||
if(!empty($Status))
|
||||
{
|
||||
foreach ($Status as $St)
|
||||
{
|
||||
$DraftCount = $St->cnt;
|
||||
}
|
||||
//echo $DraftCount;
|
||||
}?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -21,7 +33,10 @@ speed:500
|
||||
<div class="row">
|
||||
<div class="col-xs-12 text-right">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-primary" href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a>
|
||||
<?php if($DraftCount == 0)
|
||||
{ ?>
|
||||
<a class="btn btn-primary" onclick="Test()" href="<?php echo base_url(); ?>RequisitionForm">Raise New Requisition</a><?php }?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -40,47 +55,29 @@ speed:500
|
||||
|
||||
<tr bgcolor="steelblue">
|
||||
<th>Requisition No</th>
|
||||
<th> Requisition Date</th>
|
||||
<th>Requisition Date</th>
|
||||
<th>Status</th>
|
||||
<th>Department</th>
|
||||
<th>CreatedDate</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php
|
||||
if(!empty($ReqList))
|
||||
{
|
||||
foreach($ReqList as $record)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td>REQ000001</td>
|
||||
<td>5/5/2017</td>
|
||||
<td>active</td>
|
||||
<td>admin</td>
|
||||
<td><?php echo $record->ReqNo ?></td>
|
||||
<td><?php echo $record->ReqType ?></td>
|
||||
<td><?php echo $record->Status ?></td>
|
||||
<td><?php echo $record->CreatedDate ?></td>
|
||||
<td><i class="fa fa-pencil" aria-hidden="true"></i> <i class="fa fa-trash" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REQ000002</td>
|
||||
<td>6/5/2017</td>
|
||||
<td>active</td>
|
||||
<td>admin</td>
|
||||
<td><i class="fa fa-pencil" aria-hidden="true"></i> <i class="fa fa-trash" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REQ000003</td>
|
||||
<td>7/5/2017</td>
|
||||
<td>active</td>
|
||||
<td>admin</td>
|
||||
<td><i class="fa fa-pencil" aria-hidden="true"></i> <i class="fa fa-trash" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REQ000004</td>
|
||||
<td>8/5/2017</td>
|
||||
<td>active</td>
|
||||
<td>admin</td>
|
||||
<td><i class="fa fa-pencil" aria-hidden="true"></i> <i class="fa fa-trash" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REQ000005</td>
|
||||
<td>9/5/2017</td>
|
||||
<td>active</td>
|
||||
<td>admin</td>
|
||||
<td><i class="fa fa-pencil" aria-hidden="true"></i> <i class="fa fa-trash" aria-hidden="true"></i></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
@ -89,4 +86,5 @@ speed:500
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user