TaxRateReport: avoid additional queries in the result items loop

(cherry picked from commit d00d1e926628e5e0e83eb7570716eb3f332d6b27)
This commit is contained in:
Aleksander V. Dyomin 2019-08-05 13:16:03 +03:00
parent de6919d37c
commit 67cb2b3215

View File

@ -31,7 +31,9 @@ class TaxRateReport extends AbstractReport
->withArchived()
->with('contacts', 'user')
->with(['invoices' => function ($query) {
$query->with('invoice_items')
$query
->with('account', 'client')
->with('invoice_items')
->withArchived()
->invoices()
->where('is_public', '=', true);