142 lines
4.6 KiB
PHP
142 lines
4.6 KiB
PHP
<script>
|
||
|
||
$(function() {
|
||
|
||
|
||
//Initialize Select2 Elements
|
||
$(".select2").select2();
|
||
|
||
$('#All').click(function(){
|
||
//alert('clicked');
|
||
if ($('#All').prop('checked'))
|
||
{
|
||
$('#Employee').attr('disabled', 'true');
|
||
|
||
}
|
||
else
|
||
{
|
||
$('#Employee').removeAttr('disabled');
|
||
|
||
}
|
||
|
||
});
|
||
|
||
|
||
});
|
||
</script>
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<section class="content-header">
|
||
<h1>
|
||
<center>Siddharth Industries - PaySlip Generator</center>
|
||
|
||
</h1>
|
||
</section>
|
||
<section class="content">
|
||
<div class="row" style="border:2px dotted; padding:5%">
|
||
<form id="PayslipGenerator" action="<?php echo base_url() ?>PrintPdf" method="post" role="form" >
|
||
<div class="row" >
|
||
<div class="col-md-4">
|
||
<span for="selectmonth">Select Month</span>
|
||
<select id="PayOn" name="PayOn" class="form-control select2" style="width: 100%;">
|
||
<option value="-1">Select Payon Month</option>
|
||
<?php
|
||
if(!empty($Payon))
|
||
{
|
||
foreach ($Payon as $rl)
|
||
{
|
||
$Pay =$rl->PayOn;
|
||
|
||
if ($_POST['PayOn'] == $Pay)
|
||
{
|
||
|
||
echo "<option value=\"".$Pay."\" selected=\"selected\">".$Pay."</option>";
|
||
}
|
||
else
|
||
{
|
||
echo "<option value=\"".$Pay."\">".$Pay."</option>";
|
||
}
|
||
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
<div class="col-md-4 col-md-offset-2">
|
||
|
||
<div class="row">
|
||
<span>Employee</span>
|
||
<select id="Employee" name="Employee" class="form-control select2" type="text" class="form-control">
|
||
<option value="-1">Select Employee</option>
|
||
<?php
|
||
if(!empty($Emplist))
|
||
{
|
||
foreach ($Emplist as $rl)
|
||
{
|
||
$Emp = $rl->EmpId;
|
||
|
||
if ($_POST['Employee'] == $Emp)
|
||
{
|
||
|
||
echo "<option value=\"".$Emp."\" selected=\"selected\">".$Emp.' - '. $rl->Fname ."</option>";
|
||
}
|
||
else
|
||
{
|
||
echo "<option value=\"".$Emp."\">".$Emp.' - '. $rl->Fname ."</option>";
|
||
}
|
||
}
|
||
}
|
||
?>
|
||
</select>
|
||
</div>
|
||
<div class="row">
|
||
<input type="checkbox" name="All" id="All" > Select All<br>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="col-md-4 col-md-offset-6" align = "right">
|
||
<input type="submit" class="btn btn-info" value="Generate" />
|
||
</div>
|
||
|
||
</div>
|
||
<div class="row" >
|
||
|
||
|
||
|
||
<?php
|
||
$this->load->helper('form');
|
||
$error = $this->session->flashdata('error');
|
||
if($error)
|
||
{
|
||
?>
|
||
<div class="alert alert-danger alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo $this->session->flashdata('error'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
<?php
|
||
$success = $this->session->flashdata('success');
|
||
if($success)
|
||
{
|
||
?>
|
||
<div class="alert alert-success alert-dismissable">
|
||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||
<?php echo $this->session->flashdata('success'); ?>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<div class="row">
|
||
<div class="col-md-4">
|
||
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</section>
|
||
</div>
|
||
|