shish 4 år sedan
förälder
incheckning
f5a4dcdd08
1 ändrade filer med 8 tillägg och 0 borttagningar
  1. 8 0
      app-hd/controllers/WorkController.php

+ 8 - 0
app-hd/controllers/WorkController.php

@@ -2,6 +2,7 @@
 
 namespace hd\controllers;
 
+use biz\shop\classes\ShopExtClass;
 use bizHd\goods\classes\CategoryClass;
 use bizHd\goods\classes\GoodsClass;
 use bizHd\order\classes\OrderClass;
@@ -54,6 +55,13 @@ class WorkController extends BaseController
         }
         if (isset($get['fromType']) && is_numeric($get['fromType'])) {
             $where['fromType'] = $get['fromType'];
+        } else {
+            $shopId = $this->shopId;
+            $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
+            $mtAlone = $ext->mtAlone ?? 0;
+            if ($mtAlone == 1) {
+                $where['fromType'] = ['in', [1, 2, 3]];
+            }
         }
         if (isset($get['searchType'])) {
             if ($get['searchType'] == 0) {