2
0
forked from Wavyzz/dolibarr

Fix amount on renewal for membership

This commit is contained in:
Laurent Destailleur
2023-05-02 12:38:25 +02:00
parent 7b1f83c6c9
commit 889811c6d1
2 changed files with 3 additions and 4 deletions

View File

@@ -775,10 +775,6 @@ if ($rowid > 0) {
print "</table>\n"; print "</table>\n";
print '</div>'; print '</div>';
print '</form>'; print '</form>';
if ($num > $limit) {
print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
}
} else { } else {
dol_print_error($db); dol_print_error($db);
} }

View File

@@ -1579,6 +1579,9 @@ if ($source == 'member' || $source == 'membersubscription') {
if (empty($amount) && !GETPOST('newamount', 'alpha')) { if (empty($amount) && !GETPOST('newamount', 'alpha')) {
$_GET['newamount'] = $member->last_subscription_amount; $_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) { if ($member->type) {