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:
parent
83be13c049
commit
8dd8b83fd3
@ -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'];
|
||||
|
||||
|
@ -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']));
|
||||
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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'])
|
||||
|
@ -1,4 +1,4 @@
|
||||
@component('email.template.master', ['design' => 'light'])
|
||||
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
|
||||
|
||||
@slot('header')
|
||||
@component('email.components.header')
|
||||
|
@ -1,4 +1,4 @@
|
||||
@component('email.template.master', ['design' => 'light'])
|
||||
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
|
||||
|
||||
@slot('header')
|
||||
@component('email.components.header')
|
||||
|
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user