@extends('user.layouts.app') @push('styles') @endpush @section('body_class', 'payment-history') @section('content')

Monthly Invoice

@if(!empty($error)) @elseif(!empty($transactions)) @foreach($transactions as $transaction) @php $statementMonth = !empty($transaction['TransDate']) ? \Carbon\Carbon::parse($transaction['TransDate'])->format('m') : null; $statementYear = !empty($transaction['TransDate']) ? \Carbon\Carbon::parse($transaction['TransDate'])->format('Y') : null; $statementLabel = $statementMonth && $statementYear ? 'Invoice / Statement ' . \Carbon\Carbon::createFromDate((int) $statementYear, (int) $statementMonth, 1)->format('m-Y') : 'Invoice / Statement'; $invoiceDownloadUrl = $statementYear && $statementMonth ? route('user.invoice.download', ['year' => $statementYear, 'month' => $statementMonth]) : null; @endphp {{-- --}} @endforeach @else @endif
SL No. Date Reference No. Amount (₹) Action
{{ $error }}
{{ $loop->iteration }} @if($invoiceDownloadUrl) {{ $statementLabel }} @else {{ $statementLabel }} @endif {{ !empty($transaction['TransDate']) ? \Carbon\Carbon::parse($transaction['TransDate'])->format('d-m-Y') : 'NA' }} {{ $transaction['strTransNo'] ?? 'NA' }} {{ $transaction['dblClosingBal'] ?? '0.00' }} @if($invoiceDownloadUrl) Download @else {{ $statementLabel }} @endif
No monthly invoice data found.
@endsection @section('footer') @endsection @push('scripts') @endpush