<?php
$sid=$this->uri->segment('3');
$all_opening_fee_invoices=$this->OpeningBalanceModel->check_opening_balancce_fee($sid);
if($all_opening_fee_invoices){
?>
<div class="container-fluid bg-white mt-3 mb-3">
    <div class="row">
        <div class="col-sm-12 pt-3 pb-3">
            <div class="table-responsive">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>S.Id.</th>
                            <th>Opening Amount</th>
                            <th>Received Amount</th>
                            <th>Balance</th>
                            <th>Date</th>
                            <th>Invoice</th>
                        </tr>
                    </thead>
                    <tbody>
                           <?php
                           foreach($all_opening_fee_invoices as $fee_invoices){
                                ?>
                        <tr>
                            <td><?php echo $fee_invoices['sid'];?></td>
                            <td><?php echo $fee_invoices['estimate_amount'];?></td>
                            <td><?php echo $fee_invoices['received_amount'];?></td>
                            <td><?php echo $fee_invoices['balance_amount'];?></td>
                            <td><?php echo date('d-m-Y',strtotime($fee_invoices['fee_date']));?></td>
                            <td>
                                <a href="<?php echo base_url();?>OpeningFee/invoice/<?php echo $fee_invoices['id'];?>" class="btn btn-sm btn-info" target="_blank">Invoice</a>
                            </td>
                        </tr>
<?php
    }
?>
                            
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php
}
?>
