fix error signed devis auto created contrat
This commit is contained in:
@@ -58,6 +58,18 @@ class ContratsController extends AbstractController
|
|||||||
return $this->handleResendContract($idSend, $contratsRepository);
|
return $this->handleResendContract($idSend, $contratsRepository);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($idDelete = $request->query->get('idDelete')) {
|
||||||
|
$contat = $contratsRepository->find($idDelete);
|
||||||
|
foreach ($contat->getContratsOptions() as $option)
|
||||||
|
$this->em->remove($option);
|
||||||
|
foreach ($contat->getContratsPayments() as $payment)
|
||||||
|
$this->em->remove($payment);
|
||||||
|
foreach ($contat->getContratsLines() as $line)
|
||||||
|
$this->em->remove($line);
|
||||||
|
$this->em->remove($contat);
|
||||||
|
$this->em->flush();
|
||||||
|
return $this->redirectToRoute('app_crm_contrats');
|
||||||
|
}
|
||||||
$this->appLogger->record('VIEW', 'Consultation de la liste des contrats');
|
$this->appLogger->record('VIEW', 'Consultation de la liste des contrats');
|
||||||
|
|
||||||
$pagination = $paginator->paginate(
|
$pagination = $paginator->paginate(
|
||||||
@@ -498,7 +510,7 @@ class ContratsController extends AbstractController
|
|||||||
|
|
||||||
$this->em->persist($contrat);
|
$this->em->persist($contrat);
|
||||||
$this->em->flush();
|
$this->em->flush();
|
||||||
sleep(5);
|
sleep(15);
|
||||||
|
|
||||||
// Création de la soumission de signature
|
// Création de la soumission de signature
|
||||||
$this->signatureClient->createSubmissionContrat($contrat);
|
$this->signatureClient->createSubmissionContrat($contrat);
|
||||||
|
|||||||
@@ -231,6 +231,10 @@
|
|||||||
|
|
||||||
{# Bouton Renvoyer Mail : Caché si signé OU refusé #}
|
{# Bouton Renvoyer Mail : Caché si signé OU refusé #}
|
||||||
{% if not contrat.isSigned and not contrat.refused %}
|
{% if not contrat.isSigned and not contrat.refused %}
|
||||||
|
<a data-turbo="false" href="{{ path('app_crm_contrats', {idDelete: contrat.id}) }}"
|
||||||
|
class="w-full lg:w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center text-white hover:bg-blue-600 hover:border-blue-400 transition-all group/btn" title="Consulter">
|
||||||
|
<svg class="w-5 h-5 group-hover/btn:scale-110 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"></path></svg>
|
||||||
|
</a>
|
||||||
<a data-turbo="false" href="{{ path('app_crm_contrats', {idSend: contrat.id}) }}"
|
<a data-turbo="false" href="{{ path('app_crm_contrats', {idSend: contrat.id}) }}"
|
||||||
onclick="return confirm('Renvoyer les documents à {{ contrat.customer.email }} ?')"
|
onclick="return confirm('Renvoyer les documents à {{ contrat.customer.email }} ?')"
|
||||||
class="w-full lg:w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center text-white hover:bg-indigo-600 hover:border-indigo-400 transition-all group/btn" title="Renvoyer Mail">
|
class="w-full lg:w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center text-white hover:bg-indigo-600 hover:border-indigo-400 transition-all group/btn" title="Renvoyer Mail">
|
||||||
|
|||||||
Reference in New Issue
Block a user