Browse Source

成本管理

shish 3 years ago
parent
commit
1368ddc2c3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      biz-ghs/order/classes/StockInOrderClass.php

+ 3 - 3
biz-ghs/order/classes/StockInOrderClass.php

@@ -170,9 +170,9 @@ class StockInOrderClass extends BaseClass
             $dayItem[] = ['mainId' => $v['mainId'], 'itemId' => $v['productId'], 'ptItemId' => $v['itemId'], 'time' => $time];
 
             if ($carSale == 1) {
-                //调拨入库之后,如果门店是车销,则成本也同步
-                $cost = $v['price'] ?? 0;
-                ProductClass::updateById($v['productId'], ['cost' => $cost]);
+                //调拨入库之后,如果门店是车销,则成本也同步 ssh 20221113
+                $currentCost = $v['itemPrice'] ?? 0;
+                ProductClass::updateById($v['productId'], ['cost' => $currentCost]);
             }
 
         }