|
@@ -58,7 +58,7 @@ class CgRefundClass extends BaseClass
|
|
|
|
|
|
|
|
|
|
|
|
|
// 组装 orderItem linqh 2021.1.25
|
|
// 组装 orderItem linqh 2021.1.25
|
|
|
- public static function groupOrderItem($ghsItemInfo, $orderSn)
|
|
|
|
|
|
|
+ public static function groupOrderItem($ghsItemInfo, $orderSn, $cgItemList)
|
|
|
{
|
|
{
|
|
|
$productData = self::getProductMapData($ghsItemInfo);
|
|
$productData = self::getProductMapData($ghsItemInfo);
|
|
|
//写入详情表
|
|
//写入详情表
|
|
@@ -77,7 +77,7 @@ class CgRefundClass extends BaseClass
|
|
|
$tmp['itemNum'] = ProductClass::mergeItemNum($v['bigNum'], $v['smallNum'], $unitNum);// 数量
|
|
$tmp['itemNum'] = ProductClass::mergeItemNum($v['bigNum'], $v['smallNum'], $unitNum);// 数量
|
|
|
$tmp['name'] = $productData[$productId]['name'] ?? '';
|
|
$tmp['name'] = $productData[$productId]['name'] ?? '';
|
|
|
$tmp['cover'] = $productData[$productId]['cover'] ?? '';
|
|
$tmp['cover'] = $productData[$productId]['cover'] ?? '';
|
|
|
- $tmp['itemPrice'] = $productData[$productId]['price'] ?? 0; //当时售卖的价格
|
|
|
|
|
|
|
+ $tmp['itemPrice'] = $cgItemList[$productId]['price'] ?? 0; //当时售卖的价格
|
|
|
$tmp['totalPrice'] = bcmul($tmp['itemPrice'], $tmp['itemNum'], 2);
|
|
$tmp['totalPrice'] = bcmul($tmp['itemPrice'], $tmp['itemNum'], 2);
|
|
|
$tmp['itemCost'] = $productData[$productId]['cost'] ?? 0; //当时成本价
|
|
$tmp['itemCost'] = $productData[$productId]['cost'] ?? 0; //当时成本价
|
|
|
$stockFormat = ProductClass::formatStock($tmp['itemStock'], $unitNum); // 库存总单位数量转大小单位的数量
|
|
$stockFormat = ProductClass::formatStock($tmp['itemStock'], $unitNum); // 库存总单位数量转大小单位的数量
|