Commit 6551960b authored by hangjun83's avatar hangjun83

增加全部退货的判断逻辑

parent f72988bc
......@@ -237,6 +237,10 @@ class BhOrdersService
throw new \LogicException('退货数量大于购买数量',500);
}
if($orderitem['si_num'] == $refundInfo->refund_nums){
throw new \LogicException('本功能不支持全部退货,如果需要全部退货请移步百化系统后台进行操作!',500);
}
//查询是否已经开票,如果开票不能进行退货
$dpdetail = $dbConnect->table('dpdetail')
->where('si_id',$orderitem['si_id'])
......@@ -368,6 +372,9 @@ class BhOrdersService
if($num > 0 || ($num == 0 && $refundInfo->handle_fee > 0)){
$updatedItem['cancel_si_id'] = $updatedItem['create']['si_id'];
}
}else{
$updatedItem['create'] = $soItem;
$updatedItem['cancel_si_id'] = $updatedItem['create']['si_id'];
}
$updatedItem['total'] = $currentAmount;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment