|
打开admin/order.php在大约4468行处找到
- /**
- * 退回余额、积分、红包(取消、无效、退货时),把订单使用余额、积分、红包设为0
- * @param array $order 订单信息
- */
- function return_user_surplus_integral_bonus($order)
- {
- /* 处理余额、积分、红包 */
- if ($order[‘user_id’] > 0 && $order[‘surplus’] > 0)
- {
- $surplus = $order[‘money_paid’] < 0 ? $order[‘surplus’] + $order[‘money_paid’]: $order[‘surplus’];
- log_account_change($order[‘user_id’], $surplus, 0, 0, 0, sprintf($GLOBALS[‘_LANG’][‘return_order_surplus’], $order[‘order_sn’]));
- $GLOBALS[‘db’]->query(“UPDATE “. $GLOBALS[‘ecs’]->table(‘order_info’) . ” SET `order_amount` = ‘0’ WHERE `order_id` =”. $order[‘order_id’]);
- }
-
- if ($order[‘user_id’] > 0 && $order[‘integral’] > 0)
- {
- log_account_change($order[‘user_id’], 0, 0, 0, $order[‘integral’], sprintf($GLOBALS[‘_LANG’][‘return_order_integral’], $order[‘order_sn’]));
- }
-
- if ($order[‘bonus_id’] > 0)
- {
- unuse_bonus($order[‘bonus_id’]);
- }
-
- /* 修改订单 */
- $arr = array(
- ‘bonus_id’ => 0,
- ‘bonus’ => 0,
- ‘integral’ => 0,
- ‘integral_money’ => 0,
- ‘surplus’ => 0
- );
- update_order($order[‘order_id’], $arr);
- }
改成
- /**
- * 退回余额、积分、红包(取消、无效、退货时),把订单使用余额、积分、红包设为0
- * @param array $order 订单信息
- */
- function return_user_surplus_integral_bonus($order)
- {
- /* 处理余额、积分、红包 */
- if ($order[‘user_id’] > 0 && $order[‘surplus’] > 0)
- {
- $surplus = $order[‘money_paid’] < 0 ? $order[‘surplus’] + $order[‘money_paid’]-$order[‘shipping_fee’] : $order[‘surplus’];
- log_account_change($order[‘user_id’], $surplus, 0, 0, 0, sprintf($GLOBALS[‘_LANG’][‘return_order_surplus’], $order[‘order_sn’]));
- $GLOBALS[‘db’]->query(“UPDATE “. $GLOBALS[‘ecs’]->table(‘order_info’) . ” SET `order_amount` = ‘0’ WHERE `order_id` =”. $order[‘order_id’]);
- }
-
- if ($order[‘user_id’] > 0 && $order[‘integral’] > 0)
- {
- log_account_change($order[‘user_id’], 0, 0, 0, $order[‘integral’], sprintf($GLOBALS[‘_LANG’][‘return_order_integral’], $order[‘order_sn’]));
- }
-
- if ($order[‘bonus_id’] > 0)
- {
- unuse_bonus($order[‘bonus_id’]);
- }
-
- /* 修改订单 */
- $arr = array(
- ‘bonus_id’ => 0,
- ‘bonus’ => 0,
- ‘integral’ => 0,
- ‘integral_money’ => 0,
- ‘surplus’ => 0
- );
- update_order($order[‘order_id’], $arr);
- }
|