Skip to content

Commit

Permalink
fix amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Hystepik committed Jan 31, 2024
1 parent deb9176 commit a051f21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion htdocs/adherents/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@
$res = $adht->fetch($tmpmember->typeid);
if ($res > 0) {
$amount = $adht->amount;
if (!empty($tmpmember->last_subscription_amount) && !GETPOSTISSET('newamount') && is_numeric($amount)) {
$amount = max($tmpmember->last_subscription_amount, $amount);
}
$amount = max(0, getDolGlobalString('MEMBER_MIN_AMOUNT'), $amount);
$result = $tmpmember->subscription($now, $amount);
if ($result < 0) {
$error++;
Expand Down Expand Up @@ -778,7 +782,7 @@
$objecttmp = new Adherent($db);
$trackid = 'mem'.$object->id;
if ($massaction == 'createsubscription') {
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassSubsriptionCreation"), $langs->trans("ConfirmMassSubsriptionCreationQuestion", count($toselect)), "createsubscription", $formquestion, '', 0, 200, 500, 1);
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassSubsriptionCreation"), $langs->trans("ConfirmMassSubsriptionCreationQuestion", count($toselect)), "createsubscription", '', '', 0, 200, 500, 1);
}
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';

Expand Down

0 comments on commit a051f21

Please sign in to comment.