Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.116.80.252
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/popup_empl_salary.php |
<div class="list-group" style="text-align:left; cursor:pointer;">
<?php
include("sys_connect.php");
include("sys_session.php");
if ($type_id == "ADMIN") {
$myqry = "";
} elseif ($type_id == 'CHIEF') {
$myqry = " inner join masdept_user du on em.fdeptcode = du.fdeptcode and du.fusercode = '$user_id' ";
} else {
$myqry = " and em.fusercode = 'ADMIN' ";
}
if (date('d') >= 25) {
$myqry1 = " and em.fsalrappr = date_format(current_date,'%m') ";
$appr_mnth = date('F Y', strtotime(date('Y-m')));
} else {
$myqry1 = " and em.fsalrappr = date_format(current_date - INTERVAL 1 MONTH,'%m') ";
$appr_mnth = date('F Y', strtotime(date('Y-m') . " -1 month"));
}
$mysql = "select em.fdeptcode,em.femplcode,em.femplname,dp.fdeptname,em.fempldesn,dp.fdeptshrt,
date_format(em.fjoindate,'%d/%m/%Y') as fjoindate,
date_format(current_date- interval 1 month,'%M %Y') as fsalrmnth,fsalrbase,
TIMESTAMPDIFF(year, fjoindate, current_date) as fexpryear,
TIMESTAMPDIFF(month, fjoindate, current_date)%12 as fexprmnth
from masempl em
inner join masdept dp on em.fdeptcode = dp.fdeptcode " . $myqry . "
where em.femplstat='T' and em.fempltype='P' " . $myqry1 . "
order by em.fdeptcode,em.fjoindate";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 0) {
echo "<table class='table table-default'>";
echo "<tr>";
echo "<th class='text-left' colspan='9'>Salary Appraisal due for the Month " . $appr_mnth . "</th>";
echo "</tr>";
echo "<tr>";
echo "<th class='text-right'>#</th>";
echo "<th class='text-left col-sm-2'>Client</th>";
echo "<th class='text-left col-sm-6'>Empl Name</th>";
echo "<th class='text-left col-sm-2'>Joining Date<br/>Total Expr.</th>";
echo "<th class='text-left col-sm-2'>Current Salary</th>";
echo "</tr>";
$i = 1;
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "<tr>";
echo "<td class='text-right'> $i.</td>";
echo "<td class='text-left'> [$myrow[fdeptcode]] $myrow[fdeptshrt]</td>";
echo "<td class='text-left'> [$myrow[femplcode]] $myrow[femplname]</br>$myrow[fempldesn]</td>";
echo "<td class='text-left'> $myrow[fjoindate] </br>$myrow[fexpryear].$myrow[fexprmnth] Years</td>";
echo "<td class='text-left'> $myrow[fsalrbase]</td>";
echo "</tr>";
$i++;
}
echo "</table>";
} else {
echo "<div class='alert alert-info'>No salary appraisals!</div>";
}
?>
</div>
|