@extends('layouts.admin') @section('page-title') {{ __('Customer Statement') }} @endsection @push('script-page') @endpush @section('breadcrumb') @endsection @section('action-btn')
@endsection @section('content')
{{ Form::model($customerDetail, ['route' => ['customer.statement', $customer->id], 'method' => 'post']) }}
{{ Form::label('from_date', __('From Date'), ['class' => 'form-label']) }}* {{ Form::date('from_date', isset($data['from_date']) ? $data['from_date'] : null, ['class' => 'form-control', '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', 'required' => 'required']) }}
{{ Form::close() }}
{{ __('Customer Statement for Aaron Clark') }}
{{ $data['from_date'] . ' ' . 'to' . ' ' . $data['until_date'] }}

{{ $settings['company_name'] ?? '' }}
{{ $settings['company_email'] ?? '' }}
{{ $settings['company_address'] ?? '' }}
{{ $settings['company_city'] ?? '' }}, {{ $settings['company_state'] ?? '' }}
{{ $settings['company_zipcode'] ?? '' }}, {{ $settings['company_country'] ?? '' }}
{{ $settings['company_telephone'] ?? '' }}

{{ __('Statement of Accounts') }}

{{ $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 : '' }}
@if (App\Models\Utility::getValByName('tax_number') == 'on') {{ __('Tax Number ') }} : {{ !empty($customer->tax_number) ? $customer->tax_number : '' }} @endif
@endif @if (\App\Models\Utility::getValByName('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 : '' }}
@if (App\Models\Utility::getValByName('tax_number') == 'on') {{ __('Tax Number ') }} : {{ !empty($customer->tax_number) ? $customer->tax_number : '' }} @endif
@endif @php $totalPaid = 0; $totalInvoiced = 0; $balanceDue = 0; foreach ($invoice_payment as $payment) { $totalPaid += $payment->amount; } foreach ($invoice_total as $invoice) { $invoiceTotals[] = $invoice->getTotal(); $totalInvoiced += $invoice->getTotal(); } $balanceDue = $totalInvoiced - $totalPaid; @endphp
{{ 'Account Summary' }}
{{ 'Invoice Amount' }} {{ \Auth::user()->priceFormat($totalInvoiced) }}
{{ 'Amount Paid' }} {{ \Auth::user()->priceFormat($totalPaid) }}
{{ 'Balance Due' }} {{ \Auth::user()->priceFormat($balanceDue) }}
@php $total = 0; $total1 = 0; $i = 0; @endphp @forelse($invoice_payment as $payment) @php $i++; @endphp @empty @endforelse @foreach ($invoice_payment as $key => $payment) @php $total += $payment->amount; // $total1 += $invoice_total->getTotal(); @endphp @endforeach
{{ __('Date') }} {{ __('Invoice') }} {{ __('Payment Type') }} {{ __('Invoice Total') }} {{ __('Paid Amount') }}
{{ \Auth::user()->dateFormat($payment->date) }} {{ \Auth::user()->invoiceNumberFormat($payment->id) }} {{ $payment->payment_type }} @if(isset($invoiceTotals[$i])) {{ \Auth::user()->priceFormat($invoiceTotals[$i]) }} @else {{ __('N/A') }} @endif {{ \Auth::user()->priceFormat($payment->amount) }}

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

{{ __('TOTAL :') }} {{ \Auth::user()->priceFormat($totalInvoiced) }} {{ \Auth::user()->priceFormat($total) }}
@endsection