fix: fiabiliser les fiches animales et vaccinations

This commit is contained in:
Alexandre NOEL 2026-09-15 21:11:21 +02:00
commit 361bef8561
20 changed files with 157 additions and 65 deletions

View file

@ -376,7 +376,10 @@ trait AnimalRecordActions
}
$identificationDate = trim((string) ($_POST['identification_date'] ?? ''));
$identificationRegistration = (string) ($_POST['identification_registration_status'] ?? 'unknown');
if (!in_array($identificationRegistration, ['unknown', 'pending', 'registered'], true)) {
if ($identificationRegistration === 'pending') {
$identificationRegistration = 'change_pending';
}
if (!in_array($identificationRegistration, ['unknown', 'registered', 'change_pending', 'owner_changed'], true)) {
$identificationRegistration = 'unknown';
}
if ($chip_id === '') {