PK

ADDRLIN : /home/questend/.trash/database.1/migrations/
FLL :
Current File : /home/questend/.trash/database.1/migrations/2025_01_01_000021_create_salary_components_table.php

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('salary_components', function (Blueprint $table) {

            $table->id();

            /* =========================
             | Component Identity
             |=========================*/
            $table->string('code')->unique();     // BASIC, HRA, PF_EE, PF_ER
            $table->string('name');               // Basic Salary, House Rent Allowance
            $table->enum('type', [
                'Earning',
                'Deduction',
                'EmployerContribution'
            ]);

            /* =========================
             | Behaviour
             |=========================*/
            $table->boolean('is_statutory')->default(false);
            $table->boolean('is_taxable')->default(true);
            $table->boolean('is_part_of_ctc')->default(true);

            /* =========================
             | Applicability Controls
             |=========================*/
            $table->boolean('pf_applicable')->default(false);
            $table->boolean('esi_applicable')->default(false);
            $table->boolean('pt_applicable')->default(false);

            /* =========================
             | Calculation
             |=========================*/
            $table->enum('calculation_type', [
                'Fixed',        // Fixed amount
                'Percentage',   // % of Basic or Gross
                'Formula'       // Future extensibility
            ])->default('Fixed');

            $table->string('percentage_of')->nullable(); 
            // BASIC / GROSS (used if Percentage)

            /* =========================
             | Display / Ordering
             |=========================*/
            $table->integer('display_order')->default(0);
            $table->boolean('is_active')->default(true);

            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('salary_components');
    }
};


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home