61 lines
No EOL
2.2 KiB
Text
61 lines
No EOL
2.2 KiB
Text
- title "Bestellung: #{@order.name}"
|
|
|
|
- if @order.finished? and !@order.closed?
|
|
.alert.alert-warning Achtung, Bestellung wurde noch nicht abgerechnet.
|
|
|
|
// Order summary
|
|
.well
|
|
%dl.dl-horizontal
|
|
%dt Lieferantin
|
|
%dd= @order.name
|
|
%dt Notiz
|
|
%dd= @order.note
|
|
%dt Beginn
|
|
%dd= format_time(@order.starts)
|
|
%dt Ende
|
|
%dd= format_time(@order.ends)
|
|
%dt Gruppenbestellungen:
|
|
%dd
|
|
= @order.group_orders.count
|
|
= "[#{@order.group_orders.includes(:ordergroup).all.collect{|g| g.ordergroup.name}.join(', ')}]"
|
|
|
|
%dt Netto/Bruttosumme aller Artikel:
|
|
%dd= "#{number_to_currency(@order.sum(:net))} / #{number_to_currency(@order.sum(:gross))}"
|
|
%dt Bestellte Artikel:
|
|
%dd= @order.order_articles.ordered.count
|
|
|
|
|
|
.form-actions
|
|
- if @order.open?
|
|
= link_to "Bearbeiten", edit_order_path(@order), class: 'btn'
|
|
= link_to 'Beenden!', finish_order_path(@order), method: :post,
|
|
confirm: "Willst Du wirklich die Bestellung beenden?\nEs gibt kein zurück..", class: 'btn'
|
|
- unless @order.closed?
|
|
= link_to "Löschen", @order, confirm: "Willst du wirklich die Bestellung löschen?", method: :delete,
|
|
class: 'btn btn-danger'
|
|
|
|
- unless @order.open?
|
|
%ul.nav.nav-pills
|
|
%li.active= update_articles_link(@order, "Artikelübersicht", :default)
|
|
%li= update_articles_link(@order, "Sortiert nach Gruppen", :groups)
|
|
%li= update_articles_link(@order, "Sortiert nach Artikeln", :articles)
|
|
%li= link_to 'Kommentare', '#comments'
|
|
%li.dropdown
|
|
= link_to '#', class: 'dropdown-toggle', data: {toggle: 'dropdown'} do
|
|
Download
|
|
%b.caret
|
|
%ul.dropdown-menu
|
|
%li= order_pdf(@order, :groups, "Gruppenpdf")
|
|
%li= order_pdf(@order, :articles, "Artikelpdf")
|
|
%li= order_pdf(@order, :matrix, "Matrix")
|
|
%li= order_pdf(@order, :fax, "Fax PDF")
|
|
%li= link_to "Fax Text", {action: 'text_fax_template', id: @order }, {title: "Download file"}
|
|
|
|
%section#articles_table
|
|
= render 'articles', order: @order
|
|
|
|
%h2 Kommentare
|
|
#comments
|
|
= render partial: 'shared/comments', locals: { comments: @order.comments }
|
|
#new_comment= render partial: 'order_comments/form', locals: { order_comment: @order.comments.build(user: current_user)}
|
|
= link_to_top |