feat: 完善商品计奖隔离、积分商城兑换券抵扣与下线售后退款入口
这个提交包含在:
@@ -607,11 +607,11 @@ class OrderCreate
|
||||
public function calcVoucher()
|
||||
{
|
||||
$available = 0;
|
||||
if ($this->user && $this->user->id && $this->order_type !== 'score') {
|
||||
if ($this->user && $this->user->id) {
|
||||
$available = (new \addons\shopro\service\partner\VoucherService())->available($this->user->id);
|
||||
}
|
||||
$this->orderData['voucher_available'] = $available;
|
||||
$want = $this->order_type === 'score' ? 0 : max(0, round((float) $this->voucher_fee, 2));
|
||||
$want = max(0, round((float) $this->voucher_fee, 2));
|
||||
$apply = min($want, (float) $available, (float) $this->orderData['pay_fee']);
|
||||
$apply = $apply > 0 ? $apply : 0;
|
||||
$this->orderData['voucher_fee'] = $apply;
|
||||
|
||||
在新工单中引用
屏蔽一个用户