Extend invoices and invoice items to keep more information.

This commit is contained in:
2025-01-31 13:04:59 +01:00
parent e2240c017d
commit d8afe4960e
20 changed files with 1475 additions and 640 deletions

View File

@@ -0,0 +1,28 @@
<?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::table('invoiceitems', function (Blueprint $table) {
$table->string('article_number')->after('invoice_id')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('invoiceitems', function (Blueprint $table) {
$table->dropColumn('article_number');
});
}
};

View File

@@ -0,0 +1,32 @@
<?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::table('invoices', function (Blueprint $table) {
$table->date('due_date')->nullable()->after('paid_at');
$table->decimal('cash_discount', 8, 2)->default(0)->after('due_date');
$table->date('cash_discount_date', 8, 2)->nullable()->after('cash_discount');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('invoices', function (Blueprint $table) {
$table->dropColumn('due_date');
$table->dropColumn('cash_discount');
$table->dropColumn('cash_discount_date');
});
}
};