2024-11-29 12:39:20 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
return new class extends Migration
|
|
|
|
{
|
|
|
|
public function up(): void
|
|
|
|
{
|
|
|
|
Schema::create('invoice_reports', function (Blueprint $table) {
|
|
|
|
$table->id();
|
2024-12-02 12:21:01 -05:00
|
|
|
$table->string('internal_id')->nullable();
|
2024-11-29 12:39:20 -05:00
|
|
|
|
|
|
|
$table->foreignId('customer_id')->constrained();
|
|
|
|
|
|
|
|
$table->date('date_start');
|
|
|
|
$table->date('date_end');
|
|
|
|
$table->boolean('filter_paid');
|
|
|
|
$table->float('subtotal', 2)->default(0);
|
|
|
|
$table->float('pst', 2)->default(0);
|
|
|
|
$table->float('gst', 2)->default(0);
|
2024-12-10 15:28:14 -08:00
|
|
|
// $table->float('total', 2)->default(0);
|
2024-11-29 12:39:20 -05:00
|
|
|
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function down(): void
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('invoice_reports');
|
|
|
|
}
|
|
|
|
};
|