fix error signed devis auto created contrat

This commit is contained in:
Serreau Jovann
2026-02-19 13:44:27 +01:00
parent c076b6c92d
commit 6b24f7bb0f

View File

@@ -185,7 +185,12 @@ class ContratController extends AbstractController
$type = $contratsPayment->getType();
$state = $contratsPayment->getState();
$amount = $contratsPayment->getAmount();
if ($type == "accompte") {
if ($state == "complete") {
$soldeRestant -= $amount;
$paymentList[] = $contratsPayment;
}
} else {
if ($type !== "caution" && $type !== "solde" && $type !== "solde_partiel") {
// Should match 'accompte' or other types
if ($state == "complete") {
@@ -203,6 +208,7 @@ class ContratController extends AbstractController
}
}
}
}
if ($request->query->has('act') && $request->query->get('act') === 'accomptePay') {
$response = $this->handlePayment(