@extends('layouts.app') @section('title', 'Bank Transaction Report Detail') @section('content')

Bank Transaction Report Detail

Bank Information

Bank Name: {{ $bankAccount->bank_name }}

Account Number: {{ $bankAccount->account_number }}

@if($bankAccount->account_name)

Account Name: {{ $bankAccount->account_name }}

@endif
@if($bankAccount->branch_name)

Branch: {{ $bankAccount->branch_name }}

@endif @if($bankAccount->account_type)

Account Type: {{ $bankAccount->account_type }}

@endif

৳{{ number_format($totalDeposit, 2) }}

Total Deposit

৳{{ number_format($totalWithdrawal, 2) }}

Total Withdrawal

৳{{ number_format($totalDeposit - $totalWithdrawal, 2) }}

Net Balance
@if(count($periods) > 0)
Detailed Breakdown
@foreach($periods as $periodData) @endforeach
Period Deposit Withdrawal Net Action
{{ $periodLabels[$periodData['period']] ?? $periodData['period'] }} ৳{{ number_format($periodData['deposit'], 2) }} ৳{{ number_format($periodData['withdrawal'], 2) }} ৳{{ number_format($periodData['deposit'] - $periodData['withdrawal'], 2) }} @php // Determine the date range for daily details based on period type if ($periodType == 'daily') { $detailDateFrom = $periodData['period']; $detailDateTo = $periodData['period']; } elseif ($periodType == 'monthly') { $detailDateFrom = \Carbon\Carbon::createFromFormat('Y-m', $periodData['period'])->startOfMonth()->format('Y-m-d'); $detailDateTo = \Carbon\Carbon::createFromFormat('Y-m', $periodData['period'])->endOfMonth()->format('Y-m-d'); } else { // yearly $detailDateFrom = $periodData['period'] . '-01-01'; $detailDateTo = $periodData['period'] . '-12-31'; } @endphp
Total ৳{{ number_format($totalDeposit, 2) }} ৳{{ number_format($totalWithdrawal, 2) }} ৳{{ number_format($totalDeposit - $totalWithdrawal, 2) }}
@else
No transactions found for the selected period.
@endif
@endsection