<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-file-pdf-o"></i> <?php echo e(trans('application.invoices')); ?></h1>
</div>
<section class="content">
    <div class="row">
        <div class="col-lg-12">
            <div class="box  box-primary">
                <div class="box-body">
                    <div class="table-responsive">
                        <table class="table table-bordered table-striped table-hover ajax_datatable">
                        <thead>
                        <tr>
                            <th width="10%"><?php echo e(trans('application.invoice_number')); ?></th>
                            <th width="10%"><?php echo e(trans('application.status')); ?></th>
                            <th width="10%"><?php echo e(trans('application.due_date')); ?></th>
                            <th width="10%" class="text-right"><?php echo e(trans('application.amount')); ?></th>
                            <th width="10%" class="text-right"><?php echo e(trans('application.paid')); ?></th>
                            <th width="10%" class="text-right"><?php echo e(trans('application.amount_due')); ?></th>
                            <th width="15%"><?php echo e(trans('application.action')); ?></th>
                        </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
    <script type="text/javascript">
        $(document).ready(function() {
            $('.ajax_datatable').DataTable({
                processing: true,
                serverSide: true,
                stateSave: true,
                ajax: '<?php echo e(route('cinvoices.index')); ?>',
                order: [],
                columnDefs: [{
                    "orderable": false,
                    "targets": 0
                }],
                oLanguage: {
                    "sProcessing":"<?php echo e(trans('application.processing')); ?>"
                },
                columns:[
                    {data: 'number',name:'invoices.number',orderable:false},
                    {data: 'status',orderable:false},
                    {data: 'due_date',orderable:false},
                    {data: 'grand_total', 'searchable':false,className: "text-right",orderable:false},
                    {data: 'paid', 'searchable':false,className: "text-right",orderable:false},
                    {data: 'amountDue', 'searchable':false,className: "text-right",orderable:false},
                    {data: 'action', 'searchable':false,orderable:false,className: "text-right"}
                ]
            });
            $('div.dataTables_filter input').addClass('form-control input-sm');
            $('div.dataTables_length select').addClass('form-control input-sm');
        });
        function selected_method(elem){
            var form = $(elem).parent('form');
            var selected_method = $(elem).attr('id');
            $('.card').removeClass('active');
            $(elem).addClass('active');
            $('#selected_method').val(selected_method);
            $('#method_btn').prop('disabled', false);
        }
    </script>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('clientarea.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>