rabin hace 3 días
padre
commit
9a9c1659c5
Se han modificado 1 ficheros con 10 adiciones y 11 borrados
  1. 10 11
      src/place/stock/app/Lib/Info.php

+ 10 - 11
src/place/stock/app/Lib/Info.php

@@ -13,16 +13,6 @@ class Info
             $this->where['sales_type'] = $type;
             $this->where['sales_id'] = $type_id;
             $this->table = 'sales';
-        } else {
-            if (class_exists('\\Place', false)) {
-                if ($place = Dever::get('Place')) {
-                    if ($place->info['sales_type'] && $place->info['sales_id']) {
-                        $this->where['sales_type'] = $place->info['sales_type'];
-                        $this->where['sales_id'] = $place->info['sales_id'];
-                        $this->table = 'sales';
-                    }
-                }
-            }
         }
     }
 
@@ -30,7 +20,16 @@ class Info
     public function yue($source_id, $sku_id, $init = true)
     {
         if ($init) {
-            $this->init();
+            $type = $type_id = 0;
+            if (class_exists('\\Place', false)) {
+                if ($place = Dever::get('Place')) {
+                    if ($place->info['sales_type'] && $place->info['sales_id']) {
+                        $type = $place->info['sales_type'];
+                        $type_id = $place->info['sales_id'];
+                    }
+                }
+            }
+            $this->init($type, $type_id);
         } else {
             $this->where = [];
             $this->table = 'info';