Add percent sign for tax in forms
This commit is contained in:
parent
53518039f1
commit
0f4614eb31
6 changed files with 26 additions and 11 deletions
|
@ -27,8 +27,10 @@
|
||||||
%td= form.text_field 'note', class: 'input-medium'
|
%td= form.text_field 'note', class: 'input-medium'
|
||||||
%td= form.collection_select 'article_category_id', ArticleCategory.all,
|
%td= form.collection_select 'article_category_id', ArticleCategory.all,
|
||||||
:id, :name, { :include_blank => true }, class: 'input-small'
|
:id, :name, { :include_blank => true }, class: 'input-small'
|
||||||
%td= form.text_field 'tax', class: 'input-mini'
|
%td.input-append
|
||||||
|
= form.text_field 'tax', class: 'input-mini'
|
||||||
|
%span.add-on %
|
||||||
%td= form.text_field 'deposit', class: 'input-mini'
|
%td= form.text_field 'deposit', class: 'input-mini'
|
||||||
- unless article.errors.empty?
|
- unless article.errors.empty?
|
||||||
%tr.alert
|
%tr.alert
|
||||||
%td(colspan="10")= article.errors.full_messages.join(", ")
|
%td(colspan="10")= article.errors.full_messages.join(", ")
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
= f.input :price
|
= f.input :price
|
||||||
= f.input :unit_quantity
|
= f.input :unit_quantity
|
||||||
= f.input :order_number
|
= f.input :order_number
|
||||||
= f.input :tax
|
= f.input :tax, :wrapper => :append do
|
||||||
|
= f.input_field :tax
|
||||||
|
%span.add-on %
|
||||||
= f.input :deposit
|
= f.input :deposit
|
||||||
.modal-footer
|
.modal-footer
|
||||||
= button_tag "Schließen", class: 'btn', data: {dismiss: 'modal'}
|
= button_tag "Schließen", class: 'btn', data: {dismiss: 'modal'}
|
||||||
|
|
|
@ -63,11 +63,14 @@
|
||||||
%td{:style => highlight_new(attrs, :unit)}= form.text_field 'unit', class: 'input-mini'
|
%td{:style => highlight_new(attrs, :unit)}= form.text_field 'unit', class: 'input-mini'
|
||||||
%td{:style => highlight_new(attrs, :unit_quantity)}= form.text_field 'unit_quantity', class: 'input-mini'
|
%td{:style => highlight_new(attrs, :unit_quantity)}= form.text_field 'unit_quantity', class: 'input-mini'
|
||||||
%td{:style => highlight_new(attrs, :price)}= form.text_field 'price', class: 'input-mini'
|
%td{:style => highlight_new(attrs, :price)}= form.text_field 'price', class: 'input-mini'
|
||||||
%td{:style => highlight_new(attrs, :tax)}= form.text_field 'tax', class: 'input-mini'
|
%td{:style => highlight_new(attrs, :tax)}.input-append
|
||||||
|
= form.text_field 'tax', class: 'input-mini'
|
||||||
|
%span.add-on %
|
||||||
|
-# untested, because database is not set up locally!
|
||||||
%td{:style => highlight_new(attrs, :deposit)}= form.text_field 'deposit', class: 'input-mini'
|
%td{:style => highlight_new(attrs, :deposit)}= form.text_field 'deposit', class: 'input-mini'
|
||||||
%td= form.select :article_category_id, ArticleCategory.all.map {|a| [ a.name, a.id ] },
|
%td= form.select :article_category_id, ArticleCategory.all.map {|a| [ a.name, a.id ] },
|
||||||
{include_blank: true}, class: 'input-small'
|
{include_blank: true}, class: 'input-small'
|
||||||
%hr/
|
%hr/
|
||||||
= hidden_field 'supplier', 'id'
|
= hidden_field 'supplier', 'id'
|
||||||
= submit_tag 'Alle löschen/aktualisieren', class: 'btn btn-primary'
|
= submit_tag 'Alle löschen/aktualisieren', class: 'btn btn-primary'
|
||||||
= link_to 'oder abbrechen', supplier_articles_path(@supplier)
|
= link_to 'oder abbrechen', supplier_articles_path(@supplier)
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
= f.input :unit
|
= f.input :unit
|
||||||
= f.input :note
|
= f.input :note
|
||||||
= f.input :price
|
= f.input :price
|
||||||
= f.input :tax
|
= f.input :tax, :wrapper => :append do
|
||||||
|
= f.input_field :tax
|
||||||
|
%span.add-on %
|
||||||
|
-# untested, because this view is currently not included (?)
|
||||||
= f.input :deposit
|
= f.input :deposit
|
||||||
= f.association :article_category
|
= f.association :article_category
|
||||||
= f.submit class: 'btn'
|
= f.submit class: 'btn'
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
= f.input :unit
|
= f.input :unit
|
||||||
= f.input :note
|
= f.input :note
|
||||||
= f.input :price
|
= f.input :price
|
||||||
= f.input :tax
|
= f.input :tax, :wrapper => :append do
|
||||||
|
= f.input_field :tax
|
||||||
|
%span.add-on %
|
||||||
|
-# untested, because this view is currently not included (?)
|
||||||
= f.input :deposit
|
= f.input :deposit
|
||||||
= f.association :article_category
|
= f.association :article_category
|
||||||
= f.submit
|
= f.submit
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
|
|
||||||
- if stock_article.new_record?
|
- if stock_article.new_record?
|
||||||
= f.input :price
|
= f.input :price
|
||||||
= f.input :tax
|
= f.input :tax, :wrapper => :append do
|
||||||
|
= f.input_field :tax
|
||||||
|
%span.add-on %
|
||||||
= f.input :deposit
|
= f.input :deposit
|
||||||
- else
|
- else
|
||||||
= f.input :price, :input_html => {:disabled => 'disabled'},
|
= f.input :price, :input_html => {:disabled => 'disabled'},
|
||||||
|
@ -14,4 +16,4 @@
|
||||||
= f.association :article_category
|
= f.association :article_category
|
||||||
.form-actions
|
.form-actions
|
||||||
= f.submit class: 'btn'
|
= f.submit class: 'btn'
|
||||||
= link_to "oder abbrechen", stock_articles_path
|
= link_to "oder abbrechen", stock_articles_path
|
||||||
|
|
Loading…
Reference in a new issue