

<?php $__env->startSection('content'); ?>

<div class="row">
	<div class="col-md-12">
		<div class="panel panel-default no-export">
			<div class="panel-heading"><span class="panel-title"><?php echo e(_lang('List Account')); ?></span>
			<!-- <a class="btn btn-primary btn-sm pull-right ajax-modal" data-title="<?php echo e(_lang('Add Account')); ?>" href="<?php echo e(route('accounts.create')); ?>"><?php echo e(_lang('Add New')); ?></a> -->
<br>
            <form method="post" class="validate" autocomplete="off" action="<?php echo e(route('save.account.deatils')); ?>" enctype="multipart/form-data">
                    <?php echo e(csrf_field()); ?>

                    <div class ="row">
                        <div class="col-md-4">
                        <div class="form-group">
                            <label class="control-label"><?php echo e(_lang('Account Number')); ?></label>						
                            <input type="text" class="form-control" name="account_nunber"  required>
                        </div>
                        </div>

                        <div class="col-md-4">
                        <div class="form-group">
                            <label class="control-label"><?php echo e(_lang('Account Name')); ?></label>						
                            <input type="text" class="form-control" name="account_name"  required>
                        </div>
                        </div>

                        <div class="col-md-4">
                        <div class="form-group">
                                <label class="control-label"><?php echo e(_lang('Please select Account Type')); ?></label>
                                <select class="form-control" name="account_type" required>
                                    <option value=""> <?php echo e(_lang('Please Select Acccount')); ?></option>
                                    <?php $__currentLoopData = $account_level; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $level): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($level['id']); ?>" >
                                            <?php echo e(_lang(($level['account_type']))); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    
                                </select>
                            </div>
                        </div>
                    </div>
                <div class="row">
                    <div class="form-group">
                    <div class="col-md-4"></div>
                    <div class="col-md-4"></div>
                        <div class="col-md-4 right">
                            <button type="reset" class="btn btn-danger"><?php echo e(_lang('Reset')); ?></button>
                            <button type="submit" class="btn btn-primary"><?php echo e(_lang('Save')); ?></button>
                        </div>
                    </div>
                </div>
            </form>
        </div>

			<div class="panel-body">
			 <?php if(\Session::has('success')): ?>
			  <div class="alert alert-success">
				<p><?php echo e(\Session::get('success')); ?></p>
			  </div>
			  <br />
			 <?php endif; ?>
               

			<table class="table table-bordered data-table">
			<thead>
			  <tr>
                <th><?php echo e(_lang('Account Number')); ?></th>
				<th><?php echo e(_lang('Account Name')); ?></th>
				<th><?php echo e(_lang('Account Type')); ?></th>
				<th><?php echo e(_lang('Action')); ?></th>
			  </tr>
			</thead>
            <tbody>
                <?php $__currentLoopData = $account_details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $account_type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                    <td><?php echo e($account_type->account_number); ?></td> 
                    <td><?php echo e($account_type->account_name); ?></td>
                    <td><?php echo e($account_type->account ? $account_type->account->account_type : ''); ?></td> 
                    <td> <a href="<?php echo e(route('edit.account.detail', $account_type->id)); ?>" class="btn btn-warning btn-sm"><?php echo e(_lang('Edit')); ?></a>
                        <form action="<?php echo e(route('delete_account_detail.destroy', $account_type->id)); ?>" method="POST" style="display: inline-block;">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('<?php echo e(_lang('Are you sure?')); ?>')"><?php echo e(_lang('Delete')); ?></button>
                        </form></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
		  </table>
			</div>
		</div>
	</div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.backend', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\hostel\resources\views/backend/accounting/accounts_details/account_details.blade.php ENDPATH**/ ?>