修复 主题管理退费

This commit is contained in:
Discuz! 2017-02-07 10:18:23 +08:00
parent 384daa9335
commit fb2ebbce8d
2 changed files with 5 additions and 4 deletions

View File

@ -27,7 +27,7 @@ if(!submitcheck('modsubmit')) {
$payment = C::t('common_credit_log')->count_stc_by_relatedid($_G['tid'], $_G['setting']['creditstransextra'][1]); $payment = C::t('common_credit_log')->count_stc_by_relatedid($_G['tid'], $_G['setting']['creditstransextra'][1]);
$payment['payers'] = intval($payment['payers']); $payment['payers'] = intval($payment['payers']);
$payment['netincome'] = intval($payment['netincome']); $payment['income'] = intval($payment['income']);
include template('forum/topicadmin_action'); include template('forum/topicadmin_action');
@ -43,8 +43,9 @@ if(!submitcheck('modsubmit')) {
$logarray = array(); $logarray = array();
foreach(C::t('common_credit_log')->fetch_all_by_uid_operation_relatedid(0, 'BTC', $_G['tid']) as $log) { foreach(C::t('common_credit_log')->fetch_all_by_uid_operation_relatedid(0, 'BTC', $_G['tid']) as $log) {
$totalamount += $log['amount']; $amount = abs($log['extcredits'.$_G['setting']['creditstransextra'][1]]);
$amountarray[$log['amount']][] = $log['uid']; $totalamount += $amount;
$amountarray[$amount][] = $log['uid'];
} }
updatemembercount($thread['authorid'], array($_G['setting']['creditstransextra'][1] => -$totalamount)); updatemembercount($thread['authorid'], array($_G['setting']['creditstransextra'][1] => -$totalamount));

View File

@ -82,7 +82,7 @@
</tr> </tr>
<tr> <tr>
<th>{lang pay_author_income}</th> <th>{lang pay_author_income}</th>
<td>$payment[netincome] {$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][unit]}{$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][title]}</td> <td>$payment[income] {$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][unit]}{$_G[setting][extcredits][$_G['setting']['creditstransextra'][1]][title]}</td>
</tr> </tr>
</table> </table>
<!--{elseif $_GET[action] == 'split'}--> <!--{elseif $_GET[action] == 'split'}-->