소스 검색

解决21-03-25日志中 盘点报错问题

haozi 5 년 전
부모
커밋
bb6ede076e
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/Services/InventoryAccountService.php

+ 1 - 0
app/Services/InventoryAccountService.php

@@ -338,6 +338,7 @@ class InventoryAccountService
     //盘点库存
     public function stockInventory($id,$location,$barcode,$count,$inventoryAccountId){
         $inventoryAccountMission=InventoryAccountMission::with(['commodity.barcodes','stockInventoryPersons'])->find($id);
+        if (!$inventoryAccountMission)return null;
         $this->盘点($inventoryAccountId,$count,$inventoryAccountMission);
         $request=[
             'location'=>$location,