Zhouzhendong пре 4 година
родитељ
комит
71adcd8fe2
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      app/Services/MaterialBoxService.php

+ 1 - 1
app/Services/MaterialBoxService.php

@@ -105,7 +105,7 @@ sql;
         /** @var MaterialBox|\stdClass $box */
         //$box = MaterialBox::query()->find($boxId);
         //if (!$this->getBoxLocation($box->code))return false;
-        if (StationTaskMaterialBox::query()->select(DB::raw(1))->where("status","!=",'完成')->where("material_box_id",$boxId)->first())return false;
+        if (StationTaskMaterialBox::query()->select(DB::raw(1))->whereNotIn("status",['完成','取消'])->where("material_box_id",$boxId)->first())return false;
         return true;
     }
 }