Fix StockArticle creation during delivery; small cleanups
This commit is contained in:
parent
ad29a238f2
commit
e28f3eda65
10 changed files with 66 additions and 44 deletions
|
|
@ -1,11 +1,19 @@
|
|||
= simple_form_for stock_article, url: add_stock_article_supplier_deliveries_path(@supplier), remote: true,
|
||||
validate: true do |f|
|
||||
= simple_form_for stock_article, url: add_stock_article_supplier_deliveries_path(supplier), remote: true, validate: true do |f|
|
||||
= f.hidden_field :supplier_id
|
||||
= f.input :name
|
||||
= f.input :unit
|
||||
= f.input :note
|
||||
= f.input :price
|
||||
= f.input :tax
|
||||
= f.input :deposit
|
||||
= f.association :article_category
|
||||
= f.submit class: 'btn'
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
%h3= t '.title'
|
||||
.modal-body
|
||||
= f.input :name
|
||||
= f.input :unit
|
||||
= f.input :note
|
||||
- if stock_article.new_record?
|
||||
= f.input :price
|
||||
= f.input :tax
|
||||
= f.input :deposit
|
||||
- else
|
||||
= f.input :price, :input_html => {:disabled => 'disabled'}, :hint => t('.form.price_hint')
|
||||
= f.association :article_category
|
||||
.modal-footer
|
||||
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
|
||||
= f.submit class: 'btn btn-primary'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue