From 9ac66661ba6a5c3af10f2e1dd7d59bca418ed219 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 27 Feb 2020 17:29:40 +1100 Subject: [PATCH] Fixes for tests (#3389) * Fixes for tests * payment --- app/Notifications/NewAccountCreated.php | 3 ++- app/Services/Invoice/MarkPaid.php | 1 + .../views/email/admin/download_files.blade.php | 16 ++++++++-------- resources/views/email/admin/generic.blade.php | 11 ++++++----- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/Notifications/NewAccountCreated.php b/app/Notifications/NewAccountCreated.php index 12e69ecb5079..38718b1c6fd8 100644 --- a/app/Notifications/NewAccountCreated.php +++ b/app/Notifications/NewAccountCreated.php @@ -59,7 +59,8 @@ class NewAccountCreated extends Notification implements ShouldQueue 'message' => ctrans('texts.new_signup_text', ['user' => $user_name, 'email' => $email, 'ip' => $ip]), 'url' => config('ninja.web_url'), 'button' => ctrans('texts.account_login'), - 'signature' => '', + 'signature' => $this->company->settings->email_signature, + 'logo' => $this->company->present()->logo(), ]; diff --git a/app/Services/Invoice/MarkPaid.php b/app/Services/Invoice/MarkPaid.php index 1d9e5dd6eafb..6cf1230faaec 100644 --- a/app/Services/Invoice/MarkPaid.php +++ b/app/Services/Invoice/MarkPaid.php @@ -45,6 +45,7 @@ class MarkPaid extends AbstractService $payment = PaymentFactory::create($this->invoice->company_id, $this->invoice->user_id); $payment->amount = $this->invoice->balance; + $payment->applied = $this->invoice->balance; $payment->number = $this->getNextPaymentNumber($this->invoice->client); $payment->status_id = Payment::STATUS_COMPLETED; $payment->client_id = $this->invoice->client_id; diff --git a/resources/views/email/admin/download_files.blade.php b/resources/views/email/admin/download_files.blade.php index a06f79d3b096..2c58fef1d6cd 100644 --- a/resources/views/email/admin/download_files.blade.php +++ b/resources/views/email/admin/download_files.blade.php @@ -1,19 +1,19 @@ -@component('email.components.layout') +@component('email.template.master', ['design' => 'light']) @slot('header') - @component('email.components.header', ['p' => '']) - Company Logo + @component('email.components.header', ['p' => '', 'logo' => $url]) + @lang('texts.download') @endcomponent + +@endslot + +@slot('greeting') @endslot @lang('texts.download_timeframe') -@component('email.components.button', ['url' => $url]) - @lang('texts.download') -@endcomponent - @slot('signature') - InvoiceNinja + InvoiceNinja (contact@invoiceninja.com) @endslot @slot('footer') diff --git a/resources/views/email/admin/generic.blade.php b/resources/views/email/admin/generic.blade.php index 1051cbfd0a4e..dbc4c3170d68 100644 --- a/resources/views/email/admin/generic.blade.php +++ b/resources/views/email/admin/generic.blade.php @@ -1,19 +1,20 @@ -@component('email.components.layout') +@component('email.template.master', ['design' => 'light']) @slot('header') - @component('email.components.header', ['p' => '']) - @lang($title) + @component('email.components.header', ['p' => $title, 'logo' => $logo]) @endcomponent @endslot -@lang($message) +@slot('greeting') + @lang($message) +@endslot @component('email.components.button', ['url' => $url]) @lang($button) @endcomponent @slot('signature') - {{ $signature }} + {{ $signature }} @endslot @slot('footer')