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

Debit Vouchers (Payments)

New Debit 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 Account (Paid To) From Amount Narration Actions
{{ $voucher->voucher_no }} {{ $voucher->date->format('d-M-Y') }} @php $debitEntry = $voucher->entries->where('debit', '>', 0)->first(); @endphp @if($debitEntry) {{ $debitEntry->account->name }} @endif @php $creditEntry = $voucher->entries->where('credit', '>', 0)->first(); @endphp @if($creditEntry) {{ $creditEntry->account->name }} @endif Rs. {{ number_format($voucher->amount, 2) }} {{ Str::limit($voucher->narration, 30) }}
@csrf @method('DELETE')
No debit vouchers found
Total: Rs. {{ number_format($vouchers->sum('amount'), 2) }}
{{ $vouchers->links() }}
@endsection