@extends('master.authMaster') @section('content') @php $contraTypeLabels = [ 'cash_deposite' => 'Cash Deposit', 'cash_withdraw' => 'Cash Withdrawal', 'bank_transfer' => 'Bank Transfer' ]; $contraTypeBadges = [ 'cash_deposite' => 'bg-green-100 text-green-800', 'cash_withdraw' => 'bg-orange-100 text-orange-800', 'bank_transfer' => 'bg-blue-100 text-blue-800' ]; $contraType = $contraJournal->contra_reference_type ?? ''; @endphp

Contra Entry Details

Opening Cash
₹{{ number_format($cashBankData['account_bf_cash_in_hand_opening'] ?? 0, 2) }}
Opening Bank
₹{{ number_format($cashBankData['account_bf_cash_at_bank_opening'] ?? 0, 2) }}
Total Cash
₹{{ number_format($cashBankData['total_cash_in_hand'] ?? 0, 2) }}
@if(isset($cashBankData['contra_cash_adjustment']) && $cashBankData['contra_cash_adjustment'] != 0)
Contra: {{ $cashBankData['contra_cash_adjustment'] > 0 ? '+' : '' }}₹{{ number_format($cashBankData['contra_cash_adjustment'], 2) }}
@endif
Total Bank
₹{{ number_format($cashBankData['total_cash_at_bank'] ?? 0, 2) }}
@if(isset($cashBankData['contra_bank_adjustment']) && $cashBankData['contra_bank_adjustment'] != 0)
Contra: {{ $cashBankData['contra_bank_adjustment'] > 0 ? '+' : '' }}₹{{ number_format($cashBankData['contra_bank_adjustment'], 2) }}
@endif

Contra Entry Information

{{ $contraTypeLabels[$contraType] ?? ucfirst(str_replace('_', ' ', $contraType)) }}
{{ $contraJournal->transaction_reference ?? 'N/A' }}
{{ $organisation->organisation_name ?? 'N/A' }}
{{ $contraTypeLabels[$contraType] ?? ucfirst(str_replace('_', ' ', $contraType)) }}
₹{{ number_format($contraJournal->transaction_amount ?? 0, 2) }}
{{ \Carbon\Carbon::parse($contraJournal->created_at)->format('d M Y, h:i A') }}
@if($contraJournal->contra_cash_depo_allocated_amount) ₹{{ number_format($contraJournal->contra_cash_depo_allocated_amount, 2) }} @else N/A @endif
{{ $contraJournal->transaction_narration ?? 'N/A' }}

Transaction Details

{{ $contraMappings->count() }} {{ $contraMappings->count() == 1 ? 'Entry' : 'Entries' }}
@if($contraType == 'bank_transfer') @endif @if($contraType == 'cash_deposite' || $contraType == 'cash_withdraw') @endif @forelse($contraMappings as $index => $mapping) @php $bank = $banks->get($mapping->bank_id); $fromBank = $mapping->from_bank_id ? $banks->get($mapping->from_bank_id) : null; @endphp @if($contraType == 'bank_transfer') @endif @if($contraType == 'cash_deposite' || $contraType == 'cash_withdraw') @endif @empty @endforelse @if($contraType == 'bank_transfer') @endif @if($contraType == 'cash_deposite' || $contraType == 'cash_withdraw') @endif
#From Bank{{ $contraType == 'bank_transfer' ? 'To Bank' : 'Bank' }} Bank Amount (₹)Cash Amount (₹)Transaction Date
{{ $index + 1 }} @if($fromBank)
{{ $fromBank->name }}
@if($fromBank->account_number)
A/C: {{ $fromBank->account_number }}
@endif @else N/A @endif
@if($bank)
{{ $bank->name }}
@if($bank->account_number)
A/C: {{ $bank->account_number }}
@endif @if($bank->branch)
{{ $bank->branch }}
@endif @else N/A @endif
₹{{ number_format($mapping->bank_amount ?? 0, 2) }} ₹{{ number_format($mapping->cash_amount ?? 0, 2) }} @if($mapping->bank_transaction_date) {{ \Carbon\Carbon::parse($mapping->bank_transaction_date)->format('d M Y') }} @else N/A @endif
No transaction details found.
Total: ₹{{ number_format($contraMappings->sum('bank_amount'), 2) }} ₹{{ number_format($contraMappings->sum('cash_amount'), 2) }}

Impact Summary

@if($contraType == 'cash_deposite')
Cash Decreased
₹{{ number_format($contraMappings->sum('cash_amount'), 2) }}
Bank Increased
₹{{ number_format($contraMappings->sum('bank_amount'), 2) }}
@elseif($contraType == 'cash_withdraw')
Cash Increased
₹{{ number_format($contraMappings->sum('cash_amount'), 2) }}
Bank Decreased
₹{{ number_format($contraMappings->sum('bank_amount'), 2) }}
@elseif($contraType == 'bank_transfer')
Source Bank Decreased
₹{{ number_format($contraMappings->sum('bank_amount'), 2) }}
Destination Bank Increased
₹{{ number_format($contraMappings->sum('bank_amount'), 2) }}
@endif
@endsection