
<div class="page-content">
    <!-- Page Breadcrumb -->
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="#">Banking</a>
            </li>
            <li class="active">Banking</li>
        </ul>
    </div>
    <!-- /Page Breadcrumb -->

    <!-- Page Header -->
    <div class="page-header position-relative">
        <div class="header-title">
            <h1>
                Banking
            </h1>
        </div>
        <!--Header Buttons-->
        <div class="header-buttons">
            <a class="sidebar-toggler" href="#">
                <i class="fa fa-arrows-h"></i>
            </a>
            <a class="refresh" id="refresh-toggler" href="">
                <i class="glyphicon glyphicon-refresh"></i>
            </a>
            <a class="fullscreen" id="fullscreen-toggler" href="#">
                <i class="glyphicon glyphicon-fullscreen"></i>
            </a>
        </div>
        <!--Header Buttons End-->
    </div>
    <!-- /Page Header -->
    <!-- Page Body -->
    



    
    <!-- End Page Body -->
                

    <div class="page-body">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="row">
                    <div class="col-xs-12 col-md-12">
                        <div class="widget">
                            <div class="widget-header ">
                                <span class="widget-caption">Editable DataTable</span>
                                <div class="widget-buttons">
                                    <a href="#" data-toggle="maximize">
                                        <i class="fa fa-expand"></i>
                                    </a>
                                    <a href="#" data-toggle="collapse">
                                        <i class="fa fa-minus"></i>
                                    </a>
                                    <a href="#" data-toggle="dispose">
                                        <i class="fa fa-times"></i>
                                    </a>
                                </div>
                            </div>
                            <div class="widget-body">
                                <div class="table-toolbar">
                                    
                                    <a id="close" href="<?php echo site_url('banking')?>" class="btn btn-danger">
                                        <span class="fa fa-arrow-left"></span>
                                        Back
                                    </a>
                                    <div class="btn-group pull-right">
                                        <a class="btn btn-default" href="javascript:void(0);">Tools</a>
                                        <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);"><i class="fa fa-angle-down"></i></a>
                                        <ul class="dropdown-menu dropdown-default">
                                            <li>
                                                <a href="javascript:void(0);">Action</a>
                                            </li>
                                            <li>
                                                <a href="javascript:void(0);">Another action</a>
                                            </li>
                                            <li>
                                                <a href="javascript:void(0);">Something else here</a>
                                            </li>
                                            <li class="divider"></li>
                                            <li>
                                                <a href="javascript:void(0);">Separated link</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-lg-12 col-sm-12 col-xs-12">
                                        <div class="well bordered-left bordered-themeprimary">
                                            <h3>Overview</h3>
                                            <p>vBizz lets you to transfer money from one account to another account created in accounts section at once.</p>
                                        </div>
                                    </div>
                                </div>
                                <div class = "row center">
                                    <div class="col-lg-10 col-sm-6 col-xs-12">
                                        <div class="widget center">
                                            <div class="widget-header bordered-bottom bordered-lightred">
                                                <span class="widget-caption">Horizontal Form</span>
                                            </div>
                                            <div class="widget-body">
                                                <div id="horizontal-form">
                                                    <form id="add_banking" class="form-horizontal" role="form" method="POST" action="<?php echo site_url('add_banking')?>">
                                                        <input type="hidden" name="created_by" value="<?php echo $this->session->userid?>">
                                                        <div class="form-group">
                                                            <label for="inputEmail3" class="col-sm-2 control-label no-padding-right">From Account</label>
                                                            <div class="col-sm-10">
                                                                <select id="from_account" name="from_account" style="width:100%" required>
                                                                    <option value>Select Account</option>
                                                                    <?php
                                                                    foreach ($accounts as $key => $value) {
                                                                        echo "<option value=\"".$value->id."\" />".$value->account_name;    
                                                                    }
                                                                    ?>
                                                                </select>
                                                                <p id="available_balance" style="color:red; display:none">Available Balance is <strong ></strong></p>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label for="inputPassword3" class="col-sm-2 control-label no-padding-right" >To Account</label>
                                                            <div class="col-sm-10">
                                                                <select id="to_account" name="to_account" style="width:100%" required>
                                                                    <option value>Select Account</option>
                                                                    <?php
                                                                    foreach ($accounts as $key => $value) {
                                                                        echo "<option value=\"".$value->id."\" />".$value->account_name;    
                                                                    }
                                                                    ?>
                                                                </select>
                                                                
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <label for="inputPassword3" class="col-sm-2 control-label no-padding-right">Amount</label>
                                                            <div class="col-sm-10">
                                                                <input id="amount" type="number" class="form-control" name="amount" placeholder="Amount" required>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-sm-offset-2 col-sm-10">
                                                                <a class="btn btn-success" onclick="transfer()">
                                                                    <span class="fa fa-send"></span>    
                                                                    Transfer
                                                                </a>
                                                                <a id="close" href="<?php echo site_url('banking')?>" class="btn btn-danger">
                                                                    <span class="fa fa-arrow-left"></span>
                                                                    Close
                                                                </a>
                                                            </div>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                    </div> 
                                    
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- End Page Content -->