Customer entity : - Ajout geoLat et geoLong (DECIMAL 10,7 nullable) - Migration : ALTER TABLE customer ADD geo_lat, geo_long Géocodage automatique : - API recherche entreprise : récupère siege.latitude/longitude directement - Fallback API IGN (data.geopf.fr/geocodage/search) si coords absentes mais adresse remplie — appelé côté PHP dans geocodeIfNeeded() - Champs hidden geoLat/geoLong dans le formulaire Code comptable 411_ : - Préfixe "411_" affiché en dur (glass-dark, non modifiable) - L'utilisateur saisit uniquement la partie après (ex: 0001_DUPON) - Si vide : génération automatique via generateUniqueCodeComptable() - Concaténation '411_' + saisie dans le contrôleur Tests mis à jour : testGeoCoordinates, HttpClientInterface ajouté dans tous les appels create(), Customer 100% (48/48, 82/82) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34 lines
925 B
PHP
34 lines
925 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 Version20260404092101 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 geo_lat NUMERIC(10, 7) DEFAULT NULL');
|
|
$this->addSql('ALTER TABLE customer ADD geo_long NUMERIC(10, 7) 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 geo_lat');
|
|
$this->addSql('ALTER TABLE customer DROP geo_long');
|
|
}
|
|
}
|