From 900884a94adb6abac1b9cef3f8bd5bafddef62e6 Mon Sep 17 00:00:00 2001 From: rogue-spectre Date: Mon, 5 May 2025 04:08:36 +0200 Subject: [PATCH] Close #34038 enable transmitter and bank name to be saved for a donation payment (#34039) * Update clientfourn.php correction of a sql request returning a buggy result. Instead of the sum of the different donations payments the request returned the number of payment multiplied by the global amount of donation. * Update payment.php - Transmitter field and bank name for donation Add transmitter and bank names field to donation payment. Extra added fields are copy-paste from htdoc/compta/paiment.php * Update payment.php --------- Co-authored-by: Laurent Destailleur --- htdocs/don/payment/payment.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index e7f6b60cbc0..a4bd438f0ac 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -124,7 +124,7 @@ if ($action == 'add_payment' && $permissiontoadd) { } if (!$error) { - $result = $payment->addPaymentToBank($user, 'payment_donation', '(DonationPayment)', GETPOSTINT('accountid'), '', ''); + $result = $payment->addPaymentToBank($user, 'payment_donation', '(DonationPayment)', GETPOSTINT('accountid'), GETPOST('chqemetteur'), GETPOST('chqbank')); if (!($result > 0)) { $errmsg = $payment->error; setEventMessages($errmsg, null, 'errors'); @@ -215,12 +215,25 @@ if ($action == 'create') { $form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : "0", "accountid", 0, '', 2); // Show open bank account list print ''; - // Number + // Bank check or transfer number print ''.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; print ''; print ''."\n"; + // Check transmitter + print ''.$langs->trans('CheckTransmitter'); + print ' ('.$langs->trans("ChequeMaker").')'; + print ''; + print ''; + + // Bank name + print ''.$langs->trans('Bank'); + print ' ('.$langs->trans("ChequeBank").')'; + print ''; + print ''; + + // Comments print ''; print ''.$langs->trans("Comments").''; print '';