add budgets

This commit is contained in:
Jagad R R
2025-01-07 17:23:42 +07:00
parent 8c62fb6a19
commit 1027b0dfb4
24 changed files with 868 additions and 36 deletions
@@ -0,0 +1,44 @@
<?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('budget_control', function (Blueprint $table) {
$table->id();
$table->foreignId('cabang_id')->nullable()->constrained('cabang');
$table->foreignId('sender_id')->constrained('admins');
$table->foreignId('receiver_id')->constrained('admins');
$table->integer('amount');
$table->string('remarks')->nullable();
$table->string('periode_month');
$table->integer('periode_year');
$table->timestamp('transferred_at')->nullable();
$table->timestamp('closing_at')->nullable();
$table->string('status')->default('Unassigned');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('budget_control');
}
};
@@ -0,0 +1,44 @@
<?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('budget_control_log', function (Blueprint $table) {
$table->id();
$table->foreignId('cabang_id')->nullable()->constrained('cabang');
$table->foreignId('sender_id')->constrained('admins');
$table->foreignId('receiver_id')->constrained('admins');
$table->integer('amount');
$table->string('remarks')->nullable();
$table->string('periode_month');
$table->integer('periode_year');
$table->timestamp('transferred_at')->nullable();
$table->timestamp('closing_at')->nullable();
$table->string('status')->default('Unassigned');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('budget_control_log');
}
};