added email templates to update
This commit is contained in:
parent
3b155007af
commit
ee2f214a8b
@ -195,23 +195,61 @@ class Version200 extends Listener
|
||||
public function createEmailTemplates($company)
|
||||
{
|
||||
$templates = [
|
||||
'invoice_new_customer',
|
||||
'invoice_remind_customer',
|
||||
'invoice_remind_admin',
|
||||
'invoice_recur_customer',
|
||||
'invoice_recur_admin',
|
||||
'invoice_payment_customer',
|
||||
'invoice_payment_admin',
|
||||
'bill_remind_admin',
|
||||
'bill_recur_admin',
|
||||
[
|
||||
'alias' => 'invoice_new_customer',
|
||||
'class' => 'App\Notifications\Sale\Invoice',
|
||||
'name' => 'settings.email.templates.invoice_new_customer',
|
||||
],
|
||||
[
|
||||
'alias' => 'invoice_remind_customer',
|
||||
'class' => 'App\Notifications\Sale\Invoice',
|
||||
'name' => 'settings.email.templates.invoice_remind_customer',
|
||||
],
|
||||
[
|
||||
'alias' => 'invoice_remind_admin',
|
||||
'class' => 'App\Notifications\Sale\Invoice',
|
||||
'name' => 'settings.email.templates.invoice_remind_admin',
|
||||
],
|
||||
[
|
||||
'alias' => 'invoice_recur_customer',
|
||||
'class' => 'App\Notifications\Sale\Invoice',
|
||||
'name' => 'settings.email.templates.invoice_recur_customer',
|
||||
],
|
||||
[
|
||||
'alias' => 'invoice_recur_admin',
|
||||
'class' => 'App\Notifications\Sale\Invoice',
|
||||
'name' => 'settings.email.templates.invoice_recur_admin',
|
||||
],
|
||||
[
|
||||
'alias' => 'invoice_payment_customer',
|
||||
'class' => 'App\Notifications\Portal\PaymentReceived',
|
||||
'name' => 'settings.email.templates.invoice_payment_customer',
|
||||
],
|
||||
[
|
||||
'alias' => 'invoice_payment_admin',
|
||||
'class' => 'App\Notifications\Portal\PaymentReceived',
|
||||
'name' => 'settings.email.templates.invoice_payment_admin',
|
||||
],
|
||||
[
|
||||
'alias' => 'bill_remind_admin',
|
||||
'class' => 'App\Notifications\Purchase\Bill',
|
||||
'name' => 'settings.email.templates.bill_remind_admin',
|
||||
],
|
||||
[
|
||||
'alias' => 'bill_recur_admin',
|
||||
'class' => 'App\Notifications\Purchase\Bill',
|
||||
'name' => 'settings.email.templates.bill_recur_admin',
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($templates as $template) {
|
||||
EmailTemplate::create([
|
||||
'company_id' => $company->id,
|
||||
'alias' => $template,
|
||||
'subject' => trans('email_templates.' . $template . '.subject'),
|
||||
'body' => trans('email_templates.' . $template . '.body'),
|
||||
'alias' => $template['alias'],
|
||||
'class' => $template['class'],
|
||||
'name' => $template['name'],
|
||||
'subject' => trans('email_templates.' . $template['alias'] . '.subject'),
|
||||
'body' => trans('email_templates.' . $template['alias'] . '.body'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user