From 889811c6d18f099f7ff09c6b51a187a3e4cbdd75 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 May 2023 12:38:25 +0200 Subject: [PATCH] Fix amount on renewal for membership --- htdocs/adherents/type.php | 4 ---- htdocs/public/payment/newpayment.php | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 2f10848a827..8b1fa4e9e10 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -775,10 +775,6 @@ if ($rowid > 0) { print "\n"; print ''; print ''; - - if ($num > $limit) { - print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); - } } else { dol_print_error($db); } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index e3257bd659c..10afcf58ab1 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1579,6 +1579,9 @@ if ($source == 'member' || $source == 'membersubscription') { if (empty($amount) && !GETPOST('newamount', 'alpha')) { $_GET['newamount'] = $member->last_subscription_amount; } + if (!empty($member->last_subscription_amount) && !GETPOSTISSET('newamount') && is_numeric($amount)) { + $amount = max($member->last_subscription_amount, $amount); + } } if ($member->type) {