E-Invoice - Initial commit main feature integration

This commit is contained in:
Dillon Ngo
2025-05-10 00:48:20 +08:00
parent 05ffa39c4e
commit 8559332d34
50 changed files with 2757 additions and 21 deletions
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddEinvoiceToAddressesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('addresses', function (Blueprint $table) {
$table->boolean('e_invoice')->default(false)->after('billing');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('addresses', function (Blueprint $table) {
$table->dropColumn('e_invoice');
});
}
}
@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddTinToCompaniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('companies', function (Blueprint $table) {
$table->string('tin')->nullable()->after('debtor');
$table->string('msic_code')->nullable()->after('debtor')->comment("5-digit code representing business activity");
$table->timestamp('e_invoice_requested_at')->nullable()->after('debtor');
$table->boolean('e_invoice')->nullable()->default(null)->after('debtor');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('companies', function (Blueprint $table) {
$table->dropColumn('tin');
$table->dropColumn('msic_code');
$table->dropColumn('e_invoice_requested_at');
$table->dropColumn('e_invoice');
});
}
}