From ef447bacbffb5d71914ec70b7eac924b53bb7a2a Mon Sep 17 00:00:00 2001 From: lvessiller Date: Thu, 18 Nov 2021 12:12:30 +0100 Subject: [PATCH 1/2] NEW add form confirm hook in paiement card --- htdocs/compta/paiement.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 2740b09427a..fbb6abdedae 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,7 +841,16 @@ 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 "\n"; From cdde6ecf94bd381432a4d5ce08e50040ca137e22 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Thu, 18 Nov 2021 12:17:02 +0100 Subject: [PATCH 2/2] NEW add form confirm hook in paiement card --- htdocs/compta/paiement.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index fbb6abdedae..29682460d3a 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -853,6 +853,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $formconfirm = $hookmanager->resPrint; } + // Print form confirm + print $formconfirm; + print "\n"; } }