Updates for invoice service auto bill standard invoices

This commit is contained in:
David Bomba 2024-06-04 07:42:11 +10:00
parent 630a163ecd
commit b054f57286
2 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,9 @@ class ExpenseFilters extends QueryFilters
}) })
->orWhereHas('vendor', function ($q) use ($filter) { ->orWhereHas('vendor', function ($q) use ($filter) {
$q->where('name', 'like', '%'.$filter.'%'); $q->where('name', 'like', '%'.$filter.'%');
})
->orWhereHas('client', function ($q) use ($filter) {
$q->where('name', 'like', '%'.$filter.'%');
}); });
}); });
} }

View File

@ -570,7 +570,7 @@ class InvoiceService
$this->invoice->exchange_rate = $this->invoice->client->setExchangeRate(); $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; $this->invoice->auto_bill_enabled = true;
} }