<?php
$v->layout("_themesis");
?>
<div class="container-fluid nav-hidden" id="content">
    <div id="">
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12">
                    <div class="box">
                        <div class="box-title">
                            <h3>
                                Minhas Compras
                                <a class="btn btn-success" href="<?php echo url('finance/credits_buy');?>">COMPRAR CHAVES</a>
                            </h3>
                        </div>
                        <div class="box-content">
                            <div class="row">
                                <div class="load_compra"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function load_balance(){
        var Data = "&id=1";
        $.ajax({
            url: "<?= $router->route("finance.buyLoad"); ?>",
            data: Data,
            type: 'POST',
            dataType: 'json',
            beforeSend: load_in(),
            success: function (data) {
                $(".load_compra").html(data.order);
                load_out();
            },
            error: function (request, status, error) {
                notify('Opss', 'Operação não pode ser finalizada!');
            }
        });
        return false;
    }
    $(function(){
        load_balance();
    });
</script>