@extends('header') @section('head') @parent @if ($vendor->showMap()) @endif @stop @section('content')
{!! Former::open('vendors/bulk')->autocomplete('off')->addClass('mainForm') !!}
{!! Former::text('action') !!} {!! Former::text('public_id')->value($vendor->public_id) !!}
@if ( ! $vendor->is_deleted) @can('edit', $vendor) {!! DropdownButton::normal(trans('texts.edit_vendor')) ->withAttributes(['class'=>'normalDropDown']) ->withContents([ ($vendor->trashed() ? false : ['label' => trans('texts.archive_vendor'), 'url' => "javascript:onArchiveClick()"]), ['label' => trans('texts.delete_vendor'), 'url' => "javascript:onDeleteClick()"], ] )->split() !!} @endcan @if ( ! $vendor->trashed()) @can('create', ENTITY_EXPENSE) {!! Button::primary(trans("texts.new_expense")) ->asLinkTo(URL::to("/expenses/create/0/{$vendor->public_id}")) ->appendIcon(Icon::create('plus-sign')) !!} @endcan @endif @endif @if ($vendor->trashed()) @can('edit', $vendor) {!! Button::primary(trans('texts.restore_vendor')) ->appendIcon(Icon::create('cloud-download')) ->withAttributes(['onclick' => 'onRestoreClick()']) !!} @endcan @endif {!! Former::close() !!}

{{ trans('texts.details') }}

@if ($vendor->id_number)

{{ trans('texts.id_number').': '.$vendor->id_number }}

@endif @if ($vendor->vat_number)

{{ trans('texts.vat_number').': '.$vendor->vat_number }}

@endif @if ($vendor->account->customLabel('vendor1') && $vendor->custom_value1) {{ $vendor->account->present()->customLabel('vendor1') . ': ' }} {!! nl2br(e($vendor->custom_value1)) !!}
@endif @if ($vendor->account->customLabel('vendor2') && $vendor->custom_value2) {{ $vendor->account->present()->customLabel('vendor2') . ': ' }} {!! nl2br(e($vendor->custom_value2)) !!}
@endif @if ($vendor->address1) {{ $vendor->address1 }}
@endif @if ($vendor->address2) {{ $vendor->address2 }}
@endif @if ($vendor->getCityState()) {{ $vendor->getCityState() }}
@endif @if ($vendor->country) {{ $vendor->country->getName() }}
@endif @if ($vendor->account->custom_vendor_label1 && $vendor->custom_value1) {{ $vendor->account->custom_vendor_label1 . ': ' . $vendor->custom_value1 }}
@endif @if ($vendor->account->custom_vendor_label2 && $vendor->custom_value2) {{ $vendor->account->custom_vendor_label2 . ': ' . $vendor->custom_value2 }}
@endif @if ($vendor->work_phone) {{ $vendor->work_phone }} @endif @if ($vendor->private_notes)

{!! nl2br(e($vendor->private_notes)) !!}

@endif @if ($vendor->vendor_industry) {{ $vendor->vendor_industry->name }}
@endif @if ($vendor->vendor_size) {{ $vendor->vendor_size->name }}
@endif @if ($vendor->website)

{!! Utils::formatWebsite($vendor->website) !!}

@endif @if ($vendor->language)

{{ $vendor->language->name }}

@endif

{{ $vendor->payment_terms ? trans('texts.payment_terms') . ": " . trans('texts.payment_terms_net') . " " . $vendor->payment_terms : '' }}

{{ trans('texts.contacts') }}

@foreach ($vendor->vendor_contacts as $contact) @if ($contact->first_name || $contact->last_name) {{ $contact->first_name.' '.$contact->last_name }}
@endif @if ($contact->email) {!! HTML::mailto($contact->email, $contact->email) !!}
@endif @if ($contact->phone) {{ $contact->phone }}
@endif @endforeach

{{ trans('texts.standing') }}
{{ trans('texts.balance') }} @foreach ($vendor->getTotalExpenses() as $currency)

{{ Utils::formatMoney($currency->amount, $currency->expense_currency_id) }}

@endforeach

@if ($vendor->showMap())

@endif
@include('list', [ 'entityType' => ENTITY_EXPENSE, 'datatable' => new \App\Ninja\Datatables\ExpenseDatatable(true, true), 'vendorId' => $vendor->public_id, 'url' => url('api/vendor_expenses/' . $vendor->public_id), ])
@stop