Generate the models and migrations for incoming invoices.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user