Fixed deliveries.
This commit is contained in:
parent
552c553b77
commit
9af26e1da6
14 changed files with 184 additions and 225 deletions
|
|
@ -1,4 +1,4 @@
|
|||
- content_for :head do
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
$(function() {
|
||||
$('.destroy_stock_change').live('click', function() {
|
||||
|
|
@ -12,32 +12,29 @@
|
|||
})
|
||||
});
|
||||
|
||||
.left_column(style="width:50%")
|
||||
= simple_form_for [@supplier,@delivery], :validate => true do |f|
|
||||
.box_title
|
||||
%h2 Lieferung anlegen
|
||||
.column_content
|
||||
.row-fluid
|
||||
.span6
|
||||
= simple_form_for [@supplier, @delivery], validate: true do |f|
|
||||
= f.hidden_field :supplier_id
|
||||
%b Lagerartikel des Lieferanten
|
||||
#stock_changes
|
||||
= f.fields_for :stock_changes do |stock_change_form|
|
||||
%p
|
||||
= stock_change_form.select :stock_article_id, stock_articles_for_select(@supplier)
|
||||
Menge
|
||||
= stock_change_form.text_field :quantity, :size => 5, :autocomplete => 'off'
|
||||
= stock_change_form.text_field :quantity, size: 5, autocomplete: 'off'
|
||||
= stock_change_form.hidden_field :_destroy
|
||||
= link_to "Artikel aus Lieferung entfernen", "#", :class => 'destroy_stock_change'
|
||||
= link_to "Artikel aus Lieferung entfernen", "#", class: 'destroy_stock_change'
|
||||
%p
|
||||
= link_to "Lagerartikel der Lieferung hinzufügen", {:action => 'add_stock_change', :supplier_id => @supplier.id}, :remote => true
|
||||
= link_to "Lagerartikel der Lieferung hinzufügen", {action: 'add_stock_change', supplier_id: @supplier.id}, remote: true
|
||||
%hr/
|
||||
= f.input :delivered_on
|
||||
= f.input :note, :input_html => {:size => '35x4'}
|
||||
= f.submit
|
||||
= f.input :delivered_on, as: :date_picker
|
||||
= f.input :note, input_html: {size: '35x4'}
|
||||
.form-actions
|
||||
= f.submit class: 'btn btn-primary'
|
||||
= link_to "oder abbrechen", supplier_deliveries_path(@supplier)
|
||||
|
||||
.right_column{:style => "width:45%;"}
|
||||
.box_title
|
||||
.span6
|
||||
%h2 Neuen Lagerartikel anlegen
|
||||
.column_content
|
||||
%p
|
||||
//TODO: Fix this!!
|
||||
Suche nach Artikeln aus dem
|
||||
|
|
@ -46,7 +43,4 @@
|
|||
= text_field_tag 'article_name'
|
||||
%hr/
|
||||
#stock_article_form
|
||||
= render :partial => 'stock_article_form', :locals => {:stock_article => @supplier.stock_articles.build}
|
||||
|
||||
%p{:style => "clear:both"}
|
||||
= link_to 'Zurück', supplier_deliveries_path(@supplier)
|
||||
= render 'stock_article_form', stock_article: @supplier.stock_articles.build
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue