@extends('layouts.app') @section('content')

Daily Book

Date: {{ \Carbon\Carbon::parse($date)->format('l, d F Y') }} | Total Transactions: {{ $transactions->count() }}
Total Debit
Rs. {{ number_format($summary['total_debit'], 2) }}
Total Credit
Rs. {{ number_format($summary['total_credit'], 2) }}
@forelse($transactions as $index => $txn) @empty @endforelse
# Time Account Reference Debit Credit
{{ $index + 1 }} {{ $txn->created_at->format('H:i') }} {{ $txn->account->code }} - {{ $txn->account->name }} @if($txn->transactionable) @php $ref = $txn->transactionable; @endphp @if($ref instanceof \App\Models\Purchase) Purchase {{ $ref->bill_no }} @elseif($ref instanceof \App\Models\Sale) Sale {{ $ref->bill_no }} @elseif($ref instanceof \App\Models\Voucher) {{ $ref->type }} {{ $ref->voucher_no }} @else {{ class_basename($ref) }} @endif @else - @endif @if($txn->debit > 0) {{ number_format($txn->debit, 2) }} @else - @endif @if($txn->credit > 0) {{ number_format($txn->credit, 2) }} @else - @endif
No transactions found for this date
Total: {{ number_format($summary['total_debit'], 2) }} {{ number_format($summary['total_credit'], 2) }}
@endsection