diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index 2740b09427a..29682460d3a 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -802,6 +802,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
dol_print_error($db);
}
+ $formconfirm = '';
// Save button
if ($action != 'add_paiement') {
@@ -840,9 +841,21 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$text .= '
'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed");
print '';
}
- print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type, $langs->trans('ReceivedCustomersPayments'), $text, 'confirm_paiement', $formquestion, $preselectedchoice);
+ $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type, $langs->trans('ReceivedCustomersPayments'), $text, 'confirm_paiement', $formquestion, $preselectedchoice);
}
+ // Call Hook formConfirm
+ $parameters = array('formConfirm' => $formconfirm);
+ $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ if (empty($reshook)) {
+ $formconfirm .= $hookmanager->resPrint;
+ } elseif ($reshook > 0) {
+ $formconfirm = $hookmanager->resPrint;
+ }
+
+ // Print form confirm
+ print $formconfirm;
+
print "\n";
}
}