@extends('layouts.main') @section('page-title') {{ __('Vendor-Detail') }} @endsection @section('page-breadcrumb') {{ __('Vendor-Detail') }} @endsection @push('scripts') @endpush @push('css') @endpush @section('page-action')
@can('bill create') {{__('Create Bill')}} @endcan @if($vendor->user->is_disable == 1) @can('vendor edit') @endcan @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_setting('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')}}

{{ Modules\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))}}
{{__('Bills')}}
@if(Gate::check('bill edit') || Gate::check('bill delete') || Gate::check('bill show')) @endif @forelse ($vendor->vendorBill($vendor->id) as $bill) @if(Gate::check('bill edit') || Gate::check('bill delete') || Gate::check('bill show')) @endif @empty @include('layouts.nodatafound') @endforelse
{{__('Bill')}} {{__('Bill Date')}} {{__('Due Date')}} {{__('Due Amount')}} {{__('Status')}} {{__('Action')}}
@can('bill show') {{ Modules\Account\Entities\Bill::billNumberFormat($bill->bill_id) }} @else {{ Modules\Account\Entities\Bill::billNumberFormat($bill->bill_id) }} @endcan {{ 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 @can(' bill duplicate')
{!! Form::open(['method' => 'get', 'route' => ['bill.duplicate', $bill->id],'id'=>'bill-duplicate-form-'.$bill->id]) !!} {!! Form::close() !!}
@endcan @can('bill show') @endcan @can('bill edit') @endcan @can('bill delete')
{{Form::open(array('route'=>array('bill.destroy', $bill->id),'class' => 'm-0'))}} @method('DELETE') {{Form::close()}}
@endcan
@stack('vendor_purchase_div')
{{__('Payment')}}
@if (Gate::check('expense payment delete') || Gate::check('expense payment edit')) @endif @foreach ($vendor->vendorPayment($vendor->id) as $payment) @if (module_is_active('ProductService')) @else @endif @if (Gate::check('expense payment delete') || Gate::check('expense payment edit')) @endif @endforeach
{{ __('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 @can('expense payment edit') @endcan @can('expense payment delete')
{{ Form::open(['route' => ['payment.destroy', $payment->id], 'class' => 'm-0']) }} @method('DELETE') {{ Form::close() }}
@endcan

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

{{ Form::label('from_date', __('From Date'),['class'=>'form-label']) }}*
{{Form::date('from_date', isset($data['from_date'])?$data['from_date']:null,array('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, array('class' => 'form-control until_date','placeholder' => 'Select Until Date')) }}
{{__('My Company')}}
{{ \Auth::user()->email }}
{{__('Statement of Account')}}
{{($data['from_date']).' '.'to'.' '.($data['until_date'])}}

@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_setting('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 @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)}} {{\Modules\Account\Entities\Bill::billNumberFormat($payment->bill_id)}} {{currency_format_with_sym(($payment->amount))}}

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

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