
<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-th-large"></i> <?php echo e(trans('application.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="box box-primary">
                <div class="box-body">
                    <?php if(count($errors) > 0): ?>
                        <?php echo form_errors($errors); ?>
                    <?php endif; ?>
                    <?php echo Form::open(['route' => ['tax.store']]); ?>
                    <div class="form-group">
                        <?php echo Form::label('name', trans('application.tax_name')); ?>
                        <div class="input-group col-md-4">
                        <?php echo Form::text('name', null, ['class' => "form-control input-sm required", 'required']); ?>
                        </div>
                    </div>
                    <div class="form-group">
                        <?php echo Form::label('value', trans('application.tax_value')); ?>
                        <div class="input-group col-md-4">
                        <?php echo Form::input('number','value', null, ['class' => "form-control input-sm required",'step'=>'any', 'min'=>'0', 'required']); ?>
                            <span class="input-group-btn ">
                                <button class="btn btn-sm btn-default">%</button>
                            </span>
                        </div>
                    </div>
                    <div class="form-group">
                        <?php echo Form::submit(trans('application.save'), ['class'=>"btn btn-sm btn-primary"]); ?>
                    </div>
                    <?php echo Form::close(); ?>
                    <table class="table table-striped table-bordered datatable">
                        <thead>
                        <tr>
                            <th></th>
                            <th><?php echo e(trans('application.name')); ?></th>
                            <th><?php echo e(trans('application.value')); ?></th>
                            <th><?php echo e(trans('application.default')); ?></th>
                            <th><?php echo e(trans('application.action')); ?></th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php if($taxes->count() > 0): ?>
                            <?php $__currentLoopData = $taxes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tax): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
                            <tr>
                                <td></td>
                                <td><?php echo e($tax->name); ?></td>
                                <td><?php echo e($tax->value); ?>%</td>
                                <td><?php echo $tax->selected  ? '<span class="label label-success">'.trans('application.yes').'</span>' : '<span class="label label-danger">'.trans('application.no').'</span>'; ?></td>
                                <td>
                                   <?php echo edit_btn('tax.edit', $tax->uuid); ?>
                                   <?php echo delete_btn('tax.destroy', $tax->uuid); ?>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
                        <?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(); ?>