From df23031067a9ecb0abe29747f6cc8b76c3e58692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20=C3=87ak=C4=B1rel?= Date: Thu, 11 Feb 2021 16:08:20 +0300 Subject: [PATCH] Wrong company details on invoice create page --- app/View/Components/Documents/Form/Company.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/View/Components/Documents/Form/Company.php b/app/View/Components/Documents/Form/Company.php index 7931216b1..1c0e1aa10 100644 --- a/app/View/Components/Documents/Form/Company.php +++ b/app/View/Components/Documents/Form/Company.php @@ -3,7 +3,7 @@ namespace App\View\Components\Documents\Form; use App\Abstracts\View\Components\DocumentForm as Component; -use Illuminate\Support\Str; +use App\Models\Common\Company as Model; class Company extends Component { @@ -14,7 +14,7 @@ class Company extends Component */ public function render() { - $company = user()->companies()->first(); + $company = Model::find(session('company_id')); $inputNameType = config('type.' . $this->type . '.route.parameter');