panlumeng 3 years ago
parent
commit
0ec1ec805b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/admin/controller/Allot.php

+ 1 - 1
app/admin/controller/Allot.php

@@ -302,7 +302,7 @@ class Allot extends BaseController
             if($da>0) {
                 foreach ($dain as $value) {
                     $st = Db::name("good_type")->alias("b")->join("good a", "a.good_code = b.good_code", "left")
-                        ->join("good_stock c", "c.good_type_code = b.type_code", "left")->where(['wsm_code' => $wsm_out, 'good_type_code' => $value['type_code'], 'b.is_del' => 0, 'a.is_del' => 0])->where("c.is_del=0 or c.is_del is null")
+                        ->join("good_stock c", "c.good_type_code = b.type_code", "left")->where(['wsm_code' => $wsm_out, 'good_type_code' => $value['good_code'], 'b.is_del' => 0, 'a.is_del' => 0])->where("c.is_del=0 or c.is_del is null")
                         ->field("b.type_code,a.good_name,a.unit,c.wsm_code,c.usable_stock,c.good_type_code,c.wait_out_stock,c.wait_in_stock")->find();
                   // var_dump(Db::name("good_type")->getLastSql());
                     if (empty($st)) {