@extends('layouts.main') @section('page-title') {{ __('Vendor Detail') }} @endsection @section('page-breadcrumb') {{ __('Vendor Detail') }} @endsection @push('scripts') @endpush @push('css') @endpush @php $company_settings = getCompanyAllSetting(); $company_settings['bill_shipping_display'] = isset($company_settings['bill_shipping_display']) ? $company_settings['bill_shipping_display'] : 'off'; @endphp @section('page-action')
@permission('bill create') {{ __('Create Bill') }} @endpermission @if ($vendor->user->is_disable == 1) @permission('vendor edit')
@endpermission @endif
@endsection @section('content')
{{ __('Vendor Info') }}

{{ $vendor->name }}

{{ $vendor->email }}

{{ $vendor->contact }}

@if (!empty($customFields) && count($vendor->customField) > 0) @foreach ($customFields as $field)

{{ $field->name }} : {{ !empty($vendor->customField[$field->id]) ? $vendor->customField[$field->id] : '-' }}

@endforeach @endif

{{ __('Billing Info') }}

{{ $vendor->billing_name }}

{{ $vendor->billing_address }}

{{ $vendor->billing_city . ' ,' . $vendor->billing_state . ' ,' . $vendor->billing_zip }}

{{ $vendor->billing_country }}

{{ $vendor->billing_phone }}

{{ __('Shipping Info') }}

@if ($company_settings['bill_shipping_display'] == 'on')

{{ $vendor->shipping_name }}

{{ $vendor->shipping_address }}

{{ $vendor->shipping_city . ' ,' . $vendor->shipping_state . ' ,' . $vendor->shipping_zip }}

{{ $vendor->shipping_country }}

{{ $vendor->shipping_phone }}

@endif

{{ __('Company Info') }}

@php $totalBillSum = $vendor->vendorTotalBillSum($vendor['id']); $totalBill = $vendor->vendorTotalBill($vendor['id']); $averageSale = $totalBillSum != 0 ? $totalBillSum / $totalBill : 0; @endphp

{{ __('Vendor Id') }}

{{ Workdo\Account\Entities\Vender::vendorNumberFormat($vendor->vendor_id) }}

{{ __('Total Sum of Bills') }}

{{ currency_format_with_sym($totalBillSum) }}

{{ __('Date of Creation') }}

{{ company_date_formate($vendor->created_at) }}

{{ __('Quantity of Bills') }}

{{ $totalBill }}

{{ __('Balance') }}

{{ currency_format_with_sym($vendor->balance) }}

{{ __('Average Sales') }}

{{ currency_format_with_sym($averageSale) }}

{{ __('Overdue') }}

{{ currency_format_with_sym($vendor->vendorOverdue($vendor->id)) }}
@if (Laratrust::hasPermission('bill edit') || Laratrust::hasPermission('bill delete') || Laratrust::hasPermission('bill show') || Laratrust::hasPermission('bill duplicate')) @endif @forelse ($vendor->vendorBill($vendor->id) as $bill) @if (Laratrust::hasPermission('bill edit') || Laratrust::hasPermission('bill delete') || Laratrust::hasPermission('bill show')) @endif @empty @include('layouts.nodatafound') @endforelse
{{ __('Bill') }} {{ __('Bill Date') }} {{ __('Due Date') }} {{ __('Due Amount') }} {{ __('Status') }} {{ __('Action') }}
@permission('bill show') {{ Workdo\Account\Entities\Bill::billNumberFormat($bill->bill_id) }} @else {{ Workdo\Account\Entities\Bill::billNumberFormat($bill->bill_id) }} @endpermission {{ company_date_formate($bill->bill_date) }} @if ($bill->due_date < date('Y-m-d'))

{{ company_date_formate($bill->due_date) }}

@else {{ company_date_formate($bill->due_date) }} @endif
{{ currency_format_with_sym($bill->getDue()) }} @if ($bill->status == 0) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 1) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 2) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 3) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @elseif($bill->status == 4) {{ __(\App\Models\Invoice::$statues[$bill->status]) }} @endif @permission(' bill duplicate')
{!! Form::open([ 'method' => 'get', 'route' => ['bill.duplicate', $bill->id], 'id' => 'bill-duplicate-form-' . $bill->id, ]) !!} {!! Form::close() !!}
@endpermission @permission('bill show') @endpermission @permission('bill edit') @endpermission @permission('bill delete')
{{ Form::open(['route' => ['bill.destroy', $bill->id], 'class' => 'm-0']) }} @method('DELETE') {{ Form::close() }}
@endpermission
@stack('vendor_purchase_div')
@if (Laratrust::hasPermission('expense payment delete') || Laratrust::hasPermission('expense payment edit')) @endif @forelse ($vendor->vendorPayment($vendor->id) as $payment) @if (module_is_active('ProductService')) @else @endif @if (Laratrust::hasPermission('expense payment delete') || Laratrust::hasPermission('expense payment edit')) @endif @empty @include('layouts.nodatafound') @endforelse
{{ __('Date') }} {{ __('Amount') }} {{ __('Account') }} {{ __('Category') }} {{ __('Reference') }} {{ __('Description') }} {{ __('Payment Receipt') }}{{ __('Action') }}
{{ company_date_formate($payment->date) }} {{ currency_format_with_sym($payment->amount) }} {{ !empty($payment->bankAccount) ? $payment->bankAccount->bank_name . ' ' . $payment->bankAccount->holder_name : '' }} {{ !empty($payment->category) ? $payment->category->name : '-' }} -{{ !empty($payment->reference) ? $payment->reference : '-' }}

{{ !empty($payment->description) ? $payment->description : '' }}

@if (!empty($payment->add_receipt)) @else - @endif @permission('expense payment edit') @endpermission @permission('expense payment delete')
{{ Form::open(['route' => ['payment.destroy', $payment->id], 'class' => 'm-0']) }} @method('DELETE') {{ Form::close() }}
@endpermission
@stack('vendor_project_div')

{{ $vendor['name'] . ' ' . __('Statement') }}

{{ Form::label('from_date', __('From Date'), ['class' => 'form-label']) }}*
{{ Form::date('from_date', isset($data['from_date']) ? $data['from_date'] : null, ['class' => 'form-control from_date', 'placeholder' => 'Select From Date', 'required' => 'required']) }}
{{ Form::label('until_date', __('Until Date'), ['class' => 'form-label']) }}*
{{ Form::date('until_date', isset($data['until_date']) ? $data['until_date'] : null, ['class' => 'form-control until_date', 'placeholder' => 'Select Until Date']) }}
{{ __('My Company') }}
{{ \Auth::user()->email }}

@if (!empty($settings['company_address'])) {{ $settings['company_address'] }} @endif @if (!empty($settings['company_city']))
{{ $settings['company_city'] }}, @endif @if (!empty($settings['company_state'])) {{ $settings['company_state'] }} @endif @if (!empty($settings['company_country']))
{{ $settings['company_country'] }} @endif @if (!empty($settings['company_zipcode'])) - {{ $settings['company_zipcode'] }} @endif

{{ __('Statement of Account') }}
{{ $data['from_date'] . ' ' . 'to' . ' ' . $data['until_date'] }}

{{ $vendor->name }}
{{ __('Account summary') }}
@if (!empty($vendor->billing_name))
{{ __('Billed To') }} :
{{ !empty($vendor->billing_name) ? $vendor->billing_name : '' }}
{{ !empty($vendor->billing_address) ? $vendor->billing_address : '' }}
{{ !empty($vendor->billing_city) ? $vendor->billing_city . ' ,' : '' }} {{ !empty($vendor->billing_state) ? $vendor->billing_state . ' ,' : '' }} {{ !empty($vendor->billing_zip) ? $vendor->billing_zip : '' }}
{{ !empty($vendor->billing_country) ? $vendor->billing_country : '' }}
{{ !empty($vendor->billing_phone) ? $vendor->billing_phone : '' }}
{{ __('Tax Number ') }} : {{ !empty($vendor->tax_number) ? $vendor->tax_number : '' }}
@endif @if ($company_settings['bill_shipping_display'] == 'on')
{{ __('Shipped To') }} :
{{ !empty($vendor->shipping_name) ? $vendor->shipping_name : '' }}
{{ !empty($vendor->shipping_address) ? $vendor->shipping_address : '' }}
{{ !empty($vendor->shipping_city) ? $vendor->shipping_city . ' ,' : '' }} {{ !empty($vendor->shipping_state) ? $vendor->shipping_state . ' ,' : '' }} {{ !empty($vendor->shipping_zip) ? $vendor->shipping_zip : '' }}
{{ !empty($vendor->shipping_country) ? $vendor->shipping_country : '' }}
{{ !empty($vendor->shipping_phone) ? $vendor->shipping_phone : '' }}
{{ __('Tax Number ') }} : {{ !empty($vendor->tax_number) ? $vendor->tax_number : '' }}
@endif
@php $total = 0; @endphp @foreach ($bill_payment as $payment) @php $total += $payment->amount; @endphp @endforeach @php $duebalance = $totalBillSum - $total; @endphp

{{ __('Balance') }} : {{ currency_format_with_sym($vendor->balance) }}

{{ __('Billed amount') }} : {{ currency_format_with_sym($totalBillSum) }}

{{ __('Amount Paid') }} : {{ currency_format_with_sym($total) }}

{{ __('Balance Due') }} : {{ currency_format_with_sym($duebalance) }}

@php $total = 0; @endphp @forelse($bill_payment as $payment) @empty @endforelse @foreach ($bill_payment as $key => $payment) @php $total += $payment->amount; @endphp @endforeach
{{ __('Date') }} {{ __('Bill') }} {{ __('Amount') }}
{{ company_date_formate($payment->date) }} {{ \Workdo\Account\Entities\Bill::billNumberFormat($payment->bill_id) }} {{ currency_format_with_sym($payment->amount) }}

{{ __('No Data Found') }}

{{ __('TOTAL :') }} {{ currency_format_with_sym($total) }}
@endsection