Simplify balancing view. Part 1 of ...
This commit is contained in:
parent
218f40eb8d
commit
467874a8a5
22 changed files with 128 additions and 170 deletions
|
|
@ -1,7 +1,7 @@
|
|||
%p{:style => "float:left"}
|
||||
%b Lieferung bearbeiten
|
||||
%p{:style => "float:right"}
|
||||
/= remote_link_to "Artikel hinzufügen", :url => {:action => "new_order_article", :id => @order}
|
||||
= link_to "Artikel hinzufügen", new_finance_order_order_article_path(@order), remote: true
|
||||
|
||||
%table{:class => "ordered_articles", :style => "clear:both"}
|
||||
%thead
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
%td Einheiten
|
||||
%td Gesamtpreis
|
||||
%td{:colspan => "3",:style => "width:14em"}
|
||||
= link_to '[Gruppe hinzufügen]', '#'
|
||||
/:url => {:action => "new_group_order_article", :id => order_article}
|
||||
= link_to '[Gruppe hinzufügen]', new_finance_group_order_article_path(order_id: order_article.order_id),
|
||||
remote: true
|
||||
%tbody
|
||||
- for group_order_article in order_article.group_order_articles.ordered.all(:include => [:group_order])
|
||||
%tr{:class => cycle('even', 'odd', :name => 'results')}[group_order_article]
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
%h2
|
||||
Neuer gelieferter Artikel die Bestellung
|
||||
|
||||
- remote_form_for :order_article, :url => {:action => 'create_order_article', :order_id => @order.id}, |
|
||||
:before => "Element.show('loader')", :success => "Element.hide('loader')" do |form| |
|
||||
%p
|
||||
Suche im Katalog
|
||||
= text_field_with_auto_complete :article, :name, {}, |
|
||||
{:url => {:action => 'auto_complete_for_article_name', :order_id => @order.id}, |
|
||||
:after_update_element => 'setHiddenId'} |
|
||||
%p
|
||||
= form.hidden_field :article_id, :id => 'hidden_id'
|
||||
= submit_tag "Neuen Artikel hinzufügen"
|
||||
|
|
||||
= link_to_function "Abbrechen", "Element.hide('edit_box')"
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
%td.closed
|
||||
= link_to order_article.article.name, '#'
|
||||
/"Element.toggle('group_order_articles_#{order_article.id}'); |
|
||||
/Element.toggleClassName(this.up('td'), 'open')" |
|
||||
= link_to order_article.article.name, '#', 'data-toggle-this' => "#group_order_articles_#{order_article.id}"
|
||||
%td= order_article.article.order_number
|
||||
%td
|
||||
= order_article.units_to_order
|
||||
|
|
@ -21,10 +19,7 @@
|
|||
%td= order_article.price.tax
|
||||
%td= order_article.price.deposit
|
||||
%td
|
||||
= link_to icon(:edit), '#'
|
||||
/:url => {:action => 'edit_order_article', :id => order_article} |
|
||||
= link_to icon(:edit), edit_finance_order_order_article_path(@order, order_article), remote: true
|
||||
%td
|
||||
= link_to icon(:delete), '#'
|
||||
/:confirm => 'Bist du sicher?'
|
||||
/:url => {:action => 'destroy_order_article', :id => order_article},
|
||||
/:method => :post
|
||||
= link_to icon(:delete), finance_order_order_article_path(@order, order_article), method: :delete,
|
||||
remote: true, confirm: 'Bist du sicher?'
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
- if @error
|
||||
%b= @error
|
||||
%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"
|
||||
|
|
||||
= link_to_function 'Abbrechen', "Element.hide('edit_box')"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
%tr{:class => cycle('even', 'odd', :name => 'articles')}[order_article]
|
||||
= render :partial => 'order_article', :locals => {:order_article => order_article}
|
||||
= render :partial => 'finance/balancing/order_article', :locals => {:order_article => order_article}
|
||||
|
||||
%tr{:id => "group_order_articles_#{order_article.id}", :class => "results", :style => "display:none"}
|
||||
= render :partial => 'group_order_articles', :locals => {:order_article => order_article}
|
||||
= render :partial => 'finance/balancing/group_order_articles', :locals => {:order_article => order_article}
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
.box_title
|
||||
%h2 noch nicht abgerechnet
|
||||
.column_content
|
||||
%p= link_to "Bestellungsübersicht", :controller => 'balancing', :action => 'list'
|
||||
%p= link_to "Bestellungsübersicht", finance_balancing_path
|
||||
- unless @orders.empty?
|
||||
%table.list
|
||||
%thead
|
||||
|
|
@ -58,6 +58,6 @@
|
|||
%td= order.name
|
||||
%td= format_date(order.ends)
|
||||
%td{:class => "currency"}= number_to_currency(order.sum(:fc))
|
||||
%td= link_to "abrechnen", :action => "new", :id => order
|
||||
%td= link_to "abrechnen", new_finance_order_path(id: order)
|
||||
- else
|
||||
Super, alles schon abgerechnet...
|
||||
Loading…
Add table
Add a link
Reference in a new issue