From 3da665dfaa8dfc2e2b66f29ef4917940b80786dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 6 May 2023 00:35:40 +0300 Subject: [PATCH] n+1 --- app/Http/Controllers/Purchases/Bills.php | 2 +- app/Http/Controllers/Sales/Invoices.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Purchases/Bills.php b/app/Http/Controllers/Purchases/Bills.php index a11de6368..53d47dce1 100644 --- a/app/Http/Controllers/Purchases/Bills.php +++ b/app/Http/Controllers/Purchases/Bills.php @@ -31,7 +31,7 @@ class Bills extends Controller */ public function index() { - $bills = Document::bill()->with('contact', 'items', 'last_history', 'transactions')->collect(['issued_at' => 'desc']); + $bills = Document::bill()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions')->collect(['issued_at' => 'desc']); return $this->response('purchases.bills.index', compact('bills')); } diff --git a/app/Http/Controllers/Sales/Invoices.php b/app/Http/Controllers/Sales/Invoices.php index b5c279640..2bca766ec 100644 --- a/app/Http/Controllers/Sales/Invoices.php +++ b/app/Http/Controllers/Sales/Invoices.php @@ -32,7 +32,7 @@ class Invoices extends Controller */ public function index() { - $invoices = Document::invoice()->with('contact', 'items', 'last_history', 'transactions')->collect(['document_number'=> 'desc']); + $invoices = Document::invoice()->with('contact', 'items', 'item_taxes', 'last_history', 'transactions')->collect(['document_number'=> 'desc']); return $this->response('sales.invoices.index', compact('invoices')); }