fix: supprimer les ProductReserves avant annulation contrat acompte non reçu

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-18 08:45:14 +01:00
parent 5350dc8219
commit 81f74092b4

View File

@@ -73,6 +73,9 @@ class MailCommand extends Command
foreach ($contrat->getContratsPayments() as $payment) {
$this->entityManager->remove($payment);
}
foreach ($contrat->getProductReserves() as $productReserve) {
$this->entityManager->remove($productReserve);
}
$io->warning("Annulation du contrat N°" . $contrat->getNumReservation() . " (Acompte non payé après 3 jours)");
$this->entityManager->remove($contrat);
} else {