@extends('backend.layouts.master') @section('section-title', 'Report') @section('page-title', 'Customer Due') @push('css') @endpush @section('content')
@php $custommer = App\Models\Customer::get(); @endphp
Reset Print

Customer Due Report

@php $sub_total = 0; @endphp @forelse($customers as $data) @php $count_cus = App\Models\Invoice::where('customer_id', $data->id)->count(); $count_tra = App\Models\Transaction::where('customer_id', $data->id)->count(); $open_balance = open_balance_customer($data->id, $data->open_receivable, $data->open_payable); $inv_total = App\Models\Invoice::where('customer_id', $data->id)->sum('total_amount'); $inv_paid = App\Models\Invoice::where('customer_id', $data->id)->sum('total_paid'); $inv_due = App\Models\Invoice::where('customer_id', $data->id)->sum('total_due'); $inv_due_cust = App\Models\Invoice::where('customer_id', $data->id)->get(); $sub_total += ($inv_due + $open_balance); @endphp @if( $inv_due + $open_balance > 0) @endif @empty @endforelse
#SL Name & Email & Phone Total Invoice Paid Invoice Due Invoice Previous Due Total Due
{{ $loop->index + 1 }} {{ $data->name }}
{{ $data->phone }}
{{ ($data->email == Null)?'NULL':$data->email; }}
{{ $inv_total }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $inv_paid }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $inv_due }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $open_balance }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }} {{ $inv_due + $open_balance }} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }}
No Data Available
Total Price: {{number_format($sub_total,2)}} {{ empty(get_setting('com_currency')) ? : get_setting('com_currency') }}
{{ $customers->onEachSide(1)->links() }}
@endsection