|
|
@@ -857,6 +857,7 @@ class OrderClass extends BaseClass
|
|
|
$totalBigNum = 0;
|
|
|
$totalSmallNum = 0;
|
|
|
$kind = 0;
|
|
|
+ $bookSavePrice = $order['bookSavePrice'] ?? 0;
|
|
|
$itemStat = [];
|
|
|
if (!empty($list)) {
|
|
|
$ids = array_column($list, 'productId');
|
|
|
@@ -866,10 +867,14 @@ class OrderClass extends BaseClass
|
|
|
$productId = $val['productId'] ?? 0;
|
|
|
$currentInfo = $productInfo[$productId];
|
|
|
$currentPrice = $productInfo[$productId]['price'] ?? 0;
|
|
|
- $list[$key]['currentHdPrice'] = floatval($currentPrice);
|
|
|
+ if ($bookSavePrice == 0) {
|
|
|
+ $list[$key]['currentHdPrice'] = floatval($currentPrice);
|
|
|
+ } else {
|
|
|
+ $list[$key]['currentHdPrice'] = $list['xhUnitPrice'] ?? 0;
|
|
|
+ }
|
|
|
$list[$key]['property'] = '';
|
|
|
- $list[$key]['cost'] = $currentInfo['cost']??0;
|
|
|
- $list[$key]['stock'] = $currentInfo['stock'] ? floatval($currentInfo['stock']):0;
|
|
|
+ $list[$key]['cost'] = $currentInfo['cost'] ?? 0;
|
|
|
+ $list[$key]['stock'] = $currentInfo['stock'] ? floatval($currentInfo['stock']) : 0;
|
|
|
$price = $val['price'];
|
|
|
$totalPrice = stringUtil::calcAdd($totalPrice, $price);
|
|
|
$kind++;
|