1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2015-12-31 12:23:39 +02:00
parent c2c51360dd
commit 35bb36fd34
3 changed files with 8 additions and 9 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -52,7 +52,7 @@
<div class="col-lg-4 col-sm-4"></div>
<div class="col-lg-8 col-sm-8">
<a href="/{{ $account->getLogoPath().'?no_cache='.time() }}" target="_blank">
{!! HTML::image($account->getLogoPath().'?no_cache='.time(), 'Logo', ['width' => 200]) !!}
{!! HTML::image($account->getLogoPath().'?no_cache='.time(), 'Logo', ['max-width' => 200]) !!}
</a> &nbsp;
<a href="#" onclick="deleteLogo()">{{ trans('texts.remove_logo') }}</a>
</div>