mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for notifications (#3427)
* Fix for pdf_variables * Fixes for notification
This commit is contained in:
parent
804153b049
commit
ff5a850e8d
@ -145,6 +145,7 @@ class PreviewController extends BaseController
|
||||
]);
|
||||
|
||||
$invoice->setRelation('client', $client);
|
||||
$invoice->setRelation('company', auth()->user()->company());
|
||||
$invoice->load('client');
|
||||
|
||||
$invoice_design = new Custom((object)request()->input('body'));
|
||||
|
@ -42,6 +42,8 @@ class EntityViewedNotification extends Notification implements ShouldQueue
|
||||
$this->company = $invitation->company;
|
||||
$this->settings = $this->entity->client->getMergedSettings();
|
||||
$this->is_system = $is_system;
|
||||
$this->invitation = $invitation;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,7 +130,7 @@ class EntityViewedNotification extends Notification implements ShouldQueue
|
||||
$amount = Number::formatMoney($this->entity->amount, $this->entity->client);
|
||||
|
||||
$data = [
|
||||
'title' => $subject,
|
||||
'title' => $this->buildSubject(),
|
||||
'message' => ctrans("texts.notification_{$this->entity_name}_viewed",
|
||||
[
|
||||
'amount' => $amount,
|
||||
|
@ -47,7 +47,7 @@ class ClientContactTransformer extends EntityTransformer
|
||||
'contact_key' => $contact->contact_key ?: '',
|
||||
'send_email' => (bool) $contact->send_email,
|
||||
'last_login' => (int)$contact->last_login,
|
||||
'password' => isset($contact->password) ? '*****' : '',
|
||||
'password' => empty($contact->password) ? '' : '**********',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -66,6 +66,9 @@ trait SettingsSaver
|
||||
$settings = (object)$settings;
|
||||
$casts = CompanySettings::$casts;
|
||||
|
||||
if(property_exists($settings, 'pdf_variables'))
|
||||
unset($settings->pdf_variables);
|
||||
|
||||
ksort($casts);
|
||||
|
||||
foreach ($casts as $key => $value) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user