1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for passing settings object into all mail templates

This commit is contained in:
David Bomba 2020-09-19 15:02:34 +10:00
parent 83be13c049
commit 8dd8b83fd3
9 changed files with 11 additions and 8 deletions

View File

@ -55,6 +55,7 @@ class ValidInvoicesRules implements Rule
$unique_array = [];
//todo optimize this into a single query
foreach ($this->input['invoices'] as $invoice) {
$unique_array[] = $invoice['invoice_id'];

View File

@ -114,6 +114,7 @@ class PaymentRepository extends BaseRepository
$payment->invoices()->saveMany($invoices);
//todo optimize this into a single query
foreach ($data['invoices'] as $paid_invoice) {
$invoice = Invoice::whereId($paid_invoice['invoice_id'])->first();
@ -133,6 +134,7 @@ class PaymentRepository extends BaseRepository
$credits = Credit::whereIn('id', $this->transformKeys(array_column($data['credits'], 'credit_id')))->get();
$payment->credits()->saveMany($credits);
//todo optimize into a single query
foreach ($data['credits'] as $paid_credit) {
$credit = Credit::find($this->decodePrimaryKey($paid_credit['credit_id']));

View File

@ -1,4 +1,4 @@
@component('email.template.master', ['design' => 'light'])
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
@slot('header')
@component('email.components.header', ['p' => '', 'logo' => $url])

View File

@ -1,4 +1,4 @@
@component('email.template.master', ['design' => 'light'])
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
@slot('header')
@component('email.components.header', ['p' => $title, 'logo' => $logo])

View File

@ -1,4 +1,4 @@
@component('email.template.master', ['design' => 'light'])
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
@slot('header')
@component('email.components.header', ['p' => $title, 'logo' => $logo])

View File

@ -1,4 +1,4 @@
@component('email.template.master', ['design' => 'light'])
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
@slot('header')
@component('email.components.header', ['p' => 'Payment for your invoice has been completed!', 'logo' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png'])

View File

@ -1,4 +1,4 @@
@component('email.template.master', ['design' => 'light'])
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
@slot('header')
@component('email.components.header')

View File

@ -1,4 +1,4 @@
@component('email.template.master', ['design' => 'light'])
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
@slot('header')
@component('email.components.header')

View File

@ -1,4 +1,4 @@
@component('email.template.master', ['design' => 'light'])
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
@slot('header')
@component('email.components.header', ['p' => 'Your quote was approved!', 'logo' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png'])