Procházet zdrojové kódy

Merge branch 'master' into dev

shish před 8 měsíci
rodič
revize
91b63df82c

+ 2 - 2
app-ghs/controllers/ConsoleController.php

@@ -30,14 +30,14 @@ class ConsoleController extends BaseController
         $lsDebt = $lsDebt === null ? 0 : $lsDebt;
         $lsDebt = $lsDebt === null ? 0 : $lsDebt;
         $totalDebt = bcadd($pfDebt, $lsDebt, 2);
         $totalDebt = bcadd($pfDebt, $lsDebt, 2);
 
 
-        $itemList = ItemClass::getAllByCondition(['mainId' => $this->mainId], null, 'id,stock,cost,virtualStock,delStatus', null, true);
+        $itemList = ItemClass::getAllByCondition(['mainId' => $this->mainId], null, 'id,stock,avCost,cost,virtualStock,delStatus', null, true);
         $totalItemNum = 0;
         $totalItemNum = 0;
         $totalCost = 0;
         $totalCost = 0;
         if (!empty($itemList)) {
         if (!empty($itemList)) {
             foreach ($itemList as $item) {
             foreach ($itemList as $item) {
                 if ($item->virtualStock == 0 && $item->delStatus == 0) {
                 if ($item->virtualStock == 0 && $item->delStatus == 0) {
                     $stock = $item->stock ?? 0;
                     $stock = $item->stock ?? 0;
-                    $cost = $item->cost ?? 0;
+                    $cost = $item->avCost ?? 0;
                     $totalItemNum = bcadd($stock, $totalItemNum, 2);
                     $totalItemNum = bcadd($stock, $totalItemNum, 2);
                     $currentCost = bcmul($stock, $cost, 2);
                     $currentCost = bcmul($stock, $cost, 2);
                     $totalCost = bcadd($currentCost, $totalCost, 2);
                     $totalCost = bcadd($currentCost, $totalCost, 2);

+ 5 - 0
app-hd/controllers/ItemController.php

@@ -109,7 +109,12 @@ class ItemController extends BaseController
                 util::fail('不是你的客户哦,编号55236');
                 util::fail('不是你的客户哦,编号55236');
             }
             }
         }
         }
+
         $level = 0;
         $level = 0;
+        if($requestType == 'itemList'){
+            //如果是花材列表页,则显示三个价格,其他地方,比如拆散和报损那些,只显示零售价
+            $level = 1;
+        }
         $field = '*';
         $field = '*';
 
 
         $result = ProductClass::getList($field, $where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC]);
         $result = ProductClass::getList($field, $where, ['inTurn' => SORT_DESC, 'actualSold' => SORT_DESC]);