<?php $profile_id = $this->session->userdata('profile_id'); ?>
<input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">
<div class="col-sm-8">
    <div class="row ">
        <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-1 padding-zero">Total course</div>
                <div class="col-sm-2 padding-zero">Total Amount</div>
                <div class="col-sm-2 padding-zero">Student Paid Amount</div>
                <div class="col-sm-2 padding-zero">TT Amount</div>
                <div class="col-sm-2 padding-zero">My Amount</div>
                <div class="col-sm-2 padding-zero">Net Earning</div>
                <div class="col-sm-1 padding-zero">Action</div>
            </div>
            <div class="col-sm-12"><br></div> 
            <div class="col-sm-12 gray_ttc " style="padding-top: 10px;padding-bottom: 10px;">
                <?php if (isset($course_id)) { ?>
                    <input type="hidden" id="totalEarningStatus" value="">
                    <div class="col-sm-1 padding-zero"><?php echo isset($course_id) ? count(explode(',', $course_id)) : '' ?></div>
                    <div class="col-sm-2 padding-zero"><?php echo isset($total_amount) ? round($total_amount) : ''; ?></div>
                    <div class="col-sm-2 padding-zero"><?php echo isset($paid_amount) ? round($paid_amount) : ''; ?></div>
                    <div class="col-sm-2 padding-zero"><?php echo isset($tt_amount) ? round($tt_amount) : ''; ?></div>
                    <div class="col-sm-2 padding-zero"><?php echo isset($revenue_amount) ? round($revenue_amount) : ''; ?></div>                
                    <div class="col-sm-2 padding-zero"><?php echo isset($net_earning) ? round($net_earning) : ''; ?></div>                
                    <div class="col-sm-1 padding-zero">
                        <a id="totalEarningDetail" href="javascript:void(0)"><i class="fa fa-th" title="View Details"></i></a>
                        <span>&nbsp;</span>
                        <?php //if(round($revenue_amount) >= 5000){?>
    <!--                    <a href="<?php //echo base_url('user/payment-request');  ?>"><i class="fa fa-arrow-right" title="Payment Request"></i></a>-->
                        <?php //} ?>
                    </div>
                <?php } else { ?>
                    <div class="col-sm-12 padding-zero text-center">
                        Sorry! There is no payment information available right now.
                    </div>
                <?php } ?>
            </div>
            <div id="totalEarningloadingImage" class="col-sm-12" style="margin-top: 20px; display: none;">
                <img src="<?php echo base_url('image/invoice.gif'); ?>">
            </div>
            <div class="col-sm-12" id="viewTotalEarningDetail"></div>

            <!--
            <nav class="course-pagination">
                <ul class="pagination">
                    <li>
                        <a href="#" aria-label="Previous">
                            <span aria-hidden="true" title="First Page">««</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" aria-label="Previous">
                            <span aria-hidden="true" title="Previous Page">«</span>
                        </a>
                    </li>
                    <li><a href="#">1</a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                    <li>
                        <a href="#" aria-label="Next">
                            <span aria-hidden="true" title="Next Page">»</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" aria-label="Next">
                            <span aria-hidden="true" title="Last Page">»»</span>
                        </a>
                    </li>
                </ul>
            </nav>
            -->
        </div>
    </div>
</div>
<script src="<?php echo base_url()?>front_end_resource/payment/earning_invoice.js" type="text/javascript"></script>