@extends('layouts.app') @section('content')
| Date | Particulars | Debit | Credit | Balance |
|---|---|---|---|---|
| {{ \Carbon\Carbon::parse($fromDate)->format('d-M-Y') }} | Opening Balance | - | - | @if($openingBalance >= 0) {{ number_format($openingBalance, 2) }} Dr @else {{ number_format(abs($openingBalance), 2) }} Cr @endif |
| {{ $entry->date->format('d-M-Y') }} | @if($entry->transactionable) @php $ref = $entry->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 {{ $entry->description ?? 'Transaction' }} @endif | {{ $entry->debit > 0 ? number_format($entry->debit, 2) : '-' }} | {{ $entry->credit > 0 ? number_format($entry->credit, 2) : '-' }} | @if($runningBalance >= 0) {{ number_format($runningBalance, 2) }} Dr @else {{ number_format(abs($runningBalance), 2) }} Cr @endif |
| No transactions found | ||||
| Period Total: | {{ number_format($entries->sum('debit'), 2) }} | {{ number_format($entries->sum('credit'), 2) }} | @if($runningBalance >= 0) {{ number_format($runningBalance, 2) }} Dr @else {{ number_format(abs($runningBalance), 2) }} Cr @endif | |