|
|
@@ -237,6 +237,11 @@ class ProductClass extends BaseClass
|
|
|
$list[$k]['skPrice'] = bcadd($v['discountPrice'], $currentAddPrice, 2);
|
|
|
}
|
|
|
$list[$k]['price'] = $price;
|
|
|
+ $cost = $v['cost'] ?? 0;
|
|
|
+ $profit = bcsub($price, $cost, 2);
|
|
|
+ $mll = bcdiv($profit, $cost, 3);
|
|
|
+ $mll = round($mll, 2);
|
|
|
+ $list[$k]['mll'] = $mll;
|
|
|
}
|
|
|
return $list;
|
|
|
}
|