corrected an error on semi-monthly #18

Merged
paul merged 1 commits from paulcortezl5 into main 7 months ago

@ -30,23 +30,23 @@ class PayrollComputation
}
else if($grossTaxableIncome <= 16666)
{
$tax = ($grossTaxableIncome - 10417) * 0.2;
$tax = ($grossTaxableIncome - 10417) * 0.15;
}
else if($grossTaxableIncome <= 33332)
{
$tax = (($grossTaxableIncome - 16667) * 0.25) + 1250;
$tax = (($grossTaxableIncome - 16667) * 0.20) + 937.50;
}
else if($grossTaxableIncome <= 83332)
{
$tax = (($grossTaxableIncome - 33333) * 0.3) + 5416.67;
$tax = (($grossTaxableIncome - 33333) * 0.25) + 4270.70;
}
else if($grossTaxableIncome <= 333332)
{
$tax = (($grossTaxableIncome - 83333) * 0.32) + 20416.67;
$tax = (($grossTaxableIncome - 83333) * 0.30) + 16770.70;
}
else
{
$tax = (($grossTaxableIncome - 333333) * 0.35) + 100416.67;
$tax = (($grossTaxableIncome - 333333) * 0.35) + 91770.70;
}
return $tax;

@ -583,7 +583,9 @@ class PayrollController extends BaseController
'email_address' => $empPayInfo->email_address,
'is_ATM' => $empPayInfo->is_ATM,
'savings_account' => $empPayInfo->savings_account,
'basic_sal_computation' => $empPayInfo->basic_sal_computation,
'basic_monthly_pay' => $empPayInfo->basic_monthly_pay,
'basic_semi_monthly_pay' => $empPayInfo->basic_semi_monthly_pay,
'basic_daily_pay' => $empPayInfo->basic_daily_pay,
'basic_hourly_pay' => $empPayInfo->basic_hourly_pay,
'has_cola' => $empPayInfo->has_cola,

@ -0,0 +1,37 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddSalComputeOnEmpPayTrans extends Migration
{
public function up()
{
$fields = [
'basic_sal_computation' => [
'type' => 'VARCHAR',
'constraint' => 35,
'null' => true,
'after' => 'savings_account',
],
'basic_semi_monthly_pay' => [
'type' => 'DECIMAL',
'constraint' => '12,4',
'null' => false,
'after' => 'basic_monthly_pay',
],
];
$this->forge->addColumn('emp_pay_trans', $fields);
}
public function down()
{
$fields = [
'basic_sal_computation',
'basic_semi_monthly_pay'
];
$this->forge->dropColumn('emp_pay_trans', $fields);
}
}

@ -24,7 +24,9 @@ class EmployeePayTransaction extends Entity
'email_address' => null,
'is_ATM' => null,
'savings_account' => null,
'basic_sal_computation' => null,
'basic_monthly_pay' => null,
'basic_semi_monthly_pay' => null,
'basic_daily_pay' => null,
'basic_hourly_pay' => null,
'has_cola' => null,

@ -28,7 +28,9 @@ class EmployeePayTransactionModel extends Model
'email_address',
'is_ATM',
'savings_account',
'basic_sal_computation',
'basic_monthly_pay',
'basic_semi_monthly_pay',
'basic_daily_pay',
'basic_hourly_pay',
'has_cola',

Loading…
Cancel
Save