Skip to content

Commit

Permalink
Fix edit of amount on public payment page
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 27, 2024
1 parent ef41ebb commit c83d362
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions htdocs/public/payment/newpayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1673,11 +1673,11 @@
if (empty($amount) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) {
$amount = getDolGlobalString('MEMBER_NEWFORM_AMOUNT');
}
// - If not set, we accept to have amount defined as parameter (for backward compatibility).
//if (empty($amount)) {
// $amount = (GETPOST('amount') ? price2num(GETPOST('amount', 'alpha'), 'MT', 2) : '');
//}
// - If a min is set, we take it into account
// - If a new amount was posted from the form
if ($caneditamount && GETPOSTISSET('newamount') && GETPOSTFLOAT('newamount', 'MT') > 0) {
$amount = GETPOSTFLOAT('newamount', 'MT');

Check failure on line 1678 in htdocs/public/payment/newpayment.php

View workflow job for this annotation

GitHub Actions / pre-commit / pre-commit

Tabs must be used to indent lines; spaces are not allowed
}
// - If a min is set or an amount from the posted form, we take them into account
$amount = max(0, (float) $amount, (float) getDolGlobalInt("MEMBER_MIN_AMOUNT"));

// Amount
Expand Down

0 comments on commit c83d362

Please sign in to comment.