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

Add address2 to email footer

This commit is contained in:
Hillel Coren 2017-08-03 23:25:27 +03:00
parent aa7448f0b4
commit 08b5e398ba
3 changed files with 26 additions and 18 deletions

View File

@ -22,6 +22,28 @@ class AccountPresenter extends Presenter
return $this->entity->name ?: trans('texts.untitled_account');
}
/**
* @return string
*/
public function address()
{
$account = $this->entity;
$str = $account->address1 ?: '';
if ($account->address2 && $str) {
$str .= ', ';
}
$str .= $account->address2;
if ($account->getCityState() && $str) {
$str .= ' - ';
}
return $str . $account->getCityState();
}
/**
* @return string
*/

View File

@ -63,15 +63,8 @@
@section('footer')
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
{{ $account->address1 }}
@if ($account->address1 && $account->getCityState())
-
@endif
{{ $account->getCityState() }}
@if ($account->address1 || $account->getCityState())
{{ $account->present()->address }}
<br />
@endif
@if ($account->website)
<strong><a href="{{ $account->present()->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
@endif

View File

@ -63,15 +63,8 @@
@section('footer')
<p style="color: #A7A6A6; font-size: 13px; line-height: 18px; margin: 0 0 7px; padding: 0;">
{{ $account->address1 }}
@if ($account->address1 && $account->getCityState())
-
@endif
{{ $account->getCityState() }}
@if ($account->address1 || $account->getCityState())
{{ $account->present()->address }}
<br />
@endif
@if ($account->website)
<strong><a href="{{ $account->present()->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
@endif