mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Added company website
This commit is contained in:
parent
c5c5ff3458
commit
e893d74b41
@ -642,6 +642,7 @@ class AccountController extends BaseController
|
||||
$account->id_number = trim(Input::get('id_number'));
|
||||
$account->vat_number = trim(Input::get('vat_number'));
|
||||
$account->work_email = trim(Input::get('work_email'));
|
||||
$account->website = trim(Input::get('website'));
|
||||
$account->work_phone = trim(Input::get('work_phone'));
|
||||
$account->address1 = trim(Input::get('address1'));
|
||||
$account->address2 = trim(Input::get('address2'));
|
||||
|
@ -66,7 +66,7 @@ class PublicClientController extends BaseController
|
||||
return trans("texts.activity_{$model->activity_type_id}", $data);
|
||||
})
|
||||
->addColumn('balance', function ($model) { return Utils::formatMoney($model->balance, $model->currency_id, $model->country_id); })
|
||||
->addColumn('adjustment', function ($model) { return $model->adjustment != 0 ? Utils::wrapAdjustment($model->adjustment, $model->currency_id) : ''; })
|
||||
->addColumn('adjustment', function ($model) { return $model->adjustment != 0 ? Utils::wrapAdjustment($model->adjustment, $model->currency_id, $model->country_id) : ''; })
|
||||
->make();
|
||||
}
|
||||
|
||||
|
@ -887,4 +887,14 @@ class Utils
|
||||
|
||||
return $interval->y == 0;
|
||||
}
|
||||
|
||||
public static function addHttp($url)
|
||||
{
|
||||
if (!preg_match("~^(?:f|ht)tps?://~i", $url)) {
|
||||
$url = "http://" . $url;
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php namespace App\Ninja\Presenters;
|
||||
|
||||
use Utils;
|
||||
use Laracasts\Presenter\Presenter;
|
||||
|
||||
class AccountPresenter extends Presenter {
|
||||
@ -9,4 +10,8 @@ class AccountPresenter extends Presenter {
|
||||
return $this->entity->name ?: trans('texts.untitled_account');
|
||||
}
|
||||
|
||||
public function website()
|
||||
{
|
||||
return Utils::addHttp($this->entity->website);
|
||||
}
|
||||
}
|
@ -31287,6 +31287,7 @@ NINJA.accountDetails = function(invoice) {
|
||||
{text:account.name, style: ['accountName']},
|
||||
{text:account.id_number},
|
||||
{text:account.vat_number},
|
||||
{text:account.website},
|
||||
{text:account.work_email},
|
||||
{text:account.work_phone}
|
||||
];
|
||||
|
@ -408,6 +408,7 @@ NINJA.accountDetails = function(invoice) {
|
||||
{text:account.name, style: ['accountName']},
|
||||
{text:account.id_number},
|
||||
{text:account.vat_number},
|
||||
{text:account.website},
|
||||
{text:account.work_email},
|
||||
{text:account.work_phone}
|
||||
];
|
||||
|
@ -48,7 +48,7 @@ There are two options:
|
||||
### Documentation
|
||||
* [Ubuntu and Apache](http://blog.technerdservices.com/index.php/2015/04/techpop-how-to-install-invoice-ninja-on-ubuntu-14-04/)
|
||||
* [Debian and Nginx](https://www.rosehosting.com/blog/install-invoice-ninja-on-a-debian-7-vps/)
|
||||
* [User Guide](https://www.invoiceninja.com/user-guide/)
|
||||
* [User Guide](https://www.invoiceninja.com/app-user-guide/)
|
||||
* [Developer Guide](https://www.invoiceninja.com/knowledgebase/developer-guide/)
|
||||
* [API Documentation](https://www.invoiceninja.com/knowledgebase/api-documentation/)
|
||||
* [Support Forum](https://www.invoiceninja.com/forums/forum/support/)
|
||||
|
@ -22,7 +22,7 @@
|
||||
->addClass('warn-on-exit')
|
||||
->autocomplete('on')
|
||||
->rules([
|
||||
'name' => 'required'
|
||||
'name' => 'required',
|
||||
]) !!}
|
||||
|
||||
{{ Former::populate($account) }}
|
||||
@ -41,6 +41,7 @@
|
||||
{!! Former::text('name') !!}
|
||||
{!! Former::text('id_number') !!}
|
||||
{!! Former::text('vat_number') !!}
|
||||
{!! Former::text('website') !!}
|
||||
{!! Former::text('work_email') !!}
|
||||
{!! Former::text('work_phone') !!}
|
||||
{!! Former::file('logo')->max(2, 'MB')->accept('image')->inlineHelp(trans('texts.logo_help')) !!}
|
||||
|
@ -71,7 +71,7 @@
|
||||
@endif
|
||||
|
||||
@if ($account->website)
|
||||
<strong><a href="{{ $account->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
|
||||
<strong><a href="{{ $account->present()->website }}" style="color: #A7A6A6; text-decoration: none; font-weight: bold; font-size: 10px;">{{ $account->website }}</a></strong>
|
||||
@endif
|
||||
</p>
|
||||
</td>
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
div.address-details {
|
||||
color: #666666;
|
||||
font-size: 15px;
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
div.col-md-4-left {
|
||||
@ -108,8 +110,14 @@
|
||||
@if ($account->getCityState())
|
||||
{{ $account->getCityState() }}<br/>
|
||||
@endif
|
||||
@if ($account->country)
|
||||
{{ $account->country->name }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-3 address-details">
|
||||
@if ($account->website)
|
||||
<i class="fa fa-globe" style="width: 20px"></i><a href="{{ $account->website }}" target="_blank">{{ $account->website }}</a><br/>
|
||||
@endif
|
||||
@if ($account->work_phone)
|
||||
<i class="fa fa-phone" style="width: 20px"></i>{{ $account->work_phone }}<br/>
|
||||
@endif
|
||||
|
Loading…
Reference in New Issue
Block a user