Invoice Payment
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('invoice_payments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('invoice_number');
|
||||
$table->string('payment_number');
|
||||
$table->date('invoice_date');
|
||||
$table->date('start_date');
|
||||
$table->date('end_date');
|
||||
$table->decimal('amount_paid', 15, 2);
|
||||
$table->string('status')->comment('submitted = Pengajuan, accepted = Belum Dibayar, partial_paid = Bayar Sebagian, paid = Sudah Dibayar');
|
||||
$table->bigInteger('created_by');
|
||||
$table->bigInteger('updated_by');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('invoice_payments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('invoice_payment_details', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('invoice_payment_id')->constrained('invoice_payments')->onDelete('cascade');
|
||||
$table->foreignId('claim_request_id')->constrained('claim_requests')->onDelete('cascade');
|
||||
$table->bigInteger('created_by');
|
||||
$table->bigInteger('updated_by');
|
||||
$table->bigInteger('deleted_by');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('invoice_payment_details');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user