<div class="col-sm-10">
    <div class="row ">
        <div class="col-sm-12">
            <div class="col-sm-12">
                <h3 style="margin-top: 0">Student All Courses Payment Information</h3><br>
                <input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">
            </div>
            <div class="col-sm-12" >
                <div class="col-sm-12 gray_ttc" style="border-bottom: 2px solid #8CC73F;padding-top: 10px;padding-bottom: 10px;font-weight: bold">
                    <div class="col-sm-3 padding-zero ">Course Title</div>
                    <div class="col-sm-2 padding-zero text-center">Course Price</div>
                    <div class="col-sm-2 padding-zero text-center">Discount Price</div>
                    <div class="col-sm-1 padding-zero text-center">Total Pay</div>
                    <div class="col-sm-1 padding-zero text-center">Due</div>
                    <div class="col-sm-1 padding-zero text-center">TT</div>
                    <div class="col-sm-1 padding-zero text-center">User</div>
                    <div class="col-sm-1 padding-zero text-center">Action</div>
                </div>
                <div class="col-sm-12"><br></div> 

                <?php
                if ($all_payment) {
                    foreach ($all_payment as $value) {
                        ?>
                        <div class="col-sm-12 gray_ttc " style="padding-top: 10px;padding-bottom: 10px;font-family: Times New Roman;">
                            <div class="col-sm-3 padding-zero"><a href="<?php echo base_url($course_info[$value->payment_id]->url); ?>" target="_blank"><?php echo $course_info[$value->payment_id]->course_name; ?></a></div>
                            <div class="col-sm-2 padding-zero text-center"><?php echo round($course_price[$value->payment_id]) . ' &#2547;'; ?></div>
                            <div class="col-sm-2 padding-zero text-center"><?php echo round($course_discount_price[$value->payment_id]) . ' &#2547;'; ?></div>
                            <div class="col-sm-1 padding-zero text-center"><?php echo round($paid_amount[$value->payment_id]) . ' &#2547;'; ?></div>
                            <div class="col-sm-1 padding-zero text-center"><?php echo round($due_amount[$value->payment_id]) . ' &#2547;'; ?></div>
                            <div class="col-sm-1 padding-zero text-center"><?php echo round($tt_amount[$value->payment_id]) . ' &#2547;'; ?></div>
                            <div class="col-sm-1 padding-zero text-center"><?php echo round($user_amount[$value->payment_id]) . ' &#2547;'; ?></div>
                            <div class="col-sm-1 padding-zero text-center"> 
                                <?php
                                if ($paid_amount[$value->payment_id]) {
                                    ?>
                                    <span>&nbsp;</span>
                                    <a href="javascript:void(0)" id="deletePayment<?php echo $encode_payment_id[$value->payment_id]; ?>"><i class="fa fa-trash-o" title="Delete"></i></a>
                                    <?php
                                }
                                ?>
                            </div>
                            <div class="modal fade" id="deletePaymentInvoiceModal" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
                                <?php
                                $message1 = '<span style="text-align:center">Are you sure you want to Delete this Payment?</span>';
                                $this->cf->view_modal('DeletePayment', $message1);
                                ?>
                            </div>
                        </div>
                        <?php
                    }
                }
                ?>
                <div class="col-sm-12"><hr></div> 
                <div class="col-sm-12 white_ttc " style="font-family: Times New Roman;border-top: 2px solid #8CC73F;border-bottom: 2px solid #8CC73F;padding: 10px;font-weight: bold;">
                    <div class="col-sm-3 padding-zero ">Total</div>
                    <div class="col-sm-2 padding-zero text-center"><?php echo round($total_price) . ' &#2547;'; ?></div>
                    <div class="col-sm-2 padding-zero text-center"><?php echo round($total_discount) . ' &#2547;'; ?></div>
                    <div class="col-sm-1 padding-zero text-center"><?php echo round($total_paid) . ' &#2547;'; ?></div>
                    <div class="col-sm-1 padding-zero text-center"><?php echo round($total_due) . ' &#2547;'; ?></div>
                    <div class="col-sm-1 padding-zero text-center"><?php echo round($total_tt) . ' &#2547;'; ?></div>
                    <div class="col-sm-1 padding-zero text-center"><?php echo round($total_user) . ' &#2547;'; ?></div>
                    <div class="col-sm-1 padding-zero text-center"></div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-sm-12 " >
        <div class="col-sm-12 gray" style="padding-left: 10px">
            <a href="<?php echo base_url(); ?>admin/manage-course">Dashboard</a>->> <span> Accounts </span>
        </div>
    </div>
    <script type="text/javascript" src="<?php echo base_url() ?>back_end_resource/accounts/student_payment.js">
    </script>
</div>