@extends('user.layouts.app') @push('styles') @endpush @section('body_class', 'payment-page') @section('content') {{--
@php $counter = 0; // Initialize the counter to limit the rows to 6 @endphp @if(empty($filteredData['Result'])) @elseif(isset($filteredData['Result']) && is_array($filteredData['Result'])) @foreach($filteredData['Result'] as $index => $transaction) @php // Stop after 6 rows if ($counter >= 6) break; // Get the member code dynamically from the authenticated user $memberCode = auth()->user()->member_id; // Assuming the member code is stored in the `member_id` field of the authenticated user // Extract the month and year from the TransDate $month = \Carbon\Carbon::parse($transaction['TransDate'])->format('m'); // e.g., 04 for April $year = \Carbon\Carbon::parse($transaction['TransDate'])->format('Y'); // e.g., 2025 // Generate the dynamic invoice file name $invoiceFileName = $memberCode . '-' . $month . '-' . $year . '.pdf'; \Log::info('Generated Invoice File Name: ' . $invoiceFileName); // Get debit, credit, and closing balance values $debitAmount = floatval($transaction['dblDrAmt']); $creditAmount = floatval($transaction['dblCrAmt']); $closingBalance = floatval($transaction['dblClosingBal']); $openingBalance = $closingBalance + $creditAmount - $debitAmount; // Increment the counter $counter++; @endphp @endforeach @else @endif
SL No. Month Opening Bal Total Debit Total Credit Closing Bal Invoice
Can't load previous transaction data and invoices
{{ $index + 1 }} {{ \Carbon\Carbon::parse($transaction['TransDate'])->format('M, Y') }} {{ number_format($openingBalance, 2) }} {{ number_format($debitAmount, 2) }} {{ number_format($creditAmount, 2) }} {{ number_format($closingBalance, 2) }} Download
Can't load previous transaction data and invoices
--}}
@csrf

Make Payment

Membership No {{auth()->user()->member_id}}
Amount to pay (in Rs):

{{ $outstandingBalance < 0 ? 'You have a credit balance of ₹ '.number_format(abs($outstandingBalance), 2).'. You can pay extra, if desired.' : 'You can make a full or part payment for your bills.' }}

Recent Invoice/ Statement

@php $counter = 0; // Initialize the counter to limit the rows to 6 @endphp @if(empty($filteredData['Result'])) @elseif(isset($filteredData['Result']) && is_array($filteredData['Result'])) @foreach($filteredData['Result'] as $index => $transaction) @php // Stop after 6 rows if ($counter >= 6) break; // Get the member code dynamically from the authenticated user $memberCode = auth()->user()->member_id; // Assuming the member code is stored in the `member_id` field of the authenticated user // Extract the month and year from the TransDate $month = \Carbon\Carbon::parse($transaction['TransDate'])->format('m'); // e.g., 04 for April $year = \Carbon\Carbon::parse($transaction['TransDate'])->format('Y'); // e.g., 2025 // Generate the dynamic invoice file name $invoiceFileName = $memberCode . '-' . $month . '-' . $year . '.pdf'; \Log::info('Generated Invoice File Name: ' . $invoiceFileName); // Get debit, credit, and closing balance values $debitAmount = floatval($transaction['dblDrAmt']); $creditAmount = floatval($transaction['dblCrAmt']); $closingBalance = floatval($transaction['dblClosingBal']); $openingBalance = $closingBalance + $creditAmount - $debitAmount; // Increment the counter $counter++; @endphp @endforeach @else @endif
SL No. Month Transaction No. Closing Balance (₹) Invoice/ Statement
Can't load previous transaction data and invoices
{{ $index + 1 }} {{ \Carbon\Carbon::parse($transaction['TransDate'])->format('M, Y') }} {{ $transaction['strTransNo'] ?? 'NA' }} {{ $transaction['dblClosingBal'] }} Download
Can't load previous transaction data and invoices

Please click here to view your detailed ledger or go to Dashboard >> Account Statement.

Payment Successful! Thank you for your transaction.
@endsection @section('footer') @endsection @push('scripts') @endpush