<?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><h1>  $userid </h1></th>";
echo "</tr>";
echo "<tr>";
echo "<th bgcolor=white align=center colspan=6>  <h3>Salary Voucher</h3> </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>Staff  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> Increament </th>";
  echo "<td>"  .$ppp["dailyallow"] . "</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=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> Leave</th>";
  echo "<td>"  .round($ppp["leaveallow"],0) . "</td>" ;
  echo "</tr>";
  
  
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Increament</th>";
  echo "<td>"  .round($ppp["dailyallow"],0) . "</td>" ;
  echo "</tr>";
  
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Others Allownces</th>";
  echo "<td>"  .round($ppp["oallow"],0) . "</td>" ;
  echo "</tr>";
  
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Security Return</th>";
  echo "<td>"  .round($ppp["secret"],0) . "</td>" ;
  echo "</tr>";
  
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Fuel Allownces</th>";
  echo "<td>"  .round($ppp["fallow"],0) . "</td>" ;
  echo "</tr>";
  
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Conrdinator Allownces</th>";
  echo "<td>"  .round($ppp["callow"],0) . "</td>" ;
  echo "</tr>";
  
  
   echo "<tr>";
  echo "<th bgcolor=white align=right colspan=5> Pending Dues</th>";
  echo "<td>"  .round($ppp["pallow"],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 />
Principal:________ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Admin:________&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convenor:________
<br />

<br />

<br />

<br />

<br />


