Commit d7ef271d authored by hangjun83's avatar hangjun83

1、修复bug

parent d19e6a5c
......@@ -294,16 +294,16 @@ class BhOrdersService
->where('si_id',$orderitem['si_id'])
->sum('si_num');
// 如果是全部退货并且没有手续费的情况
if($sum == $refundInfo->refund_nums && $refundInfo->handle_fee == 0){
throw new \LogicException('本功能不支持全部退货,如果需要全部退货请移步百化系统后台进行操作!',500);
}
// 获取实际现货数量
$dpdSum = $dbConnect->table('dpdetail')
->where('si_id',$orderitem['si_id'])
->sum('dpd_num');
// 如果是全部退货并且没有手续费的情况
if($sum == $refundInfo->refund_nums && $refundInfo->handle_fee == 0 && $dpdSum > 0){
throw new \LogicException('本功能不支持全部退货,如果需要全部退货请移步百化系统后台进行操作!',500);
}
// 判断是否有期货,如果有用现货数量做退货
if($sum > $dpdSum){
//期货数量
......@@ -321,6 +321,7 @@ class BhOrdersService
$spotNums = 0;
}
}else{
$futuresNum = $futuresNum - $refundInfo->refund_nums;
if($dpdSum == 0){
$spotNums = 0;
}
......
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