 @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="#">Capital</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>Capital</h3>
                    </div>
                </div>
	            <div class="pull-right">
	                <a class="button_sm button_primary" href="{{route('accouting-capital.create')}}"><span class="fa fa-plus"></span>  Create New</a>
	            </div>
	        </div>
	    </div>
	</div>
    <div class="box-body table-responsive">
        <table id="datatable_accounting_capital" class="table table-striped table-bordered table-hover nowrap">
            <thead>
                <tr>
                    <th>No</th>
                    <th>Date</th>
                    <th>Acc. Code</th>
                    <th>Title</th>
                    <th>Description</th>
                    <th>Reference</th>
                    <th>User By</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_accounting_capital').DataTable({
                "lengthMenu": [
                    [20, 25, 50, 100, 500],
                    [20, 25, 50, 100, 500]
                ],
                ordering: false,
                serverSide: true,
                ajax: "{{ route('datatable.get_capital_list') }}",
                columns: [
                    {data: 'DT_RowIndex',"searchable": false},
                    {data: 'do_date',"searchable": false},
                    {data: 'acc_code','name':'nso007_account_chart.id'},
                    {data: 'acc_name','name':'nso007_account_chart.acc_name'},
                    {data: 'description','name':'nso007_journal.journal_des'},
                    {data: 'reference','name':'nso007_journal.journal_invoice'},
                    {data: 'user_log_name',"searchable": false},
                    {data: 'debit_amount',"searchable": false},
                    {data: 'action',"searchable": false}
                ],
                "initComplete": function(settings, json) {
                    $('.main-spinner').hide();
                }
            });

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