table('goods_receipt_items')->where('goods_receipt_id',$input['receipt'])->where('stock_item_id',$input['stock_item'])->firstOrFail(); $p=['composition'=>$tag,'scope'=>$f['scope'],'dispatcher_host_id'=>$f['validator'],'reviewer_host_id'=>12,'dispatcher_native_id'=>6,'reviewer_native_id'=>3,'warehouse_id'=>$input['warehouse'],'stock_item_id'=>$input['stock_item'],'receipt_item_id'=>$line->id]; $file=$s['root'].'/stock-completion-binding.json';if(is_file($file)&&json_decode(file_get_contents($file),true)!=$p)throw new LogicException('Binding changed; manual reconciliation required'); if(!is_file($file))file_put_contents($file,json_encode($p,JSON_PRETTY_PRINT)); echo json_encode(['passed'=>true,'book'=>$book,'sha256'=>hash_file('sha256',$file)]).PHP_EOL;