Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions public/include/config/global.inc.dist.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@
$config['ap_threshold']['min'] = 1;
$config['ap_threshold']['max'] = 250;

/**
* Minimum manual Payout Threshold
* Minimum manual payout amount
* https://github.com/MPOS/php-mpos/wiki/Config-Setup#wiki-manual-payout-threshold
**/
$config['mp_threshold'] = 1;

/**
* Donation thresholds
* Minimum donation amount in percent
Expand Down
2 changes: 2 additions & 0 deletions public/include/pages/account/edit.inc.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
case 'cashOut':
if ($setting->getValue('disable_payouts') == 1 || $setting->getValue('disable_manual_payouts') == 1) {
$_SESSION['POPUP'][] = array('CONTENT' => 'Manual payouts are disabled.', 'TYPE' => 'info');
} else if ($aBalance['confirmed'] < $config['mp_threshold']) {
$_SESSION['POPUP'][] = array('CONTENT' => 'Payout must be greater or equal than ' . $config['mp_threshold'] . '.', 'TYPE' => 'info');
} else if (!$user->getCoinAddress($_SESSION['USERDATA']['id'])) {
$_SESSION['POPUP'][] = array('CONTENT' => 'You have no payout address set.', 'TYPE' => 'errormsg');
} else {
Expand Down
1 change: 1 addition & 0 deletions public/include/smarty_globals.inc.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
'txfee_manual' => $config['txfee_manual'],
'txfee_auto' => $config['txfee_auto'],
'payout_system' => $config['payout_system'],
'mp_threshold' => $config['mp_threshold'],
'ap_threshold' => array(
'min' => $config['ap_threshold']['min'],
'max' => $config['ap_threshold']['max']
Expand Down
7 changes: 6 additions & 1 deletion public/templates/mpos/account/edit/default.tpl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
<p style="padding-left:3px; padding-redight:30px; font-size:10px;">
Please note: a {if $GLOBAL.config.txfee_manual > 0.00001}{$GLOBAL.config.txfee_manual}{else}{$GLOBAL.config.txfee_manual|number_format:"8"}{/if} {$GLOBAL.config.currency} transaction will apply when processing "On-Demand" manual payments <span id="tt"><img width="15px" height="15px" title="This {if $GLOBAL.config.txfee_manual > 0.00001}{$GLOBAL.config.txfee_manual}{else}{$GLOBAL.config.txfee_manual|number_format:"8"}{/if} manual payment transaction fee is a network fee and goes back into the network not the pool." src="site_assets/mpos/images/questionmark.png"></span>
</p>
<p style="padding-left:3px; padding-redight:30px; font-size:10px;">
Minimum Cashout: {$GLOBAL.config.mp_threshold} {$GLOBAL.config.currency}
</p>
<fieldset>
<label>Account Balance</label>
{nocache}<input type="text" value="{$GLOBAL.userdata.balance.confirmed|escape}" {$GLOBAL.config.currency} disabled />{/nocache}
Expand All @@ -109,7 +112,9 @@
<input type="hidden" name="ctoken" value="{$CTOKEN|escape|default:""}" />
<input type="hidden" name="utype" value="withdraw_funds">
{if $GLOBAL.twofactor.enabled && $GLOBAL.twofactor.options.withdraw}
{if $WITHDRAWSENT == 1 && $WITHDRAWUNLOCKED == 1}
{if $GLOBAL.userdata.balance.confirmed|escape < $GLOBAL.config.mp_threshold}
<input type="submit" value="Unlock" class="alt_btn" name="unlock" disabled>
{elseif $WITHDRAWSENT == 1 && $WITHDRAWUNLOCKED == 1}
<input type="submit" value="Cash Out" class="alt_btn">
{elseif $WITHDRAWSENT == 0 && $WITHDRAWUNLOCKED == 1 || $WITHDRAWSENT == 1 && $WITHDRAWUNLOCKED == 0}
<input type="submit" value="Cash Out" class="alt_btn" disabled>
Expand Down