<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-th-large"></i> Tax Settings</h1>
</div>

<section class="content">
    <div class="row">
        <div class="col-md-3">
            <?php echo $__env->make('settings.partials._menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">Tax Settings</div>
                <div class="panel-body">
                    <?php if(count($errors) > 0): ?>
                    <?php echo form_errors($errors); ?>

                    <?php endif; ?>
                    <?php if(Session::has('flash_notification.message')): ?>
                    <?php echo message(); ?>

                    <?php endif; ?>

                    <?php echo Form::open(['route' => ['settings.tax.store']]); ?>

                    <div class="form-group">
                        <?php echo Form::label('name', 'Tax Name'); ?>

                        <?php echo Form::text('name', null, ['class' => "form-control"]); ?>

                    </div>
                    <div class="form-group">
                        <?php echo Form::label('value', 'Tax Value'); ?>

                        <div class="input-group col-md-2">
                        <?php echo Form::text('value', null, ['class' => "form-control"]); ?>

                            <span class="input-group-btn ">
                                <button class="btn btn-default">%</button>
                            </span>
                        </div>
                    </div>
                    <div class="form-group">
                        <?php echo Form::submit('Save', ['class="btn btn-info"']); ?>

                    </div>
                    <?php echo Form::close(); ?>


                    <table class="table table-striped table-bordered">
                        <thead>
                        <tr>
                            <th></th>
                            <th>Name</th>
                            <th>Value</th>
                            <th>Default</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php if($taxes->count() > 0): ?>
                            <?php foreach($taxes as $count => $tax): ?>
                            <tr>
                                <td><?php echo e($count+1); ?>.</td>
                                <td><?php echo e($tax->name); ?></td>
                                <td><?php echo e($tax->value); ?>%</td>
                                <td><?php echo $tax->default ? '<span class="label label-success">Yes</span>' : '<span class="label label-danger">No</span>'; ?></td>
                                <td>
                                   <?php echo edit_btn('users.edit', $tax->id); ?>

                                    <?php echo delete_btn('users.destroy', $tax->id); ?>

                                </td>
                            </tr>
                            <?php endforeach; ?>
                        <?php else: ?>
                        <tr>
                            <td colspan="4">No tax rates have been added</td>
                        </tr>
                        <?php endif; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>