<!-- Modal -->
<div class="modal fade" style="display:none;" id="paymentModal" tabindex="-1" aria-labelledby="paymentModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="paymentModalLabel">ชำระเงิน</h5>
            </div>
            <form action="<?php echo e(route('student.payment')); ?>"
                id="payFrm"
                novalidate class="<?php echo e(($errors->any()) ? 'was-validated' : 'needs-validation'); ?>"
                method="post">
                <?php echo csrf_field(); ?>
                <div class="modal-body">
                    <input type="hidden" name="payStudent" value="<?php echo e($student->title.$student->firstname ." ". $student->lastname); ?>">
                    <div class="row">
                        <div class="col-12">
                            <p><span class="font-weight-bold">ยอดค้างชำระ :</span> <?php echo e(number_format( $student->course_cost - $student->discount - $student->paid)); ?> บาท</p>
                            <input type="hidden" value="<?php echo e($student->course_cost - $student->discount - $student->paid); ?>" id="remain">
                            <input type="hidden" value="<?php echo e($student->eid); ?>" name="eid">
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-6">
                            <div class="form-group">
                                <label for="paymentMethod">รูปแบบการชำระเงิน <span class="text-red">*</span></label>
                                <select id="paymentMethod" name="paymentMethod" class="selectpicker show-menu-arrow form-control" title="--เลือก--" required>
                                    <option value="เงินสด">เงินสด</option>
                                    <option value="โอน">โอน</option>
                                    <option value="บัตรเครดิต">บัตรเครดิต</option>
                                </select>
                                <?php $__errorArgs = ['paymentMethod'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="text-danger"><?php echo e($message); ?></div>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                            
                        </div>
                        <div class="col-6">
                            <div class="form-group">
                                <label for="pay">จำนวนที่ชำระ <span class="text-red">*</span></label>
                                <input type="number" class="form-control" id="pay" name="pay" placeholder="จำนวนที่ชำระ (บาท)" required>
                                <?php $__errorArgs = ['pay'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="text-danger"><?php echo e($message); ?></div>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-6">
                            <div class="form-group">
                                <label for="payDate">วันที่ชำระ <span class="text-red">*</span></label>
                                <div class="input-group mb-3">
                                    <input type="text" class="form-control pay-date" id="payDate" name="payDate" placeholder="วันที่ชำระ" autocomplete="off" required>
                                    <div class="input-group-append"><span class="input-group-text"><i class="far fa-calendar-alt"></i></span></div>
                                </div>
                                <?php $__errorArgs = ['payDate'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="text-danger"><?php echo e($message); ?></div>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>
                        <div class="col-6">
                            <div class="form-group">
                                <label for="payTime" class="modal-label-card float-left mb-2">เวลา <span class="text-red">*</span></label>
                                <div class="input-group mb-3">
                                    <input type="text" class="form-control" id="payTime" name="payTime" placeholder="เวลา" autocomplete="off" required>
                                    <div class="input-group-append">
                                        <span class="input-group-text"><i class="far fa-clock"></i></span>
                                    </div>
                                </div>
                                <?php $__errorArgs = ['payTime'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <div class="text-danger"><?php echo e($message); ?></div>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">ปิด</button>
                    <button type="submit" id="payBtn" class="btn btn-success">ชำระเงิน</button>
                </div>
            </form>
        </div>
    </div>
</div>
<?php /**PATH C:\laragon\www\system-test.pongpetrdriving.com\resources\views/student/modal_payment.blade.php ENDPATH**/ ?>