findOrFail($f['foreign_award']);$user=User::findOrFail($award->created_by);auth()->setUser($user);$order=app(PurchaseWorkflow::class)->issue($user,$award);$f['foreign_order']=$order->id;$f['foreign_order_line']=$order->items()->firstOrFail()->id;file_put_contents($s['root'].'/native-fixture.json',json_encode($f,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));file_put_contents($s['root'].'/invoice-negative-prepared.json',json_encode(['passed'=>true,'foreign_order_prepared'=>true,'main_book_changed'=>false],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));