添加赠品不能发起退款/退款退货售后操作
parent
c610d058f3
commit
8b3de12160
|
|
@ -47,6 +47,10 @@ class AfterSaleService
|
|||
throw new BizException('申请售后的数量不能大于订单商品数量');
|
||||
}
|
||||
|
||||
if ($orderProduct->isGift() && 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);
|
||||
|
||||
if ($amount == 0 && in_array($params['type'], [AfterSale::TYPE_REFUND])) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue