Ejemplo n.º 1
0
include "../../payrollDatabase.php";
$employeeID = $_GET['employeeID'];
$username = $_GET['username'];
$ro = new payroll();
$ro->coconutDesign();
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>&nbsp;</tD>";