diff --git a/app/Models/Account.php b/app/Models/Account.php index 3f994e44ecb0..9c35cdea000b 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -220,13 +220,7 @@ class Account extends Eloquent public function getCustomDateFormat() { - $format = $this->datetime_format ? $this->datetime_format->format : DEFAULT_DATETIME_FORMAT; - - if ($this->military_time) { - $format = str_replace('g:i a', 'H:i', $format); - } - - return $format; + return $this->date_format ? $this->date_format->format : DEFAULT_DATE_FORMAT; } public function formatMoney($amount, $client = null, $hideSymbol = false) diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php index b5ba4a1002cc..219f8104321d 100644 --- a/app/Ninja/Mailers/ContactMailer.php +++ b/app/Ninja/Mailers/ContactMailer.php @@ -149,7 +149,6 @@ class ContactMailer extends Mailer $account->loadLocalizationSettings($client); $invoice = $payment->invoice; - $view = 'payment_confirmation'; $accountName = $account->getDisplayName(); $emailTemplate = $account->getEmailTemplate(ENTITY_PAYMENT); $emailSubject = $invoice->account->getEmailSubject(ENTITY_PAYMENT); @@ -189,6 +188,12 @@ class ContactMailer extends Mailer $subject = $this->processVariables($emailSubject, $variables); $data['invoice_id'] = $payment->invoice->id; + if ($account->email_design_id == EMAIL_DESIGN_PLAIN) { + $view = 'payment_confirmation'; + } else { + $view = 'design' . ($account->email_design_id - 1); + } + if ($user->email && $contact->email) { $this->sendTo($contact->email, $user->email, $accountName, $subject, $view, $data); } diff --git a/resources/views/accounts/details.blade.php b/resources/views/accounts/details.blade.php index 3c3fffcfcaeb..56dc8f33e73c 100644 --- a/resources/views/accounts/details.blade.php +++ b/resources/views/accounts/details.blade.php @@ -52,7 +52,7 @@