$empID = $_GET['empID']; $username = $_GET['username']; $ro = new payroll(); $ro->coconutDesign(); echo "<br>"; $ro->coconutFormStart("post", "/COCONUT/payroll/payrollInfo1.php"); $ro->coconutHidden("payrollNo", $payrollNo); $ro->coconutHidden("empID", $empID); $ro->coconutHidden("username", $username); $ro->coconutBoxStart("500", "755"); echo "<Br>"; echo "<table border=0>"; echo "<tr>"; echo "<td>Salary/Rate</td>"; echo "<td>"; $ro->coconutTextBox("salaryBasic", $ro->selectNow("employeePayroll", "salary", "payrollNo", $payrollNo)); echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Overtime</td>"; echo "<td>"; $ro->coconutTextBox("overtime", $ro->selectNow("employeePayroll", "overtime", "payrollNo", $payrollNo)); echo "</td>"; echo "</tr>"; echo "<tr>"; echo "<td>Holiday</td>"; echo "<td>"; $ro->coconutTextBox("holiday", $ro->selectNow("employeePayroll", "holiday", "payrollNo", $payrollNo)); echo "</td>"; echo "</tr>"; echo "<tr>";
<?php include "../../payrollDatabase.php"; $payrollNo = $_GET['payrollNo']; $empID = $_GET['empID']; $payroll = new payroll(); $grossPay = $payroll->selectNow("employeePayroll", "salary", "empID", $empID) + $payroll->selectNow("employeePayroll", "overtime", "empID", $empID) + $payroll->selectNow("employeePayroll", "holiday", "empID", $empID) + $payroll->selectNow("employeePayroll", "nsd", "empID", $empID); $totalDeduction = $payroll->selectNow("employeePayroll", "withholdingTax", "empID", $empID) + $payroll->selectNow("employeePayroll", "sss", "empID", $empID) + $payroll->selectNow("employeePayroll", "pagibig", "empID", $empID) + $payroll->selectNow("employeePayroll", "phic", "empID", $empID); $misc = $payroll->selectNow("employeePayroll", "late", "empID", $empID) + $payroll->selectNow("employeePayroll", "absences", "empID", $empID); echo "<br><br>"; echo "<font size=3><b>" . $payroll->selectNow("reportHeading", "information", "reportName", "hmoSOA_name") . "</b></font>"; echo "<br>"; echo "<font size=2><b>Employee's Payslip</b></font>"; echo "<br>"; echo "<font size=2><b>Payroll Period:</b> " . $payroll->selectNow("employeePayroll", "payFrom", "payrollNo", $payrollNo) . " - " . $payroll->selectNow("employeePayroll", "payTo", "payrollNo", $payrollNo) . "</font>"; echo "<br><br>"; echo "<font size=3><b>Name:</b> " . $payroll->selectNow("registeredUser", "completeName", "employeeID", $empID) . "</font>"; echo "<br><br>"; echo "<table border=0 width='40%'>"; echo "<tr>"; echo "<td><font size=3>Basic Salary</font></td>"; echo "<td align='right'><font size=3>" . number_format($payroll->selectNow("employeePayroll", "salary", "empID", $empID), 2) . "</font></td>"; echo "</tr>"; echo "<tr>"; echo "<td><font size=3>Overtime</font></td>"; echo "<td align='right'><font size=3>" . number_format($payroll->selectNow("employeePayroll", "overtime", "empID", $empID), 2) . "</font></td>"; echo "</tr>"; echo "<tr>"; echo "<td><font size=3>Holiday</font></td>"; echo "<td align='right'><font size=3>" . number_format($payroll->selectNow("employeePayroll", "holiday", "empID", $empID), 2) . "</font></td>"; echo "</tr>";
if (isset($_GET['salary']) && isset($_GET['overtime']) && isset($_GET['holiday']) && isset($_GET['late']) && isset($_GET['absences']) && isset($_GET['wTax']) && isset($_GET['monthType']) && isset($_GET['philhealth']) && isset($_GET['sss']) && isset($_GET['pagibig']) && isset($_GET['nsd'])) { $salary = $_GET['salary']; $overtime = $_GET['overtime']; $holiday = $_GET['holiday']; $late = $_GET['late']; $absences = $_GET['absences']; $wTax = $_GET['wTax']; $monthType = $_GET['monthType']; $nsd = $_GET['nsd']; $philhealthContribution = $ro->getPhilHealthContribution($salary); $sssContribution = $ro->getSSSContribution($salary); $hdmfContribution = $ro->getHDMFContribution($salary); $gross = $salary + $overtime + $holiday + $nsd; $deduction = $late + $absences + $philhealthContribution + $sssContribution + $hdmfContribution; $total = $gross - $deduction; $exemptionAmount = $ro->getExemptionAmount($total, $monthType, $ro->selectNow("registeredUser", "status", "employeeID", $employeeID)); $ro->getPossibleExemption($exemptionAmount, $ro->selectNow("registeredUser", "status", "employeeID", $employeeID), $monthType); $withholdingTax = ($total - $exemptionAmount) * $ro->getPossibleExemption_statusBracket() + $ro->getPossibleExemption_baseTax(); $sssEmployerShare = $ro->getSSS_employerContribution($salary); $phicEmployerShare = $ro->getPhilHealth_employerContribution($salary); $pagibigEmployerShare = $ro->getHDMF_employerContribution($salary); } echo "<div style='border:0px solid #000; height:200px; width:700px; float:left;'>"; echo "<table border=0>"; echo "<tr>"; echo "<td><b>Emp ID#</b> </tD>"; echo "<td>{$employeeID}</td>"; echo "</tr>"; echo "<Tr>"; echo "<tD><b>Name</b> </tD>"; echo "<td>" . $ro->selectNow("registeredUser", "completeName", "employeeID", $employeeID) . "</tD>";