Always require invoice VAT rate

Closes #1031
This commit is contained in:
Artur Beljajev 2019-03-07 17:42:21 +02:00
parent d85e57d800
commit 7723a30d1b
17 changed files with 240 additions and 200 deletions

View file

@ -60,7 +60,7 @@
</div>
<%= render 'admin/registrars/form/address', f: f %>
<%= render 'admin/registrars/form/billing', f: f %>
<%= render 'admin/registrars/form/billing', f: f, registry_vat_rate: registry_vat_rate %>
<div class="row">
<div class="col-md-8">

View file

@ -51,6 +51,7 @@
<%= f.select :address_country_code,
SortedCountry.all_options(f.object.address_country_code), {},
required: true, class: 'form-control' %>
<span class="help-block"><%= t '.country_hint' %></span>
</div>
</div>

View file

@ -21,12 +21,14 @@
<div class="col-md-4 control-label">
<%= f.label :vat_rate %>
</div>
<div class="col-md-3">
<div class="input-group">
<div class="col-md-8">
<div class="col-md-4 input-group">
<%= f.number_field :vat_rate, min: 0, max: 99.9, step: 0.1,
class: 'form-control' %>
<div class="input-group-addon">%</div>
</div>
<span class="help-block"><%= t '.vat_rate_hint', registry_vat_rate:
number_to_percentage(registry_vat_rate, precision: 1) %></span>
</div>
</div>