2009-02-05 16:40:02 +01:00
|
|
|
- title "Bestellung: #{@order.name}"
|
2009-01-06 11:49:19 +01:00
|
|
|
#element_navigation
|
2009-02-05 16:40:02 +01:00
|
|
|
= link_to_unless @order.previous == @order, "<< #{@order.previous.name}", @order.previous
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
= link_to _("Overview"), orders_path
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
2009-02-05 16:40:02 +01:00
|
|
|
= link_to_unless @order.next == @order, "#{@order.next.name} >>", @order.next
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
// Order summary
|
2009-01-29 01:57:51 +01:00
|
|
|
.left_column{:style => "width:65em"}
|
2009-01-06 11:49:19 +01:00
|
|
|
.box_title
|
2009-01-29 01:57:51 +01:00
|
|
|
%h2 Zusammenfassung
|
2009-01-06 11:49:19 +01:00
|
|
|
.column_content
|
2009-01-29 01:57:51 +01:00
|
|
|
- if @order.finished? and !@order.closed?
|
2009-01-06 11:49:19 +01:00
|
|
|
%p
|
2009-01-29 01:57:51 +01:00
|
|
|
%b{:style => "color:red"}=_ "Order isn't closed yet"
|
2009-01-06 11:49:19 +01:00
|
|
|
%p
|
2009-01-29 01:57:51 +01:00
|
|
|
Lieferant:
|
2009-02-05 16:40:02 +01:00
|
|
|
%b=h @order.name
|
2009-01-06 11:49:19 +01:00
|
|
|
- unless @order.note.empty?
|
|
|
|
%p
|
2009-01-29 01:57:51 +01:00
|
|
|
Notiz:
|
2009-01-06 11:49:19 +01:00
|
|
|
=h @order.note
|
|
|
|
%p
|
2009-01-29 01:57:51 +01:00
|
|
|
Beginn:
|
2009-01-06 11:49:19 +01:00
|
|
|
%b=h format_time(@order.starts)
|
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
Ende:
|
2009-01-06 11:49:19 +01:00
|
|
|
%b=h format_time(@order.ends)
|
|
|
|
%p
|
2009-01-29 01:57:51 +01:00
|
|
|
Gruppenbestellungen:
|
|
|
|
%b= @order.group_orders.count
|
|
|
|
= "[#{@order.group_orders.find(:all, :include => :ordergroup).collect{|g| g.ordergroup.name}.join(', ')}]"
|
|
|
|
|
2009-01-06 11:49:19 +01:00
|
|
|
%p
|
2009-02-03 21:14:48 +01:00
|
|
|
Netto/Bruttosumme aller Artikel
|
|
|
|
%b= "#{number_to_currency(@order.sum(:net))} / #{number_to_currency(@order.sum(:gross))}"
|
|
|
|
%p
|
|
|
|
Bestellte Artikel:
|
|
|
|
%b= @order.order_articles.ordered.count
|
2009-01-29 01:57:51 +01:00
|
|
|
|
2009-02-03 21:14:48 +01:00
|
|
|
|
|
|
|
%p
|
|
|
|
Aktionen:
|
|
|
|
- if @order.open?
|
|
|
|
= link_to "Bearbeiten", edit_order_path(@order)
|
2009-02-09 20:12:56 +01:00
|
|
|
|
|
2009-02-03 21:14:48 +01:00
|
|
|
= link_to 'Beenden!', finish_order_path(@order), :method => :post, :confirm => "Willst Du wirklich die Bestellung beenden?\nEs gibt kein zurück.."
|
2009-02-09 20:12:56 +01:00
|
|
|
|
|
2009-02-03 21:14:48 +01:00
|
|
|
- unless @order.closed?
|
|
|
|
= link_to "Löschen", @order, :confirm => "Willst du wirklich die Bestellung löschen?", :method => :delete
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
|
|
|
|
- unless @order.open?
|
2009-01-06 11:49:19 +01:00
|
|
|
%p
|
2009-01-29 01:57:51 +01:00
|
|
|
= update_articles_link(@order, "Artikelübersicht", :normal)
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
= update_articles_link(@order, "Sortiert nach Gruppen", :groups)
|
|
|
|
= link_to_pdf(@order, 'groupsPdf')
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
= update_articles_link(@order, "Sortiert nach Artikeln", :articles)
|
|
|
|
= link_to_pdf(@order, 'articlesPdf')
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
Matrix:
|
|
|
|
= link_to_pdf(@order, 'matrixPdf')
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
Faxvorlage:
|
|
|
|
= link_to_pdf(@order, 'faxPdf')
|
2009-01-06 11:49:19 +01:00
|
|
|
= link_to image_tag("text_file.png", :size => "16x16", :border => "0", :alt => "Textdatei erstellen"), { :action => 'text_fax_template', :id => @order }, { :title => _("Download file") }
|
|
|
|
|
|
|
|
|
= link_to 'Kommentare', '#comments'
|
|
|
|
|
|
|
|
.single_column{:style => "clear:both; width:70em;"}
|
|
|
|
.box_title
|
2009-01-29 01:57:51 +01:00
|
|
|
%h2 Artikel
|
|
|
|
.column_content#articles
|
|
|
|
= render :partial => 'articles', :locals => { :order => @order }
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2009-01-29 01:57:51 +01:00
|
|
|
.single_column{:style => "width:70em;"}
|
|
|
|
.box_title
|
|
|
|
%h2 Kommentare
|
|
|
|
.column_content#comments
|
|
|
|
= render :partial => "/shared/comments", :locals => { :comments => @order.comments }
|
|
|
|
%p
|
|
|
|
- form_for :comment, :url => add_comment_order_path(@order) do |form|
|
|
|
|
%p
|
|
|
|
%b Neuen Kommentar hinzufügen:
|
|
|
|
%br/
|
2009-02-12 18:32:20 +01:00
|
|
|
= form.text_area :text, :cols => 50, :rows => 6
|
2009-01-29 01:57:51 +01:00
|
|
|
%br/
|
|
|
|
= submit_tag "Kommentar hinzufügen"
|
|
|
|
|
|
|
|
= link_to_top
|