close #363 Fixed: Sending "pay now" button to customer not able to login
This commit is contained in:
parent
630b354327
commit
0590e2ed91
@ -47,8 +47,7 @@ class Invoice extends Notification
|
|||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
{
|
{
|
||||||
$message = (new MailMessage)
|
$message = (new MailMessage)
|
||||||
->line(trans('invoices.notification.message', ['amount' => money($this->invoice->amount, $this->invoice->currency_code, true), 'customer' => $this->invoice->customer_name]))
|
->line(trans('invoices.notification.message', ['amount' => money($this->invoice->amount, $this->invoice->currency_code, true), 'customer' => $this->invoice->customer_name]));
|
||||||
->action(trans('invoices.notification.button'), url('customers/invoices', $this->invoice->id, true));
|
|
||||||
|
|
||||||
// Override per company as Laravel doesn't read config
|
// Override per company as Laravel doesn't read config
|
||||||
$message->from(config('mail.from.address'), config('mail.from.name'));
|
$message->from(config('mail.from.address'), config('mail.from.name'));
|
||||||
@ -60,6 +59,10 @@ class Invoice extends Notification
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->invoice->customer->user) {
|
||||||
|
$message->action(trans('invoices.notification.button'), url('customers/invoices', $this->invoice->id, true));
|
||||||
|
}
|
||||||
|
|
||||||
return $message;
|
return $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user