@extends('layouts.main') @section('page-title') {{ __('Customer-Detail') }} @endsection @section('page-breadcrumb') {{ __('Customer') }},{{ $customer['name'] }} @endsection @push('css') @endpush @push('scripts') @endpush @section('page-action')
@php $user_id = !empty($customer->GetUserIdByCustomerId($customer['id'])) ? $customer->GetUserIdByCustomerId($customer['id'])->user_id : null; @endphp @can('invoice create') {{ __('Create Invoice') }} @endcan @can('customer create') @if (!empty($user_id)) {{ __('Create Proposal') }} @endif @endcan @if($customer->user->is_disable == 1) @can('customer edit') @if (!empty($user_id)) @endif @endcan @endif
@endsection @section('content')
{{ __('Customer Info') }}

{{ $customer['name'] }}

{{ $customer['email'] }}

{{ $customer['contact'] }}

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

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

@endforeach @endif @stack('show_electronic_address')
{{ __('Billing Info') }}

{{ $customer['billing_name'] }}

{{ $customer['billing_phone'] }}

{{ $customer['billing_address'] }}

{{ $customer['billing_city'] . ', ' . $customer['billing_state'] . ', ' . $customer['billing_country'] }}

{{ $customer['billing_zip'] }}

{{ __('Shipping Info') }}
@if (company_setting('invoice_shipping_display') == 'on' || company_setting('proposal_shipping_display') == 'on' )

{{ $customer['shipping_name'] }}

{{ $customer['shipping_phone'] }}

{{ $customer['shipping_address'] }}

{{ $customer['shipping_city'] . ', ' . $customer['shipping_state'] . ', ' . $customer['shipping_country'] }}

{{ $customer['shipping_zip'] }}

@endif
{{ __('Company Info') }}
@php $totalInvoiceSum = $customer->customerTotalInvoiceSum($customer['id']); $totalInvoice = $customer->customerTotalInvoice($customer['id']); $averageSale = $totalInvoiceSum != 0 ? $totalInvoiceSum / $totalInvoice : 0; @endphp

{{ __('Customer Id') }}

{{ Modules\Account\Entities\Customer::customerNumberFormat($customer['customer_id']) }}

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

{{ currency_format_with_sym($totalInvoiceSum) }}

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

{{ company_date_formate($customer['created_at']) }}

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

{{ $totalInvoice }}

{{ __('Balance') }}

{{ currency_format_with_sym($customer['balance']) }}

{{ __('Average Sales') }}

{{ currency_format_with_sym($averageSale) }}

{{ __('Overdue') }}

{{ currency_format_with_sym($customer->customerOverdue($customer['id'])) }}
{{ __('Proposal') }}
@if (Gate::check('proposal edit') || Gate::check('proposal delete') || Gate::check('proposal show')) @endif @forelse ($customer->customerProposal($customer->id) as $proposal) @if (Gate::check('proposal edit') || Gate::check('proposal delete') || Gate::check('proposal show')) @endif @empty @include('layouts.nodatafound') @endforelse
{{ __('Proposal') }} {{ __('Issue Date') }} {{ __('Amount') }} {{ __('Status') }} {{ __('Action') }}
@can('proposal show') {{ \App\Models\Proposal::proposalNumberFormat($proposal->proposal_id) }} @else {{ \App\Models\Proposal::proposalNumberFormat($proposal->proposal_id) }} @endcan {{ company_date_formate($proposal->issue_date) }} {{ currency_format_with_sym($proposal->getTotal()) }} @if ($proposal->status == 0) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 1) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 2) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 3) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @elseif($proposal->status == 4) {{ __(\App\Models\Proposal::$statues[$proposal->status]) }} @endif @if ($proposal->is_convert == 0) @can('proposal convert invoice')
{!! Form::open([ 'method' => 'get', 'route' => ['proposal.convert', $proposal->id], 'id' => 'proposal-form-' . $proposal->id, ]) !!} {{ Form::close() }}
@endcan @else @can('invoice show') @endcan @endif @can('duplicate proposal')
{!! Form::open([ 'method' => 'get', 'route' => ['proposal.duplicate', $proposal->id], 'id' => 'duplicate-form-' . $proposal->id, ]) !!} {{ Form::close() }}
@endcan @can('proposal show') @if (\Auth::user()->type == 'client') @else @endif @endcan @can('proposal edit') @endcan @can('proposal delete')
{{ Form::open(['route' => ['proposal.destroy', $proposal->id], 'class' => 'm-0']) }} @method('DELETE') {{ Form::close() }}
@endcan
{{ __('Invoice') }}
@if (Gate::check('invoice edit') || Gate::check('invoice delete') || Gate::check('invoice show')) @endif @forelse ($customer->customerInvoice($customer->id) as $invoice) @if (Gate::check('invoice edit') || Gate::check('invoice delete') || Gate::check('invoice show')) @endif @empty @include('layouts.nodatafound') @endforelse
{{ __('Invoice') }} {{ __('Issue Date') }} {{ __('Due Date') }} {{ __('Due Amount') }} {{ __('Status') }} {{ __('Action') }}
@can('invoice show') {{ \App\Models\Invoice::invoiceNumberFormat($invoice->invoice_id) }} @else {{ \App\Models\Invoice::invoiceNumberFormat($invoice->invoice_id) }} @endcan {{ company_date_formate($invoice->issue_date) }} @if ($invoice->due_date < date('Y-m-d'))

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

@else {{ company_date_formate($invoice->due_date) }} @endif
{{ currency_format_with_sym($invoice->getDue()) }} @if ($invoice->status == 0) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 1) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 2) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 3) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @elseif($invoice->status == 4) {{ __(\App\Models\Invoice::$statues[$invoice->status]) }} @endif @can('duplicate invoice')
{!! Form::open([ 'method' => 'get', 'route' => ['invoice.duplicate', $invoice->id], 'id' => 'invoice-duplicate-form-' . $invoice->id, ]) !!} {!! Form::close() !!}
@endcan @can('invoice show') @if (\Auth::user()->type == 'client') @else @endif @endcan @can('invoice edit') @endcan @can('invoice delete')
{{ Form::open(['route' => ['invoice.destroy', $invoice->id], 'class' => 'm-0']) }} @method('DELETE') {{ Form::close() }}
@endcan
{{ __('Revenue') }}
@if (Gate::check('revenue edit') || Gate::check('revenue delete')) @endif @forelse ($customer->customerRevenue($customer->id) as $revenue) @if (module_is_active('ProductService')) @else @endif @if (Gate::check('revenue edit') || Gate::check('revenue delete')) @endif @empty @include('layouts.nodatafound') @endforelse
{{ __('Date') }} {{ __('Amount') }} {{ __('Account') }} {{ __('Category') }} {{ __('Reference') }} {{ __('Description') }} {{ __('Payment Receipt') }} {{ __('Action') }}
{{ company_date_formate($revenue->date) }} {{ currency_format_with_sym($revenue->amount) }} {{ !empty($revenue->bankAccount) ? $revenue->bankAccount->bank_name . ' ' . $revenue->bankAccount->holder_name : '' }} {{ !empty($revenue->category) ? $revenue->category->name : '-' }}-{{ !empty($revenue->reference) ? $revenue->reference : '-' }}

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

@if (!empty($revenue->add_receipt)) @else - @endif @can('revenue edit') @endcan @can('revenue delete')
{{ Form::open(['route' => ['revenue.destroy', $revenue->id], 'class' => 'm-0']) }} @method('DELETE') {{ Form::close() }}
@endcan
@stack('customer_project_div')

{{$customer['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 ','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','required'=>'required'))}}
{{__('My Company')}}
{{ \Auth::user()->email }}
{{__('Statement of Account')}}
{{($data['from_date']).' '.'to'.' '.($data['until_date'])}}

@if(!empty($customer->billing_name))
{{__('Billed To')}} :
{{ !empty($customer->billing_name) ? $customer->billing_name : '' }}
{{ !empty($customer->billing_address) ? $customer->billing_address : '' }}
{{ !empty($customer->billing_city) ? $customer->billing_city .' ,': '' }} {{ !empty($customer->billing_state) ? $customer->billing_state .' ,': '' }} {{ !empty($customer->billing_zip) ? $customer->billing_zip : '' }}
{{ !empty($customer->billing_country) ? $customer->billing_country : '' }}
{{ !empty($customer->billing_phone) ? $customer->billing_phone : '' }}
{{__('Tax Number ')}} : {{!empty($customer->tax_number)?$customer->tax_number:''}}
@endif @if (company_setting('invoice_shipping_display') == 'on' || company_setting('proposal_shipping_display') == 'on' )
{{__('Shipped To')}} :
{{ !empty($customer->shipping_name) ? $customer->shipping_name : '' }}
{{ !empty($customer->shipping_address) ? $customer->shipping_address : '' }}
{{ !empty($customer->shipping_city) ? $customer->shipping_city .' ,': '' }} {{ !empty($customer->shipping_state) ? $customer->shipping_state .' ,': '' }} {{ !empty($customer->shipping_zip) ? $customer->shipping_zip : '' }}
{{ !empty($customer->shipping_country) ? $customer->shipping_country : '' }}
{{ !empty($customer->shipping_phone) ? $customer->shipping_phone : '' }}
{{__('Tax Number ')}} : {{!empty($customer->tax_number)?$customer->tax_number:''}}
@endif
@php $total = 0; @endphp @forelse($invoice_payment as $payment) @empty @endforelse @foreach($invoice_payment as $key=>$payment) @php $total += $payment->amount; @endphp @endforeach
{{__('Date')}} {{__('Invoice')}} {{__('Payment Type')}} {{__('Amount')}}
{{company_date_formate($payment->date)}} {{\App\Models\Invoice::invoiceNumberFormat($payment->invoice_id)}} {{$payment->payment_type}} {{currency_format_with_sym(($payment->amount))}}

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

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