@php use App\Traits\DateFormat; $deposit = 0; $withdraw =0; $payment = 0; @endphp

@if($data['reciver_id'] != 'All') {{$data['reciver']->name}} @endif
@if($data['report_type'] == 'All') {{ $data['report_type'] }} @elseif($data['report_type'] == 'Daily') Daily ({{$data['date']}}) @elseif($data['report_type'] == "DateToDate") From {{$data['from_date']}} - {{ $data['to_date'] }} @elseif($data['report_type'] == 'Monthly') {{ DateFormat::getMonth($data['month']) }} - {{ $data['year'] }} @elseif ($data['report_type'] == 'Yearly') For The Year - {{ $data['year'] }} @endif
@if($data['reciver_id'] == 'All') @if($data['data']) @foreach ($data['data'] as $v) @php $deposit = $deposit + $v->deposit; $withdraw = $withdraw + $v->withdraw; @endphp @endforeach @endif
Date Reciver Name Deposit Withdraw
{{ DateFormat::DbToMonthDate('-',$v->date) }} {{ $v->recivers->name }} {{ $v->deposit }} {{ $v->withdraw}}
Total {{ $deposit }} {{$withdraw}}
@else @if($data['data']) @foreach ($data['data'] as $v) @php $deposit = $deposit + $v->deposit; $withdraw = $withdraw + $v->withdraw; @endphp @endforeach @endif
Date Deposit Withdraw
{{ DateFormat::DbToMonthDate('-',$v->date) }} {{ $v->deposit }} {{ $v->withdraw}}
Total {{ $deposit }} {{$withdraw}}
@endif