Commit 8007f1ac authored by hangjun83's avatar hangjun83

百化工具类bug修复

parent 40c47280
...@@ -322,7 +322,12 @@ class BhOrdersService ...@@ -322,7 +322,12 @@ class BhOrdersService
// 判断是否有期货,如果有用现货数量做退货 // 判断是否有期货,如果有用现货数量做退货
if($sum > $dpdSum){ if($sum > $dpdSum){
//期货数量 //期货数量
if($dpdSum > 0){
$futuresNum = $sum - $dpdSum; $futuresNum = $sum - $dpdSum;
}else{
$futuresNum = $refundInfo->refund_nums;
}
if($futuresNum > 0 && $refundInfo->handle_fee > 0){ if($futuresNum > 0 && $refundInfo->handle_fee > 0){
throw new \LogicException('包含期货数据,并且期货不支持手续费',500); throw new \LogicException('包含期货数据,并且期货不支持手续费',500);
} }
...@@ -404,7 +409,7 @@ class BhOrdersService ...@@ -404,7 +409,7 @@ class BhOrdersService
else { else {
if($futuresNum > 0){ if($futuresNum > 0){
$updateArr['si_num'] = $orderitem['si_num'] - $futuresNum; $updateArr['si_num'] = $orderitem['si_num'] - $currentProcessNums;
//$updateArr['si_assigned_num'] = $orderitem['si_assigned_num']; //$updateArr['si_assigned_num'] = $orderitem['si_assigned_num'];
}else{ }else{
$updateArr['si_num'] = bcsub($orderitem['si_num'], $currentProcessNums); // 如果数量只有1,且退货数量相等 $updateArr['si_num'] = bcsub($orderitem['si_num'], $currentProcessNums); // 如果数量只有1,且退货数量相等
...@@ -434,7 +439,7 @@ class BhOrdersService ...@@ -434,7 +439,7 @@ class BhOrdersService
$createArr['si_discount'] = $soItem['si_discount']; $createArr['si_discount'] = $soItem['si_discount'];
$createArr['si_amount'] = bcmul($soItem['si_discount'], $currentProcessNums, 2); $createArr['si_amount'] = bcmul($soItem['si_discount'], $currentProcessNums, 2);
} }
$createArr['si_num'] = $currentProcessNums; //$createArr['si_num'] = $currentProcessNums;
if($futuresNum > 0){ if($futuresNum > 0){
$createArr['si_assigned_num'] = 0; $createArr['si_assigned_num'] = 0;
}else{ }else{
......
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