foodsoft/app/views/ordering/_order_head.haml

52 lines
1.6 KiB
Text
Raw Normal View History

- title "Bestellen"
.left_column{:style => "width:49em"}
.box_title
%h2=h @order.name
.column_content
%table
%tr{:valign => "top"}
%td{:width => "60%"}
%p
%b Lieferantin:
=h @order.name
2012-11-12 14:24:49 +01:00
%p
%b Erstellt von:
=h link_to_user_message_if_valid(@order.created_by)
%p
%b Ende:
=h format_time(@order.ends)
- if @group_order && @group_order.updated_by
%p
%b Zuletzt bestellt:
=h @group_order.updated_by.nick if @group_order.updated_by
= "(#{format_time(@group_order.updated_on)})"
%p
%b Verfügbares Guthaben:
= number_to_currency(@availableFunds)
%td
- unless @order.note.empty?
%p
%b Notiz:
= simple_format(@order.note)
- unless @order.stockit? || @order.supplier.min_order_quantity.blank?
%p
%b Mindestellmenge:
=h @order.supplier.min_order_quantity
%p
%b Gesamtbestellmenge bisher:
= number_to_currency @order.sum
- orders = Order.open.reject{ |order| order == @order }
- unless orders.empty?
.right_column{:style => "width:22em"}
.box_title
%h2 Anderer Bestellungen
.column_content
%table
2009-02-12 14:35:29 +01:00
- for order in orders
%tr
%td
= link_to_function order.name, "if (confirmSwitchOrder()) (window.location = '#{ url_for(:action => 'order', :id => order) }' )"
%td= "noch #{time_ago_in_words(order.ends)}" if order.ends