Frontend dashboard, shipment, invoice , customer

This commit is contained in:
divya abdar
2025-12-01 10:38:52 +05:30
parent 97db70c40e
commit aa616fcf61
15 changed files with 4280 additions and 2509 deletions

View File

@@ -8,23 +8,16 @@ return new class extends Migration
{
public function up(): void
{
Schema::create('invoice_installments', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('invoice_id');
$table->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
$table->date('installment_date');
$table->string('payment_method')->nullable(); // cash, bank, UPI, cheque, etc
$table->string('reference_no')->nullable();
$table->decimal('amount', 10, 2);
$table->timestamps();
// Table already exists. Add updates here if needed.
Schema::table('invoice_installments', function (Blueprint $table) {
// nothing to update
});
}
public function down(): void
{
Schema::dropIfExists('invoice_installments');
Schema::table('invoice_installments', function (Blueprint $table) {
// nothing to rollback
});
}
};

View File

@@ -0,0 +1,22 @@
<?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('order_items', function (Blueprint $table) {
$table->softDeletes();
});
}
public function down(): void
{
Schema::table('order_items', function (Blueprint $table) {
$table->dropSoftDeletes();
});
}
};

View File

@@ -0,0 +1,26 @@
<?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('order_items', function (Blueprint $table) {
if (! Schema::hasColumn('order_items', 'deleted_at')) {
$table->softDeletes(); // adds deleted_at (nullable timestamp)
}
});
}
public function down(): void
{
Schema::table('order_items', function (Blueprint $table) {
if (Schema::hasColumn('order_items', 'deleted_at')) {
$table->dropSoftDeletes(); // drops deleted_at
}
});
}
};