Simplify balancing view. Part 1 of ...
This commit is contained in:
parent
218f40eb8d
commit
467874a8a5
22 changed files with 128 additions and 170 deletions
26
app/views/finance/order_articles/_edit.html.haml
Normal file
26
app/views/finance/order_articles/_edit.html.haml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
%h2 Artikel aktualisieren
|
||||
|
||||
= form_for [:finance, @order, @order_article], remote: true do |form|
|
||||
= @order_article.errors.try(:full_messages)
|
||||
%table
|
||||
%tr
|
||||
%th Name
|
||||
%th Nr.
|
||||
%th
|
||||
%abbr{:title=>"Anzahl gelieferter Gebinde"} Menge
|
||||
%th Einheit
|
||||
%th GebGr
|
||||
%th Netto
|
||||
%th MwSt.
|
||||
%th Pfand
|
||||
%tr
|
||||
%td= text_field_tag 'article[name]', @order_article.article.name, :size => 20
|
||||
%td= text_field_tag 'article[order_number]', @order_article.article.order_number, :size => 3
|
||||
%td= text_field_tag 'order_article[units_to_order]', @order_article.units_to_order, :size => 5
|
||||
%td= text_field_tag 'article[unit]', @order_article.article.unit, :size => 5
|
||||
%td= text_field_tag 'price[unit_quantity]', @order_article.price.unit_quantity, :size => 3
|
||||
%td= text_field_tag 'price[price]', @order_article.price.price, :size => 3
|
||||
%td= text_field_tag 'price[tax]', @order_article.price.tax, :size => 3
|
||||
%td= text_field_tag 'price[deposit]', @order_article.price.deposit, :size => 3
|
||||
%br/
|
||||
= submit_tag "Speichern"
|
||||
6
app/views/finance/order_articles/_new.html.haml
Normal file
6
app/views/finance/order_articles/_new.html.haml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
%h2
|
||||
Neuer gelieferter Artikel die Bestellung
|
||||
|
||||
= simple_form_for [:finance, @order, @order_article], remote: true do |form|
|
||||
= form.input :article_id, as: :select, collection: @order.supplier.articles.order(:name)
|
||||
= form.submit
|
||||
3
app/views/finance/order_articles/create.js.erb
Normal file
3
app/views/finance/order_articles/create.js.erb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$.fancybox.close();
|
||||
$('#result_table').
|
||||
prepend('<%= escape_javascript(render(partial: 'finance/balancing/order_article_result', locals: {order_article: @order_article}))%>');
|
||||
1
app/views/finance/order_articles/destroy.js.erb
Normal file
1
app/views/finance/order_articles/destroy.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$('#order_article_<%= @order_article.id %>, #group_order_articles_<%= @order_article.id %>').hide();
|
||||
1
app/views/finance/order_articles/edit.js.erb
Normal file
1
app/views/finance/order_articles/edit.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$.fancybox('<%= escape_javascript(render("edit")) %>');
|
||||
1
app/views/finance/order_articles/new.js.erb
Normal file
1
app/views/finance/order_articles/new.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$.fancybox('<%= escape_javascript(render("new")) %>');
|
||||
3
app/views/finance/order_articles/update.js.erb
Normal file
3
app/views/finance/order_articles/update.js.erb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$.fancybox.close();
|
||||
$('#order_article_<%= @order_article.id %>').
|
||||
html('<%= escape_javascript(render(partial: 'finance/balancing/order_article', locals: {order_article: @order_article})) %>');
|
||||
Loading…
Add table
Add a link
Reference in a new issue