Attendances and dashboard

This commit is contained in:
venbatechnologies 2017-12-29 14:13:23 +05:30
parent 47433f5833
commit 0c335d1f7d
2 changed files with 33 additions and 16 deletions

View File

@ -300,7 +300,24 @@ $currentday = date('d');
?>
<th <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_encabezado_general" <?php if($flag == 1 or $flag2 == 1) { echo "style='background: #f39c12 ;'"; } else if($todayflag == 1){ echo "style='background: #dd99ff ;'"; } ?> > <?php if($flag == 1 or $flag2 == 1){ echo "<font style='color:#ff0000;'>".$col."W<font>";} else { echo $col."W"; } ?></th>
<th <?php if($flag2 == 1){ ?>
title = " <?php echo $title; ?> "
<?php } else if($flag == 1 ){ ?>
title = "sunday" <?php }?>
class="celda_encabezado_general"
<?php if($flag == 1 or $flag2 == 1)
{
echo "style='background: #f39c12 ;'";
}
else if($todayflag == 1)
{ echo "style='background: #dd99ff ;'"; } ?> >
<?php if($flag == 1 or $flag2 == 1)
{ echo "<font style='color:#ff0000;'>".$col."W<font>";}
else { echo $col."W"; } ?></th>
<th <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_encabezado_general" <?php if($flag == 1 or $flag2 == 1) { echo "style='background: #f39c12 ;'"; } else if($todayflag == 1){ echo "style='background: #dd99ff ;'"; }?> > <?php if($flag == 1 or $flag2 == 1){ echo "<font style='color:#ff0000;'>".$col."OT<font>";} else { echo $col."OT"; }?></th>
<?php
//echo $flag2;
@ -363,8 +380,8 @@ $currentday = date('d');
$OT = 'OT'.$col;
?>
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php if($flag == 1 or $flag2 == 1) {echo $row.'row'.$col.'WS';} else { echo $row.'row'.$col.'W';}?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$WH)){echo $a->$WH;} else { echo '0';}?></td>
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php if($flag == 1 or $flag2 == 1) {echo $row.'row'.$col.'OTS';} else { echo $row.'row'.$col.'OT';}?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$OT)){echo $a->$OT;} else { echo '0';}?></td>
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php if($flag2 == 1) {echo $row.'row'.$col.'WS';} else { echo $row.'row'.$col.'W';}?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$WH)){echo $a->$WH;} else { echo '0';}?></td>
<td <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id = "<?php if($flag2 == 1) {echo $row.'row'.$col.'OTS';} else { echo $row.'row'.$col.'OT';}?>" <?php if($flag == 1 or $flag2 == 1){ echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true" tabindex="<?php echo $col;?>"> <?php if(!empty($a->$OT)){echo $a->$OT;} else { echo '0';}?></td>
<?php $flag =0;
$flag2 =0;
@ -490,7 +507,7 @@ $currentday = date('d');
var id = e.target.id;
var val = document.getElementById(id).textContent
console.log(val);
//console.log(val);
if(val == 0)
{
window.setTimeout(function(){ document.getElementById(id).textContent = ''; }, 0);
@ -505,7 +522,7 @@ $currentday = date('d');
{
window.setTimeout(function(){ document.getElementById(id).textContent = '0'; }, 0);
}
console.log(val);
//console.log(val);
});
@ -546,7 +563,7 @@ function myFunction(p,i,v,k)
var nextid = $(j).closest('td').next('td');
nxtid = nextid[0].attributes[2].value;
//console.log(nextid[0].attributes[2].value);
console.log(nextid);
//console.log(nextid);
nxtvalue = v-8;
curvalue = 8;
@ -566,14 +583,14 @@ function myFunction(p,i,v,k)
else if(id == 'S' && v > 16)
{
var j='#'+i;
console.log(i);
console.log('********************************************');
//console.log(i);
//console.log('********************************************');
var nextid = $(j).closest('td').next('td');
console.log(nextid);
console.log('********************************************');
//console.log(nextid);
//console.log('********************************************');
nxtid = nextid[0].attributes[3].value;
console.log('********************************************');
console.log(nxtid);
//console.log('********************************************');
//console.log(nxtid);
//console.log(nextid[0].attributes[2].value);
nxtvalue = v-16;
@ -665,7 +682,7 @@ function myFunction(p,i,v,k)
document.getElementById(totalhrsid).innerHTML = parseFloat(totalworkingHrs).toFixed(2);// == ''?0:parseFloat(totalworkingHrs));
document.getElementById(totalothrsid).innerHTML = parseFloat(totalOTHrs).toFixed(2);// == ''?0:parseFloat(totalOTHrs));
document.getElementById(paidleaveid).innerHTML = parseFloat(paidleave).toFixed(2);
document.getElementById(daysworkedid).innerHTML = parseFloat((totalworkingHrs/8)+sundays+publicholidays).toFixed(2);
document.getElementById(daysworkedid).innerHTML = parseFloat((totalworkingHrs/8)+publicholidays).toFixed(2);
document.getElementById(absentid).innerHTML = parseFloat(absent).toFixed(2);
}
@ -677,7 +694,7 @@ function FindInvalide()
//console.log(index+'-'+value);
var td = $(value).find('td');
$.each(td,function(iter,val){
console.log(iter+'-'+val.id+'-'+val.textContent);
//console.log(iter+'-'+val.id+'-'+val.textContent);
});
});
@ -688,4 +705,4 @@ function FindInvalide()
</script>
</script>

View File

@ -154,7 +154,7 @@ if(!empty($EmpCount))
<!-- small box -->
<div class="small-box bg-yellow">
<a target="_blank" href="<?php echo base_url(); ?>loanreports" class="small-box-footer"> <p> <strong>SALARY COST</strong> </p> </a>
<a class="small-box-footer"> <p> <strong>SALARY COST</strong> </p> </a>
<div class="inner">
<h3 id=""><i class="fa fa-rupee"></i><?php echo $employeeSalary;?></h3>