Initial commit - Physiotherapy Clinic Management System
This commit is contained in:
commit
dbb326f2cc
300 files changed
+144285
No files matched your search
@@ -0,0 +1,36 @@
|
||||
<?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('invoices', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('invoice_number')->unique();
|
||||
$table->foreignId('patient_id')->constrained('patients');
|
||||
$table->foreignId('treatment_id')->nullable()->constrained('treatments');
|
||||
$table->date('invoice_date');
|
||||
$table->date('due_date');
|
||||
$table->decimal('subtotal', 15, 2)->default(0);
|
||||
$table->decimal('tax_amount', 15, 2)->default(0);
|
||||
$table->decimal('discount_amount', 15, 2)->default(0);
|
||||
$table->decimal('total_amount', 15, 2)->default(0);
|
||||
$table->decimal('paid_amount', 15, 2)->default(0);
|
||||
$table->enum('status', ['draft', 'sent', 'paid', 'partial', 'overdue', 'cancelled'])->default('draft');
|
||||
$table->foreignId('currency_id')->constrained('currencies');
|
||||
$table->text('notes')->nullable();
|
||||
$table->foreignId('created_by')->constrained('users');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('invoices');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user