siddharth_application/application/views/editOldmonthly.php
venbatechnologies@gmail.com e94fca232a payslip UI design
2017-09-12 13:08:04 +05:30

361 lines
15 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$Month_Year='';
$EmpID='';
$Empname='';
$LOP_Days='';
$OT_Hrs_Worked='';
$Loan_Recovered='';
$Loan_Balance='';
$Incentives='';
$Other_Deductions='';
$Created_By='';
$Created_Time='';
$Last_Mod_By='';
$Last_Mod_Time='';
if(!empty($monthly))
{
foreach ($monthly as $mpi)
{
$Month_Year=$mpi->Month_Year;
$EmpID= $mpi->EmpID;
$Empname=$mpi->FirstName ." ". $mpi->LastName;
$LOP_Days=$mpi->LOP_Days;
$OT_Hrs_Worked=$mpi->OT_Hrs_Worked;
$Loan_Recovered=$mpi->Loan_Recovered;
$Incentives=$mpi->Incentives;
$Other_Deductions=$mpi->Other_Deductions;
$Created_By=$mpi->Created_By;
$Created_Time=$mpi->Created_Time;
$Last_Mod_By=$mpi->Last_Mod_By;
$Last_Mod_Time=$mpi->Last_Mod_Time;
}
}
?>
<script>
function validateLOP(){
//alert("h");
var x = $("#LOPDays").val();
//alert(x);
//var ck_lopdays = /^[0-9]{1,2}([.][0-9]{1,2})$/;
if( x > 32){
alert("LOP Days 0 to 31 Days Allowed.")
//$("#LOPDays").css({"border-style":"dotted","border-color":"#ff8080","border-width":"2px","background-color":"#ffe6e6"});
//$("#LOPDays").attr("title","0 to 31 Days Only");
}}
// else{
// $("#LOPDays").css({"border-style":"","border-color":"","border-width":"","background-color":""});
// }
// }
// function validateOTHRS(){
// var x = $("#OT_Hrs_Worked").val();
// var ck_lopdays = /^[0-9]{1,2}([.][0-9]{1,2})$/;//[0-9]{1,2}([.][0-9]{1,2}
// if(!(ck_lopdays.test(x) && x<=150)){
// $("#OT_Hrs_Worked").css({"border-style":"dotted","border-color":"#ff8080","border-width":"2px","background-color":"#ffe6e6"});
// $("#OT_Hrs_Worked").attr("title","Three Digits, not more then 150hrs");
// }
// else{
// $("#OT_Hrs_Worked").css({"border-style":"","border-color":"","border-width":"","background-color":""});
// }
// }
// function validateL(){
// var x = $("#Loan_Recovered").val();
// var ck_lopdays = /^[0-9]{1,6}([.][0-9]{1,2})?$/;
// if(!(ck_lopdays.test(x) && x<=100000)){
// $("#Loan_Recovered").css({"border-style":"dotted","border-color":"#ff8080","border-width":"2px","background-color":"#ffe6e6"});
// $("#Loan_Recovered").attr("title","Positive Nos Only,Maximun Six Digits");
// }
// else{
// $("#Loan_Recovered").css({"border-style":"","border-color":"","border-width":"","background-color":""});
// }
// }
// function validateLB(){
// var x = $("#Loan_Balance").val();
// var ck_lopdays = /^[0-9 ]{1,6}$/;
// if(!(ck_lopdays.test(x) && x<=100000)){
// $("#Loan_Balance").css({"border-style":"dotted","border-color":"#ff8080","border-width":"2px","background-color":"#ffe6e6"});
// $("#Loan_Balance").attr("title","Positive Nos Only,Maximun Six Digitss");
// }
// else{
// $("#Loan_Balance").css({"border-style":"","border-color":"","border-width":"","background-color":""});
// }
// }
// function validateLB(){
// var x = $("#Loan_Balance").val();
// var ck_lopdays = /^[0-9 ]{1,6}$/;
// if(!(ck_lopdays.test(x) && x<=100000)){
// $("#Loan_Balance").css({"border-style":"dotted","border-color":"#ff8080","border-width":"2px","background-color":"#ffe6e6"});
// $("#Loan_Balance").attr("title","Positive Nos Only,Maximun Six Digits");
// }
// else{
// $("#Loan_Balance").css({"border-style":"","border-color":"","border-width":"","background-color":""});
// }
// }
// function validateINC(){
// var x = $("#Incentives").val();
// var ck_lopdays = /^[0-9]{1,5}([.][0-9]{1,2})?$/;
// if(!(ck_lopdays.test(x))){
// $("#Incentives").css({"border-style":"dotted","border-color":"#ff8080","border-width":"2px","background-color":"#ffe6e6"});
// $("#Incentives").attr("title","Positive Nos Only,Maximun Six Digits");
// }
// else{
// $("#Incentives").css({"border-style":"","border-color":"","border-width":"","background-color":""});
// }
// }
// function validateODD(){
// var x = $("#Other_Deductions").val();
// var ck_lopdays = /^[0-9]{1,6}([.][0-9]{1,2})?$/;
// if(!(ck_lopdays.test(x))){
// $("#Other_Deductions").css({"border-style":"dotted","border-color":"#ff8080","border-width":"2px","background-color":"#ffe6e6"});
// $("#Other_Deductions").attr("title","Positive Nos Only,Maximun Six Digits");
// }
// else{
// $("#Other_Deductions").css({"border-style":"","border-color":"","border-width":"","background-color":""});
// }
// }
// function validateAll(){
// }
</script>
<style type="text/css">
.num {
text-align:right;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<!--title-->
<center>Edit Monthly Payment Details</center>
</h1>
</section>
<section class="content">
<div style="text-align:right;">
<a href="<?php echo base_url() ?>monthlyListings" class="btn btn-primary" value="Back">Back</a>
</div>
<br/>
<div class="row">
<!-- left column -->
<div class="col-md-12">
<!-- general form elements -->
<div class="box box-primary">
<!-- form start-->
<form role="form" id="edit" action="<?php echo base_url() ?>monthlypay/editmonthly" method="post">
<div class="box-body">
<div class="row">
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="month_year">Month Year</span>
<input type="text" class="form-control num" readonly id="MonthYear" name="Month_Year" value="<?php echo $Month_Year;?>">
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="EmpID">Employee ID</span>
<input type="text" class="form-control" readonly id="EmployeeID" name="EmpID" value="<?php echo $EmpID; ?>">
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="EmpID">Employee Name</span>
<input type="text" class="form-control" readonly id="EmployeeName" name="EmployeeName" value="<?php echo $Empname; ?>" readonly>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="LOP_Days">LOP Days</span>
<input type="text" class="form-control num requried" id="LOPDays" onfocusout="validateLOP();" title="lopdays" name="LOP_Days" pattern="[0-9]{1,2}([.][0-9]{1,2})?" value="<?php echo $LOP_Days; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="OT_Hrs_Worked">OverTime Hours Worked</span>
<input type="text" class="form-control required num" id="OT_Hrs_Worked" name="OT_Hrs_Worked" pattern="[0-9]{1,3}([.][0-9]{1,2})?" value="<?php echo $OT_Hrs_Worked; ?>">
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="Loan_Recovered">Loan Recovered</span>
<input type="text" class="form-control required num" id="Loan_Recovered" name="Loan_Recovered" value="<?php echo $Loan_Recovered; ?>"> <!-- pattern="[0-9]{1,7}([.][0-9]{1,2})?"-->
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="Incentives">Incentives</span>
<input type="text" class="form-control required num" id="Incentives" name="Incentives" pattern="[0-9]{1,7}([.][0-9]{1,2})?" value="<?php echo $Incentives; ?>">
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<div class="form-group">
<span for="Other_Deductions">Other Deductions</span>
<input type="text" class="form-control required num" id="Other_Deductions" name="Other_Deductions" pattern="[0-9]{1,6}([.][0-9]{1,2})?" value="<?php echo $Other_Deductions; ?>">
</div>
</div>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="form-group">
<input type="hidden" class="form-control required" id="CreatedBy" name="CreatedBy" value="<?php echo $Created_By; ?>">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="form-group">
<input type="hidden" class="form-control required" id="Created_Time" name="Created_Time" value="<?php echo $Created_Time; ?>">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="form-group">
<!--<input type="hidden" class="form-control required" id="LastModifiedBy" name="LastModifiedBy" value="<?php echo $name; ?>">-->
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="form-group">
<input type="hidden" class="form-control required" id="Last Modified Time" name="Last Modified Time" value="<?php echo $Last_Mod_Time; ?>">
</div>
</div>
</div>
</div>
<div id="content">
<div class="box-footer" style="text-align:right">
<input type="submit" class="btn btn-primary" value="Submit" onclick="validateAll();"/>
<input type="reset" class="btn btn-primary" value="Reset" />
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-4">
<?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-12">
<?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>
</section>
</div>
<script src="<?php echo base_url(); ?>assets/js/editUser.js" type="text/javascript"></script>