 @extends('adminlte::page') 

 @section('content')

<?php Fun::lang()?>
    <div class="title-page">
        <div class="page-bar">
            <ul class="page-breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
                <li><a href="#">Accounting</a></li>
                <li><a href="#">Libility</a></li>
            </ul>
        </div>
    </div>
    <div class="page">       

        <div class="top-content">
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                    <div class="title-add">
                        <div class="pull-left">
                            <h3>Libility</h3>
                        </div>
                    </div>
                    <div class="pull-right">
                        <a class="button_sm button_primary" href="{{route('libility.create')}}"><span class="fa fa-plus"></span>  Create New</a>
                    </div>
                </div>
            </div>
        </div>


        <div class="box-body table-responsive">
            <table id="datatable_get_libility" class="table table-striped table-bordered table-hover nowrap">
                <thead>
                    <tr>
                        <th>NO</th>
                        <th>Date</th>
                        <th>Libility Code</th>
                        <th>Liability Invoice</th>
                        <th>From </th>
                        <th>Description</th>
                        <th>Amount</th>
                        <th>Action</th>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
    @endsection @section('js')

    <script type="text/javascript">
        $(document).ready(function() {
            $('.main-spinner').show();
            $('#datatable_get_libility').DataTable({
                ordering: false,
                "serverSide": true,
                "lengthMenu": [
                    [20, 30, 50, 100, -1],
                    [20, 30, 50, 100, "All"]
                ],
                ajax: "{{ route('datatable.datatable_get_libility') }}",
                columns: [
                    {"data": "DT_RowIndex","searchable": false},
                    {"data": "liability_date","searchable": false},
                    {"data": "liability_item"}, 
                    {"data": "liability_invoice"}, 
                    {"data": "liability_from"}, 
                    {"data": "liability_des"}, 
                    {"data": "liability_amount","searchable": false},
                    {"data": "action","searchable": false},
                ],
                "initComplete": function(settings, json) {
                    $('.main-spinner').hide();
                }
            });

            $.fn.dataTable.ext.errMode = 'throw';
        });
    </script>
    @endsection