|
|
@@ -284,8 +284,10 @@ class ProductClass extends BaseClass
|
|
|
$list[$k]['price'] = $price;
|
|
|
|
|
|
$cost = $v['cost'] ?? 0;
|
|
|
+ $ml = 0;
|
|
|
if ($price > 0) {
|
|
|
$profit = bcsub($price, $cost, 2);
|
|
|
+ $ml = $profit;
|
|
|
$mll = bcdiv($profit, $price, 3);
|
|
|
$mll = bcmul($mll, 100);
|
|
|
$mll = round($mll, 1);
|
|
|
@@ -293,7 +295,7 @@ class ProductClass extends BaseClass
|
|
|
$mll = 0;
|
|
|
}
|
|
|
$list[$k]['mll'] = $mll;
|
|
|
-
|
|
|
+ $list[$k]['ml'] = $ml;
|
|
|
}
|
|
|
return $list;
|
|
|
}
|