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

{{ $vendor->getDisplayName() }}

{{ 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->address1) {{ $vendor->address1 }}
@endif @if ($vendor->address2) {{ $vendor->address2 }}
@endif @if ($vendor->getCityState()) {{ $vendor->getCityState() }}
@endif @if ($vendor->country) {{ $vendor->country->name }}
@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)

{{ $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') }} {{ Utils::formatMoney($totalexpense, $vendor->getCurrencyId()) }}

@if ($vendor->hasAddress())

@endif
{!! Datatable::table() ->addColumn( trans('texts.expense_date'), trans('texts.amount'), trans('texts.public_notes')) ->setUrl(url('api/expenseVendor/' . $vendor->public_id)) ->setCustomValues('entityType', 'expenses') ->setOptions('sPaginationType', 'bootstrap') ->setOptions('bFilter', false) ->setOptions('aaSorting', [['0', 'asc']]) ->render('datatable') !!}
@stop