shish hace 4 años
padre
commit
42d7a760db
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app-ghs/controllers/StatItemController.php

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

@@ -39,8 +39,8 @@ class StatItemController extends BaseController
         foreach ($list as $key => $val) {
             $itemId = $val['itemId'] ?? 0;
             $idsData[$itemId] = 0;
-            $num = $val['num'] ?? 0;
-            $amount = $val['amount'] ?? 0;
+            $num = bcsub($val['num'], $val['refundNum'], 2);
+            $amount = bcsub($val['amount'], $val['refundAmount'], 2);
             $name = $productInfo[$itemId]['name'] ?? '';
             $stat[$itemId]['productId'] = $itemId;
             $stat[$itemId]['name'] = $name;