diff --git a/app/Filters/ExpenseFilters.php b/app/Filters/ExpenseFilters.php index 6c580cb719..0d133e96ce 100644 --- a/app/Filters/ExpenseFilters.php +++ b/app/Filters/ExpenseFilters.php @@ -44,6 +44,9 @@ class ExpenseFilters extends QueryFilters }) ->orWhereHas('vendor', function ($q) use ($filter) { $q->where('name', 'like', '%'.$filter.'%'); + }) + ->orWhereHas('client', function ($q) use ($filter) { + $q->where('name', 'like', '%'.$filter.'%'); }); }); } diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 0476aae980..9c8de34a26 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -570,7 +570,7 @@ class InvoiceService $this->invoice->exchange_rate = $this->invoice->client->setExchangeRate(); } - if ($is_recurring && $this->invoice->client->getSetting('auto_bill_standard_invoices')) { + if (!$is_recurring && $this->invoice->client->getSetting('auto_bill_standard_invoices')) { $this->invoice->auto_bill_enabled = true; }