<?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('shop_invoice_returns', function (Blueprint $table) {
            $table->decimal('tax_rate', 5, 2)->default(0)->after('total_amount');
            $table->decimal('tax_amount', 15, 2)->default(0)->after('tax_rate');
            $table->boolean('is_tax_inclusive')->default(false)->after('tax_amount');

        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('shop_invoice_returns', function (Blueprint $table) {
            $table->dropColumn(['tax_rate', 'tax_amount', 'is_tax_inclusive']);

        });
    }
};
