107 lines
3.5 KiB
PHP
107 lines
3.5 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use App\Models\StatutoryBracket;
|
|
|
|
class StatutoryBracketSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
// Prevent duplicate seeding
|
|
if (StatutoryBracket::count() > 0) {
|
|
return;
|
|
}
|
|
|
|
$brackets = [
|
|
// SSS - Simplified 2026 Table (4.5% EE, 9.5% ER of MSC capped at 30k)
|
|
[
|
|
'type' => 'sss',
|
|
'min_salary' => 0,
|
|
'max_salary' => 29999.99,
|
|
'employee_share_amount' => null,
|
|
'employee_share_percentage' => 4.50,
|
|
'employer_share_amount' => null,
|
|
'employer_share_percentage' => 9.50,
|
|
],
|
|
[
|
|
'type' => 'sss',
|
|
'min_salary' => 30000,
|
|
'max_salary' => null,
|
|
'employee_share_amount' => 1350.00, // 30,000 * 4.5%
|
|
'employee_share_percentage' => null,
|
|
'employer_share_amount' => 2850.00, // 30,000 * 9.5%
|
|
'employer_share_percentage' => null,
|
|
],
|
|
|
|
// PhilHealth - 5% total (2.5% EE, 2.5% ER)
|
|
[
|
|
'type' => 'philhealth',
|
|
'min_salary' => 0,
|
|
'max_salary' => 9999.99,
|
|
'employee_share_amount' => 250.00,
|
|
'employee_share_percentage' => null,
|
|
'employer_share_amount' => 250.00,
|
|
'employer_share_percentage' => null,
|
|
],
|
|
[
|
|
'type' => 'philhealth',
|
|
'min_salary' => 10000,
|
|
'max_salary' => 99999.99,
|
|
'employee_share_amount' => null,
|
|
'employee_share_percentage' => 2.50,
|
|
'employer_share_amount' => null,
|
|
'employer_share_percentage' => 2.50,
|
|
],
|
|
[
|
|
'type' => 'philhealth',
|
|
'min_salary' => 100000,
|
|
'max_salary' => null,
|
|
'employee_share_amount' => 2500.00,
|
|
'employee_share_percentage' => null,
|
|
'employer_share_amount' => 2500.00,
|
|
'employer_share_percentage' => null,
|
|
],
|
|
|
|
// Pag-IBIG
|
|
[
|
|
'type' => 'pagibig',
|
|
'min_salary' => 0,
|
|
'max_salary' => 1500,
|
|
'employee_share_amount' => null,
|
|
'employee_share_percentage' => 1.00,
|
|
'employer_share_amount' => null,
|
|
'employer_share_percentage' => 2.00,
|
|
],
|
|
[
|
|
'type' => 'pagibig',
|
|
'min_salary' => 1500.01,
|
|
'max_salary' => 5000,
|
|
'employee_share_amount' => null,
|
|
'employee_share_percentage' => 2.00,
|
|
'employer_share_amount' => null,
|
|
'employer_share_percentage' => 2.00,
|
|
],
|
|
[
|
|
'type' => 'pagibig',
|
|
'min_salary' => 5000.01,
|
|
'max_salary' => null,
|
|
'employee_share_amount' => 100.00, // Capped at 5000 MSC
|
|
'employee_share_percentage' => null,
|
|
'employer_share_amount' => 100.00,
|
|
'employer_share_percentage' => null,
|
|
],
|
|
];
|
|
|
|
foreach ($brackets as $bracket) {
|
|
$bracket['created_by'] = 1; // System default
|
|
$bracket['is_active'] = true;
|
|
StatutoryBracket::create($bracket);
|
|
}
|
|
}
|
|
}
|