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

Journal Vouchers

New Journal Voucher
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Reset
@forelse($vouchers as $voucher) @empty @endforelse @if($vouchers->count() > 0) @endif
Voucher No. Date Debit Accounts Credit Accounts Amount Narration Actions
{{ $voucher->voucher_no }} {{ $voucher->date->format('d-M-Y') }} @foreach($voucher->entries->where('debit', '>', 0) as $entry) {{ Str::limit($entry->account->name, 20) }} @endforeach @foreach($voucher->entries->where('credit', '>', 0) as $entry) {{ Str::limit($entry->account->name, 20) }} @endforeach Rs. {{ number_format($voucher->amount, 2) }} {{ Str::limit($voucher->narration, 25) }}
@csrf @method('DELETE')
No journal vouchers found
Total: Rs. {{ number_format($vouchers->sum('amount'), 2) }}
{{ $vouchers->links() }}
@endsection