<?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::table('sales_masters', function (Blueprint $table) {
            $table->decimal('amount_given', 10, 2)->default(0)->after('grand_total');
            $table->decimal('change_amount', 10, 2)->default(0)->after('amount_given');
        });
    }

    public function down(): void
    {
        Schema::table('sales_masters', function (Blueprint $table) {
            $table->dropColumn(['amount_given', 'change_amount']);
        });
    }
};
