|
@@ -191,7 +191,7 @@ class account_helper
|
|
|
$pred->pay_bonus($bonus_rate);
|
|
|
}
|
|
|
|
|
|
- public static function order_cancel($order_sn,$member_id)
|
|
|
+ public static function order_cancel($order_sn,$member_id,$ignore = false)
|
|
|
{
|
|
|
$mod_order = Model('order');
|
|
|
$order = $mod_order->getOrderInfo(array('order_sn' => $order_sn));
|
|
@@ -204,7 +204,13 @@ class account_helper
|
|
|
$bonus_rate = unserialize($bonus_rate);
|
|
|
}
|
|
|
|
|
|
- if(intval($pd_amount * 100 + 0.5) <= 0) return;
|
|
|
+ if($ignore == false)
|
|
|
+ {
|
|
|
+ if(intval($pd_amount * 100 + 0.5) <= 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$params = \bonus\parameters::order_cancel($bonus_rate);
|
|
|
foreach ($params as $param)
|
|
|
{
|
|
@@ -326,7 +332,7 @@ class account_helper
|
|
|
public static function withhold_bonus($rate,$amount,$member_id)
|
|
|
{
|
|
|
$rates = array(intval($rate) => doubleval($amount));
|
|
|
- $ret = bonus_helper::withold($member_id,$rates);
|
|
|
+ $ret = bonus_helper::withold($member_id,$rates,bonus_helper::send_bonus_withold);
|
|
|
if($ret) {
|
|
|
$pred = new predeposit_helper($member_id);
|
|
|
$pred->reduce_pred($amount);
|