<div class="col-sm-12  text-left  "style="margin-bottom: 5px;font-weight: bold;border-bottom: 1px solid limegreen;border-top: 1px solid limegreen">
    <div class="col-sm-4">Invoice</div>
    <div class="col-sm-3 text-center">Invoice Created Date</div>
    <div class="col-sm-3 text-center">Paid Amount</div>
    <div class="col-sm-2 text-center">View</div>
</div>
<?php
if ($invoice_info) {
    $i = 0;
    foreach ($invoice_info as $value) {
        ++$i;
        ?>
        <div class="col-sm-12 text-left " style="padding: 10px;background-color:#F2F9EA;border: 1px solid #ededed">
            <div class="col-sm-4"><strong><?php echo '#tt-' . $random_id[$value->invoice_id]; ?></strong></div>
            <div class="col-sm-3 text-center"><?php
                echo date("F j, Y", strtotime($value->invoice_created_date));
                ?></div>
            <div class="col-sm-3 text-center"><?php
                if ($invoice_payment_info[$value->invoice_id]) {
                    echo $paid_amount[$value->invoice_id] . $paid_currency_sign[$value->invoice_id];
                } else {
                    echo 'None';
                }
                ?></div>
            <div class="col-sm-2 text-center" id="earningInvoiceAction<?php echo $random_id[$value->invoice_id]; ?>">
                <a target="_blank" href="<?php echo base_url('admin/view-invoice/' . $random_id[$value->invoice_id]); ?>"><i class="fa fa-dollar" title="View Invoice"></i></a>
                <span>&nbsp;</span>
                <?php
                if (isset($invoice_payment_info[$value->invoice_id])) {
                    if ($counter == $i && $payment_info->payment_status == 6) {
                        ?>
                        <a href="javascript:void(0)" id="activeInvoice<?php echo $random_id[$value->invoice_id]; ?>"><i class="fa fa-user-plus"></i></a>&nbsp;
                        <span>&nbsp;</span>
                        <?php
                    }
                }
                if ($payment_info->payment_status == 7) {
                    ?>
                    <a href="<?php echo base_url('admin/refund-invoice/' . $random_id[$value->invoice_id]); ?>" target="_blank"><i class="fa fa-exchange" aria-hidden="true"></i></a>
                    <span>&nbsp;</span>
                    <?php
                }
                ?>
            </div>
            <div class="modal fade" id="viewActiveInvoiceModal<?php echo $random_id[$value->invoice_id]; ?>" tabindex="-1" role="dialog" aria-labelledby="changeRole" aria-hidden="true">
                <?php
                $message1 = '<span style="text-align:center">Are you sure you want to Active this Payment?</span>';
                $this->cf->view_modal('ActiveInvoice' . $random_id[$value->invoice_id], $message1);
                ?>
            </div>
        </div>
        <?php
    }
}