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)
|
public function createEmailTemplates($company)
|
||||||
{
|
{
|
||||||
$templates = [
|
$templates = [
|
||||||
'invoice_new_customer',
|
[
|
||||||
'invoice_remind_customer',
|
'alias' => 'invoice_new_customer',
|
||||||
'invoice_remind_admin',
|
'class' => 'App\Notifications\Sale\Invoice',
|
||||||
'invoice_recur_customer',
|
'name' => 'settings.email.templates.invoice_new_customer',
|
||||||
'invoice_recur_admin',
|
],
|
||||||
'invoice_payment_customer',
|
[
|
||||||
'invoice_payment_admin',
|
'alias' => 'invoice_remind_customer',
|
||||||
'bill_remind_admin',
|
'class' => 'App\Notifications\Sale\Invoice',
|
||||||
'bill_recur_admin',
|
'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) {
|
foreach ($templates as $template) {
|
||||||
EmailTemplate::create([
|
EmailTemplate::create([
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'alias' => $template,
|
'alias' => $template['alias'],
|
||||||
'subject' => trans('email_templates.' . $template . '.subject'),
|
'class' => $template['class'],
|
||||||
'body' => trans('email_templates.' . $template . '.body'),
|
'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