<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-body">
    <div class="form-body control-group">
    <h3 class="card-title">Salary Wallet Summary</h3>
    <div class="row">
        <div class="col-lg-3 col-md-6">
            <div class="card">
                <div class="card-body">
                    <div class="d-flex flex-row">
                        
                        <div class="m-l-10 align-self-center">
                            <h3 class="m-b-0 font-lgiht"><?php echo e(IND_money_format((isset($userWallet->reward_salary)?$userWallet->reward_salary:0))); ?></h3>
                            <h5 class="text-muted m-b-0">Salary Wallet Balance</h5></div>
                    </div>
                </div>
            </div>
        </div>
</div>
<div class="card">
    <div class="card-body">
        <h3 class="card-title">Salary Wallet Summary</h3>
        <div class="table-responsive">
            <table class="table table-bordered" id="users-table">
                    <thead>
                        <tr>
                            <th>S. No.</th>
                            <th>Rank</th>
                            <th>Level</th>
                            <th>Amount</th>
                            <th>Month</th>
                            <th>Type</th>
                            <th>Date</th>
                            <th>Remark</th>
                        </tr>
                    </thead>
                </table>
        </div>
    </div>
</div>
<div class="modal fade" id="loadModalAjax" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="display: none;" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
    </div>
    <!-- /.modal-content -->
   </div>
  <!-- /.modal-dialog -->
</div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('javascript'); ?>
    <script>
        var t = $('#users-table').DataTable({
                processing: true,
                serverSide: true,
                ajax: '<?php echo url('/'); ?>/incomes/salaryWalletAnyData',
                dom: 'frtip',
                'lengthMenu': [ [10, 25, 50, -1], [10, 25, 50, "All"] ],
                columns: [
                    { data: 'id', name: 'id' },
                    { data: 'full_name', name: 'full_name' },
                    { data: 'username', name: 'username' },
                    { data: 'income_amount', name: 'income_amount' },
                    { data: 'orig_amount', name: 'orig_amount' },
                    { data: 'credit_debit', name: 'credit_debit', searchable:false },
                    { data: 'created_at', name: 'created_at' },
                    { data: 'remark', name: 'remark' }
                ],
                "columnDefs": [
                    {
                        "render": function ( data, type, row, meta) {
                            return meta.row + meta.settings._iDisplayStart + 1;
                         },
                        "targets": 0
                    },
                    {
                        "render": function ( data, type, row ) {
                        if(data==0){
                            return '<span class="label label-success">Credit</span>';
                        }else{
                            return '<span class="label label-danger">Debit</span>';
                        }
                        },
                        "targets": 6
                    },
                    {
                        "render": function ( data, type, row ) {
                        return data.replace(/\/\/\/\/\/\/\/\/\/\/\/\/\//g, '<br />')
                        },
                        "targets": 7
                    }
                ],
                'order': [[1, 'asc']],
                drawCallback: function( settings ) {
                    openModal();
                  }
            });
            
            function openModal(){
              $('.openModal').click(function(){
              	 $('#loadModalAjax .modal-content').load('<?php echo e(url('/')); ?>/users/' + $(this).attr('data-id'),function(result){
            	    $('#loadModalAjax').modal({show:true});
                  //init_validation('#updateStudentForm', rules, messages);
            	   });
              });
              $('.openModalInvoices').click(function(){
              	 $('#loadModalAjax .modal-content').load('/student_invoices_modal.php?id=' + $(this).attr('data-id'),function(result){
            	    $('#loadModalAjax').modal({show:true});
                  //init_validation('#updateStudentForm', rules, messages);
            	   });
              });
            }

    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\xampp\htdocs\yespropmart2.loc\resources\views/incomes/salaryWallet.blade.php ENDPATH**/ ?>