update marketing
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-14 11:55:22 +07:00
parent f80fcc4c1b
commit 05fd3230b8
448 changed files with 17545 additions and 5128 deletions

View File

@@ -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.
*/
public function up(): void
{
Schema::table('vats', function (Blueprint $table) {
$table->boolean('manage_state')->default(0)->after('sub_vat');
});
Schema::create('vat_state_items', function (Blueprint $table) {
$table->id();
$table->foreignId('parent_vat_id')->constrained('vats')->cascadeOnDelete();
$table->foreignId('child_vat_id')->constrained('vats')->cascadeOnDelete();
$table->string('type')->comment('inner / outer');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('vat_state_items');
Schema::table('vats', function (Blueprint $table) {
$table->dropColumn('manage_state');
});
}
};

View File

@@ -0,0 +1,35 @@
<?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('vat_transactions', function (Blueprint $table) {
$table->id();
$table->foreignId('business_id')->constrained()->onDelete('cascade');
$table->foreignId('vat_id')->nullable()->constrained()->onDelete('set null');
$table->decimal('vat_rate', 10, 2)->default(0);
$table->decimal('vat_amount', 20, 2)->default(0);
$table->unsignedBigInteger('vatable_id');
$table->string('vatable_type');
$table->timestamps();
$table->index(['vatable_id', 'vatable_type']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('vat_transactions');
}
};