@extends('layout.app') @section('content')
@if ($type == 'all') {{-- {{dd($data)}} --}} @foreach ($data as $d) @if ($d['email'] != 'soiket@outlook.com' && $d['email'] != 'support@yetfix.com' && $d['email'] != 'rokibulhasan.356@gmail.com' && $d['email'] != 'admin@billingfix.xyz') @endif @endforeach
Name Opening Balance Received Amount Paid Amount Balance Action
CASH {{ $cash['cash_opening'] ?? 0 }} {{ $cash['cash_received'] ?? 0 }} {{ abs($cash['cash_paid'] ?? 0) }} {{ ($cash['cash_opening'] ?? 0) + ($cash['cash_received'] ?? 0) + ($cash['cash_paid'] ?? 0) }}
{{ $d['name'] }} {{ $d['op_balance'] ?? 0 }} {{ $d['ramount'] ?? 0 }} {{ $d['pamount'] ?? 0 }} {{ ($d['op_balance'] ?? 0) + ($d['ramount'] ?? 0) - ($d['pamount'] ?? 0) }}
Total: {{-- {{ $accounts->sum('received_amount') + $opening_balance - $accounts->sum('paid_amount') }} --}}
@elseif($type == 'cash')
@php $tr = 0; $tp = 0; @endphp @foreach ($data as $d) @endforeach
Date Particulars Received Amount Paid Amount Balance Remarks/Narration
Opening Balance: {{ $cash['cash_opening'] }}
{{ $d->created_at }} {{ $d->note }} @if ($d->amount > 0) @php($tr += $d->amount) {{ $d->amount }} @endif @if ($d->amount < 0) @php($tp += abs($d->amount)) {{ abs($d->amount) }} @endif
Total: {{ $tr }} {{ $tp }} {{ $tr + $cash['cash_opening'] - $tp }}
@endif
@endsection @section('ajax') @endsection