1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Bug fix: notification emails have the wrong entity type

This commit is contained in:
Hillel Coren 2016-02-03 22:53:18 +02:00
parent 0ce9e426d9
commit 5f709f76a8

View File

@ -40,8 +40,8 @@ class UserMailer extends Mailer
return;
}
$entityType = $notificationType == 'approved' ? ENTITY_QUOTE : ENTITY_INVOICE;
$view = "{$entityType}_{$notificationType}";
$entityType = $invoice->getEntityType();
$view = ($notificationType == 'approved' ? ENTITY_QUOTE : ENTITY_INVOICE) . "_{$notificationType}";
$account = $user->account;
$client = $invoice->client;