Example #1
0
<?php

include "../../payrollDatabase.php";
$username = $_GET['username'];
$ro = new payroll();
echo "<table cellspacing=0 cellpadding=1 border=1>";
echo "<tr>";
echo "<th>Name</th>";
echo "</tr>";
$ro->listEmployee($username);
echo "</table>";
Example #2
0
<?php

include "../../payrollDatabase.php";
$employeeID = $_POST['employeeID'];
$username = $_POST['username'];
$ro = new payroll();
echo "<br><Br><br><br>";
$ro->getPayrollList($employeeID, $username);
Example #3
0
<?php

include "../../payrollDatabase.php";
$payrollNo = $_GET['payrollNo'];
$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>";
Example #4
0
<?php

include "../../payrollDatabase.php";
$username = $_GET['username'];
$ro = new payroll();
echo "<br><center><font size=5>PhilHealth Contribution Table</font>";
$ro->phicContribution($username);
Example #5
0
<?php

include "../../../payrollDatabase.php";
$fromYear = $_POST['fromYear'];
$fromMonth = $_POST['fromMonth'];
$fromDay = $_POST['fromDay'];
$toYear = $_POST['toYear'];
$toMonth = $_POST['toMonth'];
$toDay = $_POST['toDay'];
$ro = new payroll();
$from = $fromYear . "-" . $fromMonth . "-" . $fromDay;
$to = $toYear . "-" . $toMonth . "-" . $toDay;
echo "<center><font size=6>PhilHealth Monthly</font></center>";
echo "<center><font size=2> ( <b>{$fromYear}-{$fromMonth}-{$fromDay}</b> to <b>{$toYear}-{$toMonth}-{$toDay}</b> ) </font></center>";
echo "<br><br>";
echo "<center>";
echo "<table border=1 cellspacing=0 cellpadding=1>";
echo "<Tr>";
echo "<th> Employee </th>";
echo "<th> SSS </th>";
echo "</tr>";
$ro->monthlyReport("philhealthEmployerShare", $from, $to);
echo "</table>";
echo "</center>";
<?php

include "../../../payrollDatabase.php";
$fromYear = $_POST['fromYear'];
$fromMonth = $_POST['fromMonth'];
$fromDay = $_POST['fromDay'];
$toYear = $_POST['toYear'];
$toMonth = $_POST['toMonth'];
$toDay = $_POST['toDay'];
$ro = new payroll();
$from = $fromYear . "-" . $fromMonth . "-" . $fromDay;
$to = $toYear . "-" . $toMonth . "-" . $toDay;
echo "<center><font size=6>Pag-ibig Monthly</font></center>";
echo "<center><font size=2> ( <b>{$fromYear}-{$fromMonth}-{$fromDay}</b> to <b>{$toYear}-{$toMonth}-{$toDay}</b> ) </font></center>";
echo "<br><br>";
echo "<center>";
echo "<table border=1 cellspacing=0 cellpadding=1>";
echo "<Tr>";
echo "<th> Employee </th>";
echo "<th> SSS </th>";
echo "</tr>";
$ro->monthlyReport("pagibigEmployerShare", $from, $to);
echo "</table>";
echo "</center>";
Example #7
0
<?php

include "../../payrollDatabase.php";
$username = $_GET['username'];
$ro = new payroll();
echo "<center><font size=5>SSS Contribution Table</font>";
$ro->sssContribution($username);
Example #8
0
<?php

include "../../payrollDatabase.php";
$fromYear = $_POST['fromYear'];
$fromMonth = $_POST['fromMonth'];
$fromDay = $_POST['fromDay'];
$toYear = $_POST['toYear'];
$toMonth = $_POST['toMonth'];
$toDay = $_POST['toDay'];
$ro = new payroll();
$from = $fromYear . "-" . $fromMonth . "-" . $fromDay;
$to = $toYear . "-" . $toMonth . "-" . $toDay;
echo "<center><font size=6> Payroll  </font></center>";
echo "<center><font size=3>( {$fromYear}-{$fromMonth}-{$fromDay} to {$toYear}-{$toMonth}-{$toDay} )</font></center>";
echo "<br>";
echo "<center>";
echo "<table border=1 cellspacing=0 cellpadding=0>";
echo "<Tr>";
echo "<th> Employee </th>";
echo "<th> SSS </th>";
echo "<th> PhilHealth </th>";
echo "<th> Pag-ibig </th>";
echo "<th> W/ Tax </th>";
echo "<Th> Gross </th>";
echo "<th> Deduction </th>";
echo "<th> Net </th>";
echo "</tr>";
$ro->payrollMonthly($from, $to);
echo "</table>";
Example #9
0
<?php

include "../../payrollDatabase.php";
$username = $_GET['username'];
$ro = new payroll();
echo "\n\n<frameset cols='45%,210%' framespacing='0' border='1'>\n   <frame src='http://" . $ro->getMyUrl() . "/COCONUT/payroll/listEmployee.php?username={$username}'  scrolling=yes frameborder=1 framespacing=1 name='selection' />\n   <frame src='#'  scrolling=yes frameborder=1 framespacing=1 name='rightFrame' />\n\n</frameset>\n\n\n";
?>



Example #10
0
<?php

# Use the link format below: add a month and a year
# http://localhost/payroll/ws.php?month=?&year=?
require_once 'payroll.php';
$wsMonth = isset($_GET['month']) ? intval($_GET['month']) : '';
$wsYear = isset($_GET['year']) ? intval($_GET['year']) : '';
if ($wsMonth && $wsYear) {
    $wsPayroll = new payroll();
    $wsPayroll->setters($wsMonth, $wsYear);
    $wsPayrollDate = $wsPayroll->getSubmissionDate();
    $returnJsonDate = array("{$wsPayrollDate}");
    header('Content-type: application/json');
    echo json_encode($returnJsonDate);
    dbconn($wsMonth, $wsYear);
} else {
    echo "<pre>No Data Sent. <br /><br />" . "Use http://localhost/payroll/ws.php?month=?&year=? specifying a month (mm) and a year (yyyy)</pre>";
}
function dbconn($m, $y)
{
    $mysqli = new mysqli("localhost", "pyuser", "pypass", "py");
    if ($mysqli->connect_errno) {
        printf("Connect failed: %s\n", $mysqli->connect_error);
        exit;
    }
    mysqli_query($mysqli, "INSERT INTO `log`( `month`, `year` ) VALUES ( {$m} ,{$y} )");
    mysqli_close($mysqli);
}
Example #11
0
<?php

include "../../payrollDatabase.php";
$username = $_GET['username'];
$ro = new payroll();
echo "<br><center><font size=5>Pag-Ibig Contribution Table</font></center>";
$ro->pagibigContribution($username);
Example #12
0
<?php

include "../../payrollDatabase.php";
$username = $_GET['username'];
$ro = new payroll();
$ro->withholdingTax($username);
Example #13
0
<?php

include "../../../payrollDatabase.php";
$fromYear = $_POST['fromYear'];
$fromMonth = $_POST['fromMonth'];
$fromDay = $_POST['fromDay'];
$toYear = $_POST['toYear'];
$toMonth = $_POST['toMonth'];
$toDay = $_POST['toDay'];
$ro = new payroll();
$from = $fromYear . "-" . $fromMonth . "-" . $fromDay;
$to = $toYear . "-" . $toMonth . "-" . $toDay;
echo "<center><font size=6>SSS Monthly</font></center>";
echo "<center><font size=2> ( <b>{$fromYear}-{$fromMonth}-{$fromDay}</b> to <b>{$toYear}-{$toMonth}-{$toDay}</b> ) </font></center>";
echo "<br><br>";
echo "<center>";
echo "<table border=1 cellspacing=0 cellpadding=1>";
echo "<Tr>";
echo "<th> Employee </th>";
echo "<th> SSS </th>";
echo "</tr>";
$ro->monthlyReport("sssEmployerShare", $from, $to);
echo "</table>";
echo "</center>";
Example #14
0
<?php

include 'payroll.php';
$subDate = new payroll();
$subDate->setters('7', '2015');
$submissionDate = $subDate->getSubmissionDate();
$payday = $subDate->getDate();
echo "<br />\r\nPayment should be submitted by end of play on <strong>{$submissionDate}</strong> to reach accounts by <strong>{$payday}</strong>.\r\n<br /><br />";
Example #15
0
include "../../payrollDatabase.php";
$employeeID = $_GET['employeeID'];
$salary = $_GET['salary'];
$overtime = $_GET['overtime'];
$holiday = $_GET['holiday'];
$nsd = $_GET['nsd'];
$gross = $_GET['gross'];
$sss = $_GET['sss'];
$philhealth = $_GET['philhealth'];
$pagibig = $_GET['pagibig'];
$wTax = $_GET['wTax'];
$late = $_GET['late'];
$absences = $_GET['absences'];
$totalDeduction = $_GET['totalDeduction'];
$total = $_GET['total'];
$username = $_GET['username'];
$monthType = $_GET['monthType'];
$fromMonth = $_GET['fromMonth'];
$fromDay = $_GET['fromDay'];
$fromYear = $_GET['fromYear'];
$toMonth = $_GET['toMonth'];
$toDay = $_GET['toDay'];
$toYear = $_GET['toYear'];
$sssER = $_GET['sssER'];
$phicEmployerShare = $_GET['phicEmployerShare'];
$hdmfEmployerShare = $_GET['hdmfEmployerShare'];
$ro = new payroll();
$payFrom = $fromMonth . "-" . $fromDay . "-" . $fromYear;
$payTo = $toMonth . "-" . $toDay . "-" . $toYear;
$ro->insertEmployeePayroll($employeeID, $salary, $overtime, $holiday, $nsd, $late, $absences, $sss, $philhealth, $pagibig, $wTax, $gross, $totalDeduction, $total, $monthType, $payFrom, $payTo, $ro->getSynapseTime(), date("Y-m-d"), $username, $sssER, $phicEmployerShare, $hdmfEmployerShare);
$ro->gotoPage("http://" . $ro->getMyUrl() . "/COCONUT/payroll/employeeDetails.php?employeeID={$employeeID}&username={$username}");
Example #16
0
<?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>&nbsp;" . $payroll->selectNow("employeePayroll", "payFrom", "payrollNo", $payrollNo) . " - " . $payroll->selectNow("employeePayroll", "payTo", "payrollNo", $payrollNo) . "</font>";
echo "<br><br>";
echo "<font size=3><b>Name:</b>&nbsp;" . $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>";
Example #17
0
<?php

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>";