You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
PHP
54 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\ClassLib;
|
|
|
|
class PayrollComputation
|
|
{
|
|
public array $workdays_type = [
|
|
'261.0000' => 'No work and not paid on Sat and Sun or RD',
|
|
'313.0000' => 'No work and not paid on Sun or RD',
|
|
'365.0000' => 'No work but paid on RD, Reg. & Special Holidays',
|
|
'392.5000' => 'Has work including RD, Reg. & Special Holidays',
|
|
];
|
|
|
|
public array $basic_salary_computations = [
|
|
'DAILY' => 'Rate Based on Daily Hrs Worked',
|
|
'SEMIMONTHLY' => 'Apply Semi-Monthly Rate',
|
|
'MONTHLY' => 'Apply Monthly Rate'
|
|
];
|
|
|
|
public function __construct()
|
|
{
|
|
}
|
|
|
|
public function computeIncomeTax($grossTaxableIncome)
|
|
{
|
|
$tax = 0;
|
|
if($grossTaxableIncome <= 10417)
|
|
{
|
|
$tax = 0;
|
|
}
|
|
else if($grossTaxableIncome <= 16666)
|
|
{
|
|
$tax = ($grossTaxableIncome - 10417) * 0.2;
|
|
}
|
|
else if($grossTaxableIncome <= 33332)
|
|
{
|
|
$tax = (($grossTaxableIncome - 16667) * 0.25) + 1250;
|
|
}
|
|
else if($grossTaxableIncome <= 83332)
|
|
{
|
|
$tax = (($grossTaxableIncome - 33333) * 0.3) + 5416.67;
|
|
}
|
|
else if($grossTaxableIncome <= 333332)
|
|
{
|
|
$tax = (($grossTaxableIncome - 83333) * 0.32) + 20416.67;
|
|
}
|
|
else
|
|
{
|
|
$tax = (($grossTaxableIncome - 333333) * 0.35) + 100416.67;
|
|
}
|
|
|
|
return $tax;
|
|
}
|
|
} |