PAYROLL CASHBOOK ISSUE FIXED
This commit is contained in:
parent
0b06e89168
commit
7598c74daa
@ -18,6 +18,7 @@ $datefordropdown = date_create($datefordropdown);
|
|||||||
$datefordropdown = date_format($datefordropdown,'M-Y');
|
$datefordropdown = date_format($datefordropdown,'M-Y');
|
||||||
//echo $datefordropdown;
|
//echo $datefordropdown;
|
||||||
$attendance = array_merge($attendance,$emppay);
|
$attendance = array_merge($attendance,$emppay);
|
||||||
|
date_default_timezone_set('Asia/Kolkata');
|
||||||
$currentday = date('d');
|
$currentday = date('d');
|
||||||
// print_r($attendance);
|
// print_r($attendance);
|
||||||
// echo "<br>------------------------------<br>";
|
// echo "<br>------------------------------<br>";
|
||||||
@ -216,29 +217,7 @@ $currentday = date('d');
|
|||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// $year =date('Y');
|
|
||||||
// $month =date('m');
|
|
||||||
// $day = date('d');
|
|
||||||
|
|
||||||
// $monthdays =cal_days_in_month(CAL_GREGORIAN,$month,$year);
|
|
||||||
|
|
||||||
|
|
||||||
// $begin = new DateTime($year.'-'.$month.'-01');
|
|
||||||
// $end = new DateTime($year.'-'.$month.'-'.$monthdays);
|
|
||||||
|
|
||||||
// $ind =array();
|
|
||||||
|
|
||||||
// while ($begin <= $end) // Loop will work begin to the end date
|
|
||||||
// {
|
|
||||||
// if($begin->format("D") == "Sun") //Check that the day is Sunday here
|
|
||||||
// {
|
|
||||||
|
|
||||||
// array_push($ind,$begin->format("d"));
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $begin->modify('+1 day');
|
|
||||||
// }
|
|
||||||
// $noofsundays = count($ind);
|
|
||||||
|
|
||||||
$testarray=array();
|
$testarray=array();
|
||||||
$finalarray = array();
|
$finalarray = array();
|
||||||
@ -264,42 +243,7 @@ $currentday = date('d');
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//print_r($testarray);echo count($testarray);
|
|
||||||
//echo "<br>...........................<br>";
|
|
||||||
//print_r($finalarray);echo count($finalarray);
|
|
||||||
// $index = 0;
|
|
||||||
// foreach($finalarray as $gg )
|
|
||||||
// {
|
|
||||||
// echo "<br>...........................<br>";
|
|
||||||
// $index = $index +1;
|
|
||||||
// echo "S.NO" . $index . "<br>";
|
|
||||||
// echo "EmpID" . $gg->EmpID ."<br>";
|
|
||||||
// //echo $key ."-".$value;
|
|
||||||
|
|
||||||
// for ($col =1; $col <= $monthdays;$col++){
|
|
||||||
// $flag =0;
|
|
||||||
// foreach($ind as $in)
|
|
||||||
// {
|
|
||||||
// if($in == $col)
|
|
||||||
// {
|
|
||||||
// $flag = 1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// $WH='WH'.$col;
|
|
||||||
// $OT = 'OT'.$col;
|
|
||||||
|
|
||||||
|
|
||||||
// if(!empty($gg->$WH)){echo "WORK" . $gg->$WH."--";}else{echo "WORK" . "0--";}
|
|
||||||
|
|
||||||
// if(!empty($gg->$OT)){echo "OT" . $gg->$OT. "--";}else{echo "OT" . "0--";}
|
|
||||||
// }
|
|
||||||
// // /// echo "$WH";
|
|
||||||
// //print_r($gg);
|
|
||||||
|
|
||||||
// //break;
|
|
||||||
|
|
||||||
// }
|
|
||||||
//die();
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
@ -356,8 +300,8 @@ $currentday = date('d');
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<th <?php if($flag == 1){ ?> title = "Sunday" <?php }else if($flag2 == 1){ ?> title = <?php echo $title; }?> 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($flag == 1){ ?> title = "Sunday" <?php }else if($flag2 == 1){ ?> title = <?php echo $title; }?> 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($flag == 1){ ?> title = "Sunday" <?php } else if($flag2 == 1){ ?> title = <?php echo $title; }?> 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>
|
<th <?php if($flag == 1){ ?> title = "Sunday" <?php } else if($flag2 == 1){ ?> title = <?php echo $title; }?> 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
|
<?php
|
||||||
$flag =0;
|
$flag =0;
|
||||||
$flag2 =0;
|
$flag2 =0;
|
||||||
@ -379,7 +323,7 @@ $currentday = date('d');
|
|||||||
|
|
||||||
<tr id="<?php echo $row;?>">
|
<tr id="<?php echo $row;?>">
|
||||||
<td width="45" height="45" class="celda_normal" ><?php echo $index;?></td>
|
<td width="45" height="45" class="celda_normal" ><?php echo $index;?></td>
|
||||||
<td width="79" height="45"class="celda_normal"><?php echo $a->EmpID;?></td>
|
<td width="79" height="45" class="celda_normal"><?php echo $a->EmpID;?></td>
|
||||||
<td width="80" height="45" class="celda_normal"><?php echo $a->FirstName.'-'.$a->LastName;?></td>
|
<td width="80" height="45" class="celda_normal"><?php echo $a->FirstName.'-'.$a->LastName;?></td>
|
||||||
|
|
||||||
<?php for ($col =1; $col <= $monthdays;$col++){
|
<?php for ($col =1; $col <= $monthdays;$col++){
|
||||||
@ -418,8 +362,8 @@ $currentday = date('d');
|
|||||||
$OT = 'OT'.$col;
|
$OT = 'OT'.$col;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<td <?php if($flag == 1){ ?> title = "Sunday" <?php }else if($flag2 == 1 ){ ?> title = <?php echo $title; } ?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="<?php if($flag == 1 or $flag2 == 1) {echo $row.$col.'WS';}else{echo $row.$col.'W';}?>" <?php if($flag == 1 or $flag2 == 1){echo "style='background: #f9cd86 ;'";} else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true"><?php if(!empty($a->$WH)){echo $a->$WH;}else{echo "0";}?></td>
|
<td <?php if($flag == 1){ ?> title = "Sunday" <?php }else if($flag2 == 1 ){ ?> title = <?php echo $title; } ?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="<?php if($flag == 1 or $flag2 == 1) {echo $row.$col.'WS';}else{echo $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;}?></td>
|
||||||
<td <?php if($flag == 1){ ?> title = "Sunday" <?php }else if($flag2 == 1 ){ ?> title = <?php echo $title; } ?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="<?php if($flag == 1 or $flag2 == 1) {echo $row.$col.'OTS';}else{echo $row.$col.'OT';}?>" <?php if($flag == 1 or $flag2 == 1){echo "style='background: #f9cd86 ;'";}else if($todayflag == 1){ echo "style='background: #f7e6ff ;'"; }?> contenteditable = "true"><?php if(!empty($a->$OT)){echo $a->$OT;}else{echo "0";}?></td>
|
<td <?php if($flag == 1){ ?> title = "Sunday" <?php }else if($flag2 == 1 ){ ?> title = <?php echo $title; } ?> class="celda_normal" onkeyup="myFunction(this.parentNode.id,this.id,this.textContent);" id ="<?php if($flag == 1 or $flag2 == 1) {echo $row.$col.'OTS';}else{echo $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;}?></td>
|
||||||
|
|
||||||
<?php $flag =0;
|
<?php $flag =0;
|
||||||
$flag2 =0;
|
$flag2 =0;
|
||||||
@ -480,17 +424,8 @@ $currentday = date('d');
|
|||||||
|
|
||||||
//alert(currentmonth);
|
//alert(currentmonth);
|
||||||
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
var currentdate = '01-'+currentmonth+'-'+currentyear;
|
||||||
//alert(currentdate);
|
|
||||||
// var today = new Date();
|
var totaldata = 0;
|
||||||
// alert(today);
|
|
||||||
// var day =today.getDate();
|
|
||||||
// alert(day);
|
|
||||||
// var month =today.getMonth();
|
|
||||||
// month++;
|
|
||||||
// alert(month);
|
|
||||||
// var year = today.getFullYear();
|
|
||||||
// alert(year);
|
|
||||||
var totaldata = 0;
|
|
||||||
$('#content').loader('hide');
|
$('#content').loader('hide');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
|
data:{param1:alldata,param2:currentdate,param3:Totalnoofdays},
|
||||||
@ -527,8 +462,9 @@ $currentday = date('d');
|
|||||||
$("#attendance").CongelarFilaColumna({lboHoverTr:true});
|
$("#attendance").CongelarFilaColumna({lboHoverTr:true});
|
||||||
$('html').bind('keypress', function(e)
|
$('html').bind('keypress', function(e)
|
||||||
{
|
{
|
||||||
//alert(e.which || e.keyCode);
|
|
||||||
if(((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39))
|
|
||||||
|
if(((e.which || e.keyCode) == 8) || ((e.which || e.keyCode) == 9) || ((e.which || e.keyCode) == 46) || ((e.which || e.keyCode) == 37) || ((e.which || e.keyCode) == 39))
|
||||||
{
|
{
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -547,17 +483,19 @@ $currentday = date('d');
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function myFunction(p,i,v)
|
function myFunction(p,i,v,k)
|
||||||
{
|
{
|
||||||
//alert(p+"-"+i+"-"+v);
|
//alert(p+"-"+i+"-"+v);
|
||||||
|
//alert(v);
|
||||||
|
// alert(k.keyCode);
|
||||||
|
var v = v;
|
||||||
var i =i;
|
var i =i;
|
||||||
var id = i.substr(-1);
|
var id = i.substr(-1);
|
||||||
//alert(id);
|
//alert(id);
|
||||||
@ -566,13 +504,6 @@ function myFunction(p,i,v)
|
|||||||
var nxtvalue = 0;
|
var nxtvalue = 0;
|
||||||
var curvalue = 0;
|
var curvalue = 0;
|
||||||
var curid =0;
|
var curid =0;
|
||||||
// if(v == 0)
|
|
||||||
// {
|
|
||||||
// // document.getElementById(i).innerHTML = parseFloat(0);
|
|
||||||
// document.getElementById(i).style.backgroundColor="red";
|
|
||||||
// }else{
|
|
||||||
// document.getElementById(i).style.backgroundColor="#fff";
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if(v > 24)
|
if(v > 24)
|
||||||
@ -580,7 +511,7 @@ function myFunction(p,i,v)
|
|||||||
alert('Working Hrs Do Not Exceed 24 HRs');
|
alert('Working Hrs Do Not Exceed 24 HRs');
|
||||||
|
|
||||||
$(i).focus();
|
$(i).focus();
|
||||||
document.getElementById(i).innerHTML = parseFloat(0);
|
document.getElementById(i).textContent = '';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(id == 'W' && v > 8){ // checking working hrs vallue is more than 8, if it is set as OT Hrs more than 8
|
if(id == 'W' && v > 8){ // checking working hrs vallue is more than 8, if it is set as OT Hrs more than 8
|
||||||
@ -603,7 +534,7 @@ function myFunction(p,i,v)
|
|||||||
|
|
||||||
alert("OT Should not exceed 16 Hrs");
|
alert("OT Should not exceed 16 Hrs");
|
||||||
$(i).focus();
|
$(i).focus();
|
||||||
document.getElementById(i).innerHTML = parseFloat(0);
|
document.getElementById(i).innerHTML = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -688,6 +619,23 @@ function myFunction(p,i,v)
|
|||||||
document.getElementById(absentid).innerHTML = parseFloat(absent).toFixed(2);
|
document.getElementById(absentid).innerHTML = parseFloat(absent).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function FindInvalide()
|
||||||
|
{
|
||||||
|
var Row = $('#attendance').find('tr');
|
||||||
|
//console.log(Row);
|
||||||
|
$.each(Row,function(index,value){
|
||||||
|
//console.log(index+'-'+value);
|
||||||
|
var td = $(value).find('td');
|
||||||
|
$.each(td,function(iter,val){
|
||||||
|
console.log(iter+'-'+val.id+'-'+val.textContent);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
|
||||||
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
<script src="<?php echo base_url()?>assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
@ -22,7 +25,7 @@
|
|||||||
</div><p style="color:red"></p>
|
</div><p style="color:red"></p>
|
||||||
|
|
||||||
<div class="col-md-3 pad"><span>Account Code :</span> <span style="color:#ff6347;">*</span>
|
<div class="col-md-3 pad"><span>Account Code :</span> <span style="color:#ff6347;">*</span>
|
||||||
<input type="text" name="accountcode" id="accountcode" class="form-control" requried placeholder="Account Code" title="Account Code is requried">
|
<input type="text" name="accountcode" id="accountcode" onchange="validateACCODE();" class="form-control" requried placeholder="Account Code" title="Account Code is requried">
|
||||||
</div><p style="color:red"></p>
|
</div><p style="color:red"></p>
|
||||||
|
|
||||||
<div class="col-md-3 pad"><span>Account Name :</span> <sapn style="color:#ff6347;">*</span>
|
<div class="col-md-3 pad"><span>Account Name :</span> <sapn style="color:#ff6347;">*</span>
|
||||||
@ -37,7 +40,7 @@
|
|||||||
|
|
||||||
<div class="row" style="align:right;">
|
<div class="row" style="align:right;">
|
||||||
<div class="col-md-offset-10 col-md-1 ">
|
<div class="col-md-offset-10 col-md-1 ">
|
||||||
<input type="button" value="Add" id="Add" class="btn btn-primary"> </div>
|
<input type="button" value="Add" id="Add" class="btn btn-primary"> </div>
|
||||||
|
|
||||||
<div class=" col-md-1">
|
<div class=" col-md-1">
|
||||||
<input type="button" value="Save" onclick="saveAll();" class="btn btn-primary"> </div>
|
<input type="button" value="Save" onclick="saveAll();" class="btn btn-primary"> </div>
|
||||||
@ -115,20 +118,24 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
var index = '1';
|
var index = '1';
|
||||||
|
var localcodes =[];
|
||||||
$('#Add').click(function(){
|
$('#Add').click(function(){
|
||||||
|
|
||||||
var res = validateACCODE();
|
var res = validateACCODE();
|
||||||
|
// alert('res'+res);
|
||||||
if(res != 1)
|
if(res != 1)
|
||||||
{
|
{
|
||||||
var temp = index;
|
//alert('inside if');
|
||||||
|
var temp = index;
|
||||||
var Acctype = $("#accounttype:checked").val() ;
|
var Acctype = $("#accounttype:checked").val() ;
|
||||||
var Acccode = $('#accountcode').val();
|
var Acccode = $('#accountcode').val();
|
||||||
var Accname = $('#accountname').val();
|
var Accname = $('#accountname').val();
|
||||||
var Accdesc = $('#description').val();
|
var Accdesc = $('#description').val();
|
||||||
var Status = $('#accountstate').val();
|
var Status = $('#accountstate').val();
|
||||||
|
var localflag = 0;
|
||||||
|
|
||||||
|
|
||||||
//if(Acctype != '' || Accname != '' || Acccode != '' )
|
//if(Acctype != '' || Accname != '' || Acccode != '' )https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwjnwuzq4MXXAhVIQI8KHcWmBUoQFggqMAA&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F9127847%2Fdocument-getelementbyid-focus-returning-undefined&usg=AOvVaw20BMY_C7k6ShhmOz0Vmzs8
|
||||||
if(Accname != '' || Acccode != '')
|
if(Accname != '' || Acccode != '')
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -149,24 +156,38 @@ $('#Add').click(function(){
|
|||||||
|
|
||||||
}//valid if closed
|
}//valid if closed
|
||||||
else{
|
else{
|
||||||
|
|
||||||
var template = jQuery("#addList").html();
|
$.each(localcodes,function(i,j){
|
||||||
index = parseInt(index)+1;
|
if(j == Acccode)
|
||||||
//$('table tr.odd').remove();//class="dataTables_empty"
|
{
|
||||||
//$('.odd').remove();//
|
alert('Account Code Already Taken');
|
||||||
|
document.getElementById("accountcode").focus();
|
||||||
$('#databaseAppend').append(_.template(template,{index:temp,AccountCodeType:Acctype,AccountCode:Acccode,AccountName:Accname,Description:Accdesc,Status:Status}));
|
localflag = 1;
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if( localflag == 0){
|
||||||
|
var template = jQuery("#addList").html();
|
||||||
|
index = parseInt(index)+1;
|
||||||
|
//$('table tr.odd').remove();//class="dataTables_empty"
|
||||||
|
//$('.odd').remove();//
|
||||||
|
localcodes.push(Acccode);
|
||||||
|
$('#databaseAppend').append(_.template(template,{index:temp,AccountCodeType:Acctype,AccountCode:Acccode,AccountName:Accname,Description:Accdesc,Status:Status}));
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
}//nearest else closed
|
}//nearest else closed
|
||||||
}// nearest if closed
|
}// nearest if closed
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//$('input[name="accounttype"]').attr('checked', false);
|
//$('input[name="accounttype"]').attr('checked', false);
|
||||||
$('#accountcode').val('');
|
|
||||||
$('#accountname').val('');
|
}
|
||||||
$('#description').val('');
|
|
||||||
|
|
||||||
}
|
|
||||||
});//add click function closed
|
});//add click function closed
|
||||||
|
|
||||||
|
|
||||||
@ -189,7 +210,7 @@ $('#Add').click(function(){
|
|||||||
|
|
||||||
function saveAll()
|
function saveAll()
|
||||||
{
|
{
|
||||||
// alert("dssj");
|
|
||||||
$('#loadingcontent').loader('show');
|
$('#loadingcontent').loader('show');
|
||||||
var tablevalue = $('#cashbooktable').tableToJSON(); // Convert the table into a javascript object
|
var tablevalue = $('#cashbooktable').tableToJSON(); // Convert the table into a javascript object
|
||||||
var value = JSON.stringify(tablevalue);
|
var value = JSON.stringify(tablevalue);
|
||||||
@ -245,7 +266,13 @@ $('#Add').click(function(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clear()
|
||||||
|
{
|
||||||
|
$('#accountcode').val('');
|
||||||
|
$('#accountname').val('');
|
||||||
|
$('#description').val('');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -184,10 +184,10 @@ $('html').bind('keypress', function(e)
|
|||||||
<td style="text-align:right;" style="background-color:blue;"><?php echo $index; ?></td>
|
<td style="text-align:right;" style="background-color:blue;"><?php echo $index; ?></td>
|
||||||
<td style="text-align:right;"><?php echo $record->EmpID ?></td>
|
<td style="text-align:right;"><?php echo $record->EmpID ?></td>
|
||||||
<td><?php echo $record->FirstName ." ". $record->LastName ?></td>
|
<td><?php echo $record->FirstName ." ". $record->LastName ?></td>
|
||||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Days_worked)){echo $record->Days_worked;}else{echo "0.00";}?></td>
|
<td <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Days_worked)){echo $record->Days_worked;}else{echo "0.00";}?></td>
|
||||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?></td>
|
<td <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?></td>
|
||||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?></td>
|
<td <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?></td>
|
||||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?></td>
|
<td <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?></td>
|
||||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Loan_Recovered)){if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.','');}else {echo $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.','');} ?></td>
|
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Loan_Recovered)){if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.','');}else {echo $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.','');} ?></td>
|
||||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Incentives)){echo $record->Incentives;}else{ echo number_format(0.00,2,'.','');;} ?></td>
|
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Incentives)){echo $record->Incentives;}else{ echo number_format(0.00,2,'.','');;} ?></td>
|
||||||
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Other_Deductions)){echo $record->Other_Deductions; }else{ echo number_format(0.00,2,'.','');;} ?></td>
|
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Other_Deductions)){echo $record->Other_Deductions; }else{ echo number_format(0.00,2,'.','');;} ?></td>
|
||||||
|
|||||||
@ -22,11 +22,11 @@ if(!empty($data))
|
|||||||
|
|
||||||
if($extype == 'INCOME')
|
if($extype == 'INCOME')
|
||||||
{
|
{
|
||||||
$label = 'Received From:';
|
$label = 'Received From :';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$label = 'Paid To:';
|
$label = 'Paid To :';
|
||||||
}
|
}
|
||||||
$final = base_url().$document;
|
$final = base_url().$document;
|
||||||
//echo $final;
|
//echo $final;
|
||||||
@ -55,112 +55,25 @@ if(!empty($data))
|
|||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<!-- <div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
<b>Date</b>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
Invoice No
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
Merchant Name
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
Merchant GST No
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
HSN/SAC Code
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
Value before GST
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
SGST
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
CGST
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
IGST
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
Total Amount
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="col-md-6">
|
|
||||||
Description
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
:
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<table id="viewIS">
|
<table id="viewIS">
|
||||||
<thead></thead>
|
<thead></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr> <td style="text-align:right;"><h4>Date</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>Date :</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->date)){echo date_format(date_create($data[0]->date),'d-m-Y');}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4><?php echo $label;?></h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->towhom)){echo $data[0]->towhom;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4><?php echo $label;?></h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->towhom)){echo $data[0]->towhom;}?></td></tr>
|
||||||
<?php if($flag == 1){?>
|
<?php if($flag == 1){?>
|
||||||
<tr> <td style="text-align:right;"><h4>Invoice No</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->invoice_no)){echo $data[0]->invoice_no;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>Invoice No :</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->invoice_no)){echo $data[0]->invoice_no;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>Merchant Name</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->merchant)){echo $data[0]->merchant;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>Merchant Name :</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->merchant)){echo $data[0]->merchant;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>Merchant GST No</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->merchant_gst)){echo $data[0]->merchant_gst;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>Merchant GST No :</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->merchant_gst)){echo $data[0]->merchant_gst;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>HSN/SAC No</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->HSN)){echo $data[0]->HSN;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>HSN/SAC No :</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->HSN)){echo $data[0]->HSN;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>Value Before GST</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->value_before_gst)){echo $data[0]->value_before_gst;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>Value Before GST :</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->value_before_gst)){echo $data[0]->value_before_gst;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>SGST</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->sgst)){echo $data[0]->sgst;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>SGST :</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->sgst)){echo $data[0]->sgst;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>CGST</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->cgst)){echo $data[0]->cgst;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>CGST :</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->cgst)){echo $data[0]->cgst;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>IGST</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->igst)){echo $data[0]->igst;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>IGST :</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->igst)){echo $data[0]->igst;}?></td></tr>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
<tr> <td style="text-align:right;"><h4>Total Amount</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->total)){echo $data[0]->total;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>Total Amount :</h4></td><td> </td> <td style="text-align:right;"><?php if(!empty($data[0]->total)){echo $data[0]->total;}?></td></tr>
|
||||||
<tr> <td style="text-align:right;"><h4>Description</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->description)){echo $data[0]->description;}?></td></tr>
|
<tr> <td style="text-align:right;"><h4>Description :</h4></td> <td> </td><td style="text-align:right;"><?php if(!empty($data[0]->description)){echo $data[0]->description;}?></td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user