<?php
session_start();

include 'dbc.php';

$userid=$_SESSION['userid'];

$id=$_REQUEST["id"];

  $sqlcus = "select * from paidsalary where id='$id' and user_id='$userid'";
   $result=$conn->query($sqlcus);
$ppp = $result->fetch_assoc();
   
echo "<table border=1 width=100% align=center bgcolor=white>";
echo "<tr>";
echo "<th bgcolor=white align=center colspan=6>  $userid </th>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=center colspan=6>  Salary Voucher </th>";
echo "</tr>";
echo "<tr>";
  echo "<th bgcolor=white align=left>  Date </th>";
  echo "<td>"  .$ppp["date"] . "</td>" ; 
  echo "<th bgcolor=white align=left> Voucher No </th>";
  echo "<td>"  .$ppp["id"] . "</td>" ;
  echo "<th bgcolor=white align=left> Month </th>";
  echo "<td>"  .$ppp["month_name"] . "</td>" ;
  echo "</tr>";
  
echo "<tr>";
 echo "<th bgcolor=white align=left>  Name </th>";
  echo "<td>"  .$ppp["tech_name"] . "</td>" ; 
  echo "<th bgcolor=white align=left> Father Name </th>";
  echo "<td>"  .$ppp["father_name"] . "</td>" ;
  echo "<th bgcolor=white align=left> Desg </th>";
  echo "<td>"  .$ppp["class_name"] . "</td>" ;
  echo "</tr>";
  
  echo "<tr>";
 echo "<th bgcolor=white align=center colspan=2>  Attendance Details </th>";
 echo "<th bgcolor=white align=center colspan=2>  Deduction Details </th>";
 echo "<th bgcolor=white align=center colspan=2>  Allowncess Details </th>";
 echo "</tr>";
 
 echo "<tr>";
 echo "<th bgcolor=white align=left>  Total Days </th>";
  echo "<td>"  .$ppp["tdays"] . "</td>" ; 
  echo "<th bgcolor=white align=left>Absent Ded </th>";
  echo "<td>"  .$ppp["absentded"] . "</td>" ;
  echo "<th bgcolor=white align=left> Leave Allow </th>";
  echo "<td>"  .$ppp["leaveallow"] . "</td>" ;
  echo "</tr>";
  
  echo "<tr>";
 echo "<th bgcolor=white align=left>  Absent Days </th>";
  echo "<td>"  .$ppp["adays"] . "</td>" ; 
  echo "<th bgcolor=white align=left>Advance Ded </th>";
  echo "<td>"  .$ppp["advded"] . "</td>" ;
  echo "<th bgcolor=white align=left> Daily Allow </th>";
  echo "<td>"  .$ppp["callow"] . "</td>" ;
  echo "</tr>";
  
   echo "<tr>";
 echo "<th bgcolor=white align=left>  Present Days </th>";
  echo "<td>"  .$ppp["pdays"] . "</td>" ; 
  echo "<th bgcolor=white align=left>Security Ded </th>";
  echo "<td>"  .$ppp["secded"] . "</td>" ;
  echo "<th bgcolor=white align=left> Others Allow </th>";
  echo "<td>"  .$ppp["oallow"] . "</td>" ;
  echo "</tr>";
  
  echo "<tr>";
 echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left>Others Ded </th>";
  echo "<td>"  .$ppp["oded"] . "</td>" ;
  echo "<th bgcolor=white align=left> Security Return</th>";
  echo "<td>"  .$ppp["secret"] . "</td>" ;
  echo "</tr>";
   echo "<tr>";
 echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left>   </th>";
 echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left> Fuel Allow</th>";
  echo "<td>"  .$ppp["fallow"] . "</td>" ;
  echo "</tr>";
   echo "<tr>";
 echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left>   </th>";
 echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left>   </th>";
  echo "<th bgcolor=white align=left> Mobile Allow</th>";
  echo "<td>"  .$ppp["pallow"] . "</td>" ;
  echo "</tr>";
   echo "<tr>";
   echo "<th bgcolor=white align=right colspan=5> Basic salary</th>";
  echo "<td>"  .$ppp["monthly_salary"] . "</td>" ;
   echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Absent Deduction</th>";
  echo "<td>"  .round($ppp["absentded"],0) . "</td>" ;
  echo "</tr>";
  echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Total Deduction</th>";
  echo "<td>"  .round($ppp["totalded"],0) . "</td>" ;
  echo "</tr>";
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Gross Salary</th>";
  echo "<td>"  .round($ppp["gsalary"],0) . "</td>" ;
  echo "</tr>";
  
  echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Total Allownces</th>";
  echo "<td>"  .round($ppp["totalallow"],0) . "</td>" ;
  echo "</tr>";
  
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Net Salary</th>";
  echo "<td>"  .round($ppp["netsalary"],0) . "</td>" ;
  echo "</tr>";
  echo "</table>";
  

	 
 
?>

<br />
<h3><br />
  <br />
  <br />
  <br />
Director:________ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Acounts Manager:________&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Staff/Employee:________
<br />

<br />

<br />

<br />

<br />


