|
|
@@ -224,7 +224,7 @@ class Order extends Api
|
|
|
if($user['id'] == $order_info['user_id']) throw new Exception(__("赠送用户不能是自己"));
|
|
|
|
|
|
$chabao = $ledgerWalletModel::getWalletTotalChaBao($this->auth->id);
|
|
|
- $fees = bcmul($order_info['price'], $order_info->gift_fee, 2);
|
|
|
+ $fees = $order_info->gift_fee> 0? bcmul($order_info['price'], bcdiv($order_info->gift_fee, 100, 2), 2): 0;
|
|
|
if(bccomp($fees, $chabao, 2) > 0) throw new Exception(__("余额不足请前往充值"), 15001);
|
|
|
|
|
|
//添加记录
|