feat: add Devis and BesoinInformatique modules
- Devis: CRUD complet, génération PDF (dompdf), paramètres (DevisSetting) - BesoinInformatique: CRUD complet avec gestion matériels/licences - Migrations pour les 3 nouvelles tables - Navigation mise à jour dans AuthenticatedLayout Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
030d76af53
commit
7312c7640b
@@ -0,0 +1,39 @@
|
||||
<?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('devis', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('number')->unique();
|
||||
$table->string('title');
|
||||
$table->string('destinataire_type'); // 'commune', 'service_interne'
|
||||
$table->string('destinataire_nom');
|
||||
$table->string('referent')->nullable();
|
||||
$table->date('date_devis');
|
||||
$table->string('status')->default('draft'); // 'draft', 'sent', 'accepted', 'rejected'
|
||||
$table->json('items')->nullable(); // details of items (type, designation, quantity, unit_price, total_price)
|
||||
$table->decimal('total_ht', 15, 2)->default(0.00);
|
||||
$table->decimal('tva_rate', 5, 2)->default(20.00);
|
||||
$table->decimal('total_ttc', 15, 2)->default(0.00);
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('devis');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user