2013-06-13 23:33:24 +02:00
|
|
|
- url = ( stock_article.new_record? ) ? ( add_stock_article_supplier_deliveries_path(@supplier) ) : ( update_stock_article_supplier_deliveries_path(@supplier) )
|
|
|
|
= simple_form_for stock_article, url: url, remote: true, validate: true do |f|
|
2011-05-27 14:09:01 +02:00
|
|
|
= f.hidden_field :supplier_id
|
2013-06-13 23:33:24 +02:00
|
|
|
- unless stock_article.new_record?
|
|
|
|
= f.hidden_field :id
|
2013-06-11 13:10:18 +02:00
|
|
|
.modal-header
|
|
|
|
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
2013-06-11 15:05:19 +02:00
|
|
|
%h3= t 'activerecord.models.stock_article'
|
2013-06-11 13:10:18 +02:00
|
|
|
.modal-body
|
|
|
|
= f.input :name
|
|
|
|
= f.input :unit
|
|
|
|
= f.input :note
|
|
|
|
- if stock_article.new_record?
|
|
|
|
= f.input :price
|
2013-06-17 15:47:08 +02:00
|
|
|
= f.input :tax, :wrapper => :append do
|
|
|
|
= f.input_field :tax
|
|
|
|
%span.add-on %
|
2013-06-11 13:10:18 +02:00
|
|
|
= f.input :deposit
|
|
|
|
- else
|
2013-06-13 23:33:24 +02:00
|
|
|
= f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('stockit.form.price_hint')
|
2013-06-11 13:10:18 +02:00
|
|
|
= f.association :article_category
|
|
|
|
.modal-footer
|
|
|
|
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
|
|
|
|
= f.submit class: 'btn btn-primary'
|