First part of stock-integratino. Orders with supplier_id == 0 become stockorders.

This commit is contained in:
Benjamin Meichsner 2009-02-05 16:40:02 +01:00
parent 251ced4fa1
commit 1912a3fd80
30 changed files with 112 additions and 95 deletions

View file

@ -1,4 +1,4 @@
%b=h order.supplier.name
%b=h order.name
%br/
= "von #{format_date(order.starts)} bis #{format_date(order.ends)}"
%p

View file

@ -55,7 +55,7 @@
%tbody
- @orders.each do |order|
%tr{:class => cycle("even","odd", :name => "order")}
%td= order.supplier.name
%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

View file

@ -18,7 +18,7 @@
%tbody
- @orders.each do |order|
%tr{:class => cycle("even","odd", :name => "order")}
%td= link_to truncate(order.supplier.name), :action => "new", :id => order
%td= link_to truncate(order.name), :action => "new", :id => order
%td=h format_time(order.ends) unless order.ends.nil?
%td= order.closed? ? "abgerechnet (#{number_to_currency order.profit})" : "beendet"
%td= order.updated_by.nil? ? '??' : order.updated_by.nick

View file

@ -1,4 +1,4 @@
- title "#{@order.supplier.name} abrechnen"
- title "#{@order.name} abrechnen"
- if @order.closed?
%p