<!-- viewAccountModal.blade.php -->
<div class="modal fade" id="viewAccountModal{{ $student->id }}" tabindex="-1" role="dialog" aria-labelledby="viewAccountModalLabel{{ $student->id }}" aria-hidden="true">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="viewAccountModalLabel{{ $student->id }}">Update Payment Details</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>

			<div class="modal-body">
				<form action="{{ route('post.payment.update') }}" method="post">
					@csrf
					
					<input type="hidden" name="userid" value="{{ Auth::user()->id }}">

					<div class="mb-3">
						<label for="transactionid{{ $student->id }}" class="form-label">Mpesa Transaction ID</label>
						<input type="text" class="form-control" id="transactionid{{ $student->id }}" name="transactionid" placeholder="Enter Mpesa Transaction ID" required>
					</div>

					<div class="mb-3">
						<label for="accountnumber{{ $student->id }}" class="form-label">Account Number</label>
						<input type="text" class="form-control" id="accountnumber{{ $student->id }}" name="accountnumber" value="{{ $student->account }}" required>
					</div>

					<div class="mb-3">
						<label for="username{{ $student->id }}" class="form-label">Update by</label>
						<input type="text" class="form-control" id="username{{ $student->id }}" name="username" value="{{ Auth::user()->name }}" readonly>
					</div>
					
			</div>

			<div class="modal-footer">
                <button type="submit" class="btn btn-primary">Update Payment Records</button>
				<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
			</div>
            </form>
		</div>
	</div>
</div>
