@extends('layouts.admin') @push('script-page') @endpush @section('page-title') {{__('Manage Vendor-Detail')}} @endsection @section('breadcrumb') @endsection @section('action-btn')
@can('create bill') {{__('Create Bill')}} @endcan @can('edit vender') @endcan @can('delete vender') {!! Form::open(['method' => 'DELETE', 'route' => ['vender.destroy', $vendor['id']],'class'=>'delete-form-btn','id'=>'delete-form-'.$vendor['id']]) !!} {!! Form::close() !!} @endcan
@endsection @section('content')
{{__('Vendor Info')}}

{{$vendor->name}}

{{$vendor->email}}

{{$vendor->contact}}

{{__('Billing Info')}}

{{$vendor->billing_name}}

{{$vendor->billing_phone}}

{{$vendor->billing_address}}

{{$vendor->billing_zip}}

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

{{__('Shipping Info')}}

{{$vendor->shipping_name}}

{{$vendor->shipping_phone}}

{{$vendor->shipping_address}}

{{$vendor->shipping_zip}}

{{$vendor->shipping_city.', '. $vendor->billing_state .', '.$vendor->billing_country}}

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

{{__('Vendor Id')}}

{{\Auth::user()->venderNumberFormat($vendor->vender_id)}}

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

{{\Auth::user()->priceFormat($totalBillSum)}}

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

{{\Auth::user()->dateFormat($vendor->created_at)}}

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

{{$totalBill}}

{{__('Balance')}}

{{\Auth::user()->priceFormat($vendor->balance)}}

{{__('Average Sales')}}

{{\Auth::user()->priceFormat($averageSale)}}

{{__('Overdue')}}

{{\Auth::user()->priceFormat($vendor->vendorOverdue($vendor->id))}}
{{__('Bills')}}
@if(Gate::check('edit bill') || Gate::check('delete bill') || Gate::check('show bill')) @endif @foreach ($vendor->vendorBill($vendor->id) as $bill) @if(Gate::check('edit bill') || Gate::check('delete bill') || Gate::check('show bill')) @endif @endforeach
{{__('Bill')}} {{__('Bill Date')}} {{__('Due Date')}} {{__('Due Amount')}} {{__('Status')}} {{__('Action')}}
@if(\Auth::guard('vender')->check()) {{ AUth::user()->billNumberFormat($bill->bill_id) }} @else {{ AUth::user()->billNumberFormat($bill->bill_id) }} @endif {{ Auth::user()->dateFormat($bill->bill_date) }} @if(($bill->due_date < date('Y-m-d')))

{{ \Auth::user()->dateFormat($bill->due_date) }}

@else {{ \Auth::user()->dateFormat($bill->due_date) }} @endif
{{\Auth::user()->priceFormat($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('duplicate bill') @endcan @can('show bill') @if(\Auth::guard('vender')->check()) @else @endif @endcan @can('edit bill') @endcan @can('delete bill')
{!! Form::open(['method' => 'DELETE', 'route' => ['bill.destroy', $bill->id],'id'=>'delete-form-'.$bill->id]) !!} {!! Form::close() !!}
@endcan
@endsection