|
|
@@ -57,14 +57,13 @@ class StatCgClass extends BaseClass
|
|
|
$unitPrice = $val->bigPrice ?? 0;
|
|
|
$name = $productInfo[$productId]['name'] ?? '';
|
|
|
$py = $productInfo[$productId]['py'] ?? '';
|
|
|
+ $totalPrice = bcmul($remainNum, $unitPrice, 2);
|
|
|
if (isset($arr[$productId])) {
|
|
|
- $totalPrice = bcmul($remainNum, $unitPrice, 2);
|
|
|
- echo $totalPrice;die;
|
|
|
$arr[$productId]['num'] = bcadd($arr[$productId]['num'], $remainNum);
|
|
|
$arr[$productId]['amount'] = bcadd($arr[$productId]['amount'], $totalPrice, 2);
|
|
|
} else {
|
|
|
- $arr[$productId]['num'] = 0;
|
|
|
- $arr[$productId]['amount'] = 0;
|
|
|
+ $arr[$productId]['num'] = $remainNum;
|
|
|
+ $arr[$productId]['amount'] = $totalPrice;
|
|
|
$arr[$productId]['py'] = $py;
|
|
|
$arr[$productId]['name'] = $name;
|
|
|
}
|