Files
crm_ecosplay/migrations/Version20260404090416.php
Serreau Jovann ec0c0366c4 feat: auto-détection type entreprise + RNA pour associations
Customer entity :
- Ajout champ rna (VARCHAR 20, nullable) pour identifiant RNA associations
- Migration : ALTER TABLE customer ADD rna

Recherche entreprise (entreprise-search.js) :
- resolveTypeCompany() : mapping nature_juridique vers type formulaire
  92xx/91xx/93xx → association, 10xx → auto-entrepreneur,
  54xx/55xx → sarl, 57xx → sas, 52xx → eurl, 65xx → sci
- Auto-remplissage typeCompany depuis nature_juridique
- Récupération RNA depuis complements.identifiant_association
- Badge "Association" affiché dans les résultats si nature_juridique 92xx
- RNA affiché dans les résultats (ex: RNA W502004724)

Template create.html.twig :
- Ajout champ "RNA (associations)" dans la section Entreprise

ClientsController :
- populateCustomerData : ajout setRna depuis le formulaire

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:04:43 +02:00

32 lines
765 B
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20260404090416 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE customer ADD rna VARCHAR(20) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE customer DROP rna');
}
}