39 lines
986 B
PHP
39 lines
986 B
PHP
<?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('incomings', function (Blueprint $table) {
|
|
$table->id();
|
|
|
|
$table->foreignId('supplier_id')->constrained();
|
|
|
|
$table->string('invoice_number');
|
|
$table->date('issue_date');
|
|
$table->date('due_date')->nullable();
|
|
$table->string('invoice_type_code')->default('380');
|
|
$table->string('currency_code')->default('EUR');
|
|
$table->decimal('net');
|
|
$table->decimal('gross');
|
|
$table->decimal('tax');
|
|
$table->date('pay_date')->nullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('incomings');
|
|
}
|
|
};
|