<?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::create('grn_item_batches', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('grn_id')->nullable();
            $table->bigInteger('grn_item_id')->nullable();
            $table->string('batch')->nullable();
            $table->date('mfg_date')->nullable();
            $table->date('exp_date')->nullable();
            $table->double('unit_price')->nullable();
            $table->string('unit')->nullable();
            $table->double('total_amount')->nullable();
            $table->double('receiving_quantity')->nullable();
            $table->double('supplier_bill_no')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('grn_item_batches');
    }
};
