fix error signed devis auto created contrat
This commit is contained in:
@@ -185,21 +185,27 @@ class ContratController extends AbstractController
|
||||
$type = $contratsPayment->getType();
|
||||
$state = $contratsPayment->getState();
|
||||
$amount = $contratsPayment->getAmount();
|
||||
|
||||
if ($type !== "caution" && $type !== "solde" && $type !== "solde_partiel") {
|
||||
// Should match 'accompte' or other types
|
||||
if ($type == "accompte") {
|
||||
if ($state == "complete") {
|
||||
$soldeRestant -= $amount;
|
||||
$paymentList[] = $contratsPayment;
|
||||
}
|
||||
$paymentList[] = $contratsPayment;
|
||||
} else {
|
||||
if ($state == "complete") {
|
||||
if ($type == "caution") {
|
||||
$paymentCaution[] = $contratsPayment;
|
||||
} elseif ($type == "solde_partiel" || $type == "solde") {
|
||||
$paymentCtaList[] = $contratsPayment;
|
||||
if ($type !== "caution" && $type !== "solde" && $type !== "solde_partiel") {
|
||||
// Should match 'accompte' or other types
|
||||
if ($state == "complete") {
|
||||
$soldeRestant -= $amount;
|
||||
}
|
||||
$paymentList[] = $contratsPayment;
|
||||
} else {
|
||||
if ($state == "complete") {
|
||||
if ($type == "caution") {
|
||||
$paymentCaution[] = $contratsPayment;
|
||||
} elseif ($type == "solde_partiel" || $type == "solde") {
|
||||
$paymentCtaList[] = $contratsPayment;
|
||||
$soldeRestant -= $amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user