

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-md-4"></div>
	<div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading text-center"><b><?php echo e(_lang('Add Account Type')); ?></b></div>

            <div class="panel-body">
                <form method="post" class="validate" autocomplete="off" action="<?php echo e(route('save.account.types')); ?>" enctype="multipart/form-data">
                    <?php echo e(csrf_field()); ?>

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

                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="control-label"><?php echo e(_lang('Please Select Master Account')); ?></label>						
                            <select class="form-control" name="account_level" required>
                            <option value=""> <?php echo e(_lang('Please Select Master Account')); ?></option>
                                <?php $__currentLoopData = $master_account; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $master): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($master->id); ?>"><?php echo e($master->master_account); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <!-- <option value=""> <?php echo e(_lang('Please Select Master Account')); ?></option>
                                <option value="liabilities"><?php echo e(_lang('Liabilities')); ?></option>
                                <option value="assets"><?php echo e(_lang('Assets')); ?></option>
                                <option value="expenses"><?php echo e(_lang('Expenses')); ?></option>
                                <option value="income"> <?php echo e(_lang('Income')); ?></option> -->
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                    <div class="col-md-12">
                        <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>
                </form>
                </div>
           
        </div>
    </div>
    <div class="col-md-4"></div>
</div>
<div class="row"> 
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading text-center"><b><?php echo e(_lang('Displaying Account Types')); ?></b></div>
            <div class="panel-body">
                <table class="table table-bordered data-table">
                    <thead>
                    <tr>
                        <th><?php echo e(_lang('Account Type')); ?></th>
                        <th><?php echo e(_lang('Master Accounts')); ?></th> 
                        <th><?php echo e(_lang('Action')); ?></th>
                    </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $account_types; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $account_type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($account_type->account_type); ?></td>
                        <td><?php echo e($account_type->masterAccount ? $account_type->masterAccount->master_account : ''); ?></td>
                        <td> <a href="<?php echo e(route('edit_account_types.edit', $account_type->id)); ?>" class="btn btn-warning btn-sm"><?php echo e(_lang('Edit')); ?></a>
                        <form action="<?php echo e(route('delete_account_type.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/accounts_types.blade.php ENDPATH**/ ?>