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; return;
} }
$entityType = $notificationType == 'approved' ? ENTITY_QUOTE : ENTITY_INVOICE; $entityType = $invoice->getEntityType();
$view = "{$entityType}_{$notificationType}"; $view = ($notificationType == 'approved' ? ENTITY_QUOTE : ENTITY_INVOICE) . "_{$notificationType}";
$account = $user->account; $account = $user->account;
$client = $invoice->client; $client = $invoice->client;