@if($clientName)

Ledger of {{ $clientName->name }}

Duration: {{ date('d-m-Y',strtotime(request('start_date'))) }} to {{ date('d-m-Y',strtotime(request('end_date'))) }}

Mobile No: {{ $clientName->phone }}

@endif @php $total_due = 0; $t_invoice = 0; $t_expense = 0; $t_return = 0; $t_payment = 0; $t_discount = 0; $t_due = 0; @endphp @foreach ($allData as $key => $data) @php $total_due += $data['invoice'] + $data['expense'] - $data['return'] - $data['payment'] - $data['discount'];; $t_invoice += $data['invoice']; $t_expense += $data['expense']; $t_return += $data['return']; $t_payment += $data['payment']; $t_discount += $data['discount']; $t_due = $total_due; @endphp @endforeach
SL Date Particular Invoice Expense
(For client)
Return Payment Discount Payment Details Due Balance
{{ $loop->iteration }} {{ date('d-m-Y',strtotime($data['date'])) }} {{ $data['particular'] }} {{ $data['invoice'] == 0 ? '' : ($data['invoice']) }} {{ $data['expense'] == 0 ? '' : ($data['expense']) }} {{ $data['return'] == 0 ? '' : ($data['return']) }} {{ $data['payment'] == 0 ? '' : ($data['payment']) }} {{ $data['discount'] == 0 ? '' : ($data['discount']) }} @if($data['payment_type'] == 1) Cash @elseif($data['payment_type'] == 2) {{-- @if($data['bank_type'] == 1)--}} {{-- Bank (Transfer)--}} {{-- @else--}} {!! $data['bank_details'] !!} {{-- @endif--}} @endif {{ ($total_due) }}
Total {{ ($t_invoice) }} {{ ($t_expense) }} {{ ($t_return) }} {{ ($t_payment) }} {{ ($t_discount) }} {{ ($t_due) }}