2015-10-21 13:11:08 +02:00
|
|
|
@extends('header')
|
|
|
|
|
2017-01-02 12:38:58 +01:00
|
|
|
@section('content')
|
2015-10-21 13:11:08 +02:00
|
|
|
@parent
|
|
|
|
|
|
|
|
@include('accounts.nav', ['selected' => ACCOUNT_TAX_RATES])
|
|
|
|
|
|
|
|
{!! Former::open($url)->method($method)
|
|
|
|
->rules([
|
|
|
|
'name' => 'required',
|
2017-01-16 13:51:43 +01:00
|
|
|
'rate' => 'required',
|
|
|
|
'is_inclusive' => 'required',
|
2015-10-21 13:11:08 +02:00
|
|
|
])
|
|
|
|
->addClass('warn-on-exit') !!}
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">{!! $title !!}</h3>
|
|
|
|
</div>
|
|
|
|
<div class="panel-body form-padding-right">
|
|
|
|
|
|
|
|
@if ($taxRate)
|
|
|
|
{{ Former::populate($taxRate) }}
|
2017-01-02 12:38:58 +01:00
|
|
|
{{ Former::populateField('is_inclusive', intval($taxRate->is_inclusive)) }}
|
2015-10-21 13:11:08 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
{!! Former::text('name')->label('texts.name') !!}
|
|
|
|
{!! Former::text('rate')->label('texts.rate')->append('%') !!}
|
|
|
|
|
2018-01-23 15:27:50 +01:00
|
|
|
@if (! $taxRate && ! auth()->user()->account->inclusive_taxes)
|
2017-12-03 12:56:10 +01:00
|
|
|
{!! Former::radios('is_inclusive')->radios([
|
|
|
|
trans('texts.exclusive') . ': 100 + 10% = 100 + 10' => array('name' => 'is_inclusive', 'value' => 0),
|
|
|
|
trans('texts.inclusive') . ': 100 + 10% = 90.91 + 9.09' => array('name' => 'is_inclusive', 'value' => 1),
|
|
|
|
])->check(0)
|
|
|
|
->label('type')
|
|
|
|
->help('tax_rate_type_help') !!}
|
|
|
|
@endif
|
2017-01-02 12:38:58 +01:00
|
|
|
|
2015-10-21 13:11:08 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-11-03 09:19:03 +01:00
|
|
|
<center class="buttons">
|
|
|
|
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(URL::to('/settings/tax_rates'))->appendIcon(Icon::create('remove-circle')) !!}
|
|
|
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
|
|
|
</center>
|
2015-10-21 13:11:08 +02:00
|
|
|
|
|
|
|
{!! Former::close() !!}
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
$('#name').focus();
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
2017-01-02 12:38:58 +01:00
|
|
|
@stop
|