Bug fixes
This commit is contained in:
parent
eaf73077b1
commit
3767a8a6a7
2 changed files with 5 additions and 3 deletions
|
|
@ -273,7 +273,7 @@ class InvoiceController extends BaseController
|
|||
$lastSent = ($invoice->is_recurring && $invoice->last_sent_date) ? $invoice->recurring_invoices->last() : null;
|
||||
|
||||
$data = array(
|
||||
'clients' => Client::scope()->withTrashed()->with('contacts', 'country')->whereId($invoice->id)->get(),
|
||||
'clients' => Client::scope()->withTrashed()->with('contacts', 'country')->whereId($invoice->client_id)->get(),
|
||||
'entityType' => $entityType,
|
||||
'showBreadcrumbs' => $clone,
|
||||
'invoice' => $invoice,
|
||||
|
|
|
|||
|
|
@ -23,8 +23,10 @@ class ContactMailer extends Mailer
|
|||
$client = $invoice->client;
|
||||
$account = $invoice->account;
|
||||
|
||||
if ($invoice->trashed() || $client->trashed()) {
|
||||
return false;
|
||||
if ($client->trashed()) {
|
||||
return trans('texts.can_not_email_inactive_client');
|
||||
} elseif ($invoice->trashed()) {
|
||||
return trans('texts.can_not_email_inactive_invoice');
|
||||
}
|
||||
|
||||
$account->loadLocalizationSettings($client);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue