fix: code comptable client avec préfixe 411 (norme comptable)

- Customer::generateCodeComptable() : préfixe changé de 'EC' vers '411'
  (compte client 411 du plan comptable général)
- Format : 411_XXXX_XXXXX (ex: 411_0001_SITEC)
- Template : placeholder mis à jour
- Test : assertStringStartsWith('411_')

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-04-03 20:20:51 +02:00
parent 8b6c10b842
commit a2a6e7f4af
3 changed files with 3 additions and 3 deletions

View File

@@ -121,7 +121,7 @@ class Customer
public function generateCodeComptable(): string
{
$prefix = 'EC';
$prefix = '411';
$idPart = str_pad((string) ($this->id ?? 0), 4, '0', STR_PAD_LEFT);
$namePart = '';

View File

@@ -66,7 +66,7 @@
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="md:col-span-2">
<label for="codeComptable" class="block text-xs font-bold uppercase tracking-wider mb-2">Code comptable</label>
<input type="text" id="codeComptable" name="codeComptable" placeholder="Laissez vide pour generation automatique (EC_XXXX_XXXXX)"
<input type="text" id="codeComptable" name="codeComptable" placeholder="Laissez vide pour generation automatique (411_XXXX_XXXXX)"
class="w-full px-4 py-3 input-glass text-sm font-medium font-mono">
</div>
<div>

View File

@@ -43,7 +43,7 @@ class CustomerTest extends TestCase
$c = $this->createCustomer();
$code = $c->generateCodeComptable();
$this->assertNotEmpty($code);
$this->assertStringStartsWith('EC_', $code);
$this->assertStringStartsWith('411_', $code);
}
public function testGenerateCodeComptableWithRaisonSociale(): void