feat(CommissionProductLogic): 修改门店利润计算方式,防止负数出现

This commit is contained in:
mkm 2024-08-31 21:15:15 +08:00
parent 7c5a651b3e
commit 594efabae1

View File

@ -261,7 +261,12 @@ class CommissionProductLogic extends BaseLogic
$number3 = bcsub($total_price, $purchase_price, 2);
//门店利润
$store_number = bcsub($number3, $number2, 2);
if($number3<=0){
$store_number = 0;
}else{
$store_number = bcsub($number3, $number2, 2);
}
//队长
$data[] = [