修改发起售后判断
parent
372158ed76
commit
1777186ba6
|
|
@ -38,8 +38,8 @@ class AfterSaleService
|
|||
throw new BizException('赠品不能发起退款/退款退货操作');
|
||||
}
|
||||
|
||||
if ($orderProduct->order->total_amount == 0 && in_array($params['type'], [AfterSale::TYPE_REFUND, Aftersale::TYPE_REFUND_AND_RETURN])) {
|
||||
throw new BizException('订单支付金额为0的商品不能发起退款/退款退货操作');
|
||||
if ($orderProduct->order->is_change && in_array($params['type'], [AfterSale::TYPE_REFUND, Aftersale::TYPE_REFUND_AND_RETURN])) {
|
||||
throw new BizException('换货后的商品不能发起退款/退款退货操作');
|
||||
}
|
||||
|
||||
$amount = ($num == $orderProduct->quantity) ? $orderProduct->total_amount : bcmul(bcdiv($orderProduct->total_amount, $orderProduct->quantity), $num);
|
||||
|
|
|
|||
Loading…
Reference in New Issue