<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('budgets', function (Blueprint $table) {
            $table->decimal('tax_percentage', 5, 2)->default(0)->after('total');
            $table->decimal('tax_amount', 10, 2)->default(0)->after('tax_percentage');
            $table->decimal('total_with_tax', 10, 2)->default(0)->after('tax_amount');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('budgets', function (Blueprint $table) {
            $table->dropColumn(['tax_percentage', 'tax_amount', 'total_with_tax']);
        });
    }
}; 