<?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('cierres_turno', function (Blueprint $table) {
            $table->decimal('efectivo', 12, 2)->nullable()->after('total_galones');
            $table->decimal('credito', 12, 2)->nullable()->after('efectivo');
            $table->decimal('visa', 12, 2)->nullable()->after('credito');
            $table->decimal('descuentos', 12, 2)->nullable()->after('visa');
            $table->decimal('diferencia', 12, 2)->nullable()->after('descuentos');
        });
    }

    public function down(): void
    {
        Schema::table('cierres_turno', function (Blueprint $table) {
            $table->dropColumn(['efectivo', 'credito', 'visa', 'descuentos', 'diferencia']);
        });
    }
};

