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:
@@ -73,6 +73,9 @@ class MailCommand extends Command
|
|||||||
foreach ($contrat->getContratsPayments() as $payment) {
|
foreach ($contrat->getContratsPayments() as $payment) {
|
||||||
$this->entityManager->remove($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)");
|
$io->warning("Annulation du contrat N°" . $contrat->getNumReservation() . " (Acompte non payé après 3 jours)");
|
||||||
$this->entityManager->remove($contrat);
|
$this->entityManager->remove($contrat);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user