2009-01-16 02:17:49 +01:00
|
|
|
- title "Lieferung anzeigen"
|
|
|
|
|
|
|
|
%p
|
2009-03-22 13:56:54 +01:00
|
|
|
%b Lieferantin:
|
2009-01-16 02:17:49 +01:00
|
|
|
=h @delivery.supplier.name
|
|
|
|
%p
|
2009-03-11 18:03:28 +01:00
|
|
|
%b Geliefert am:
|
2009-01-18 17:42:51 +01:00
|
|
|
= @delivery.delivered_on
|
|
|
|
%p
|
|
|
|
%b Rechnungsbetrag:
|
|
|
|
= link_to_invoice(@delivery)
|
2009-05-15 17:58:02 +02:00
|
|
|
- if @delivery.invoice
|
|
|
|
%p
|
|
|
|
%b bereinigter Rechnungsbetrag:
|
|
|
|
= number_to_currency @delivery.invoice.net_amount
|
2009-01-16 02:17:49 +01:00
|
|
|
|
|
|
|
%h2 Artikel
|
|
|
|
%table.list{:style => "width:30em"}
|
|
|
|
%tr
|
|
|
|
%th Artikel
|
|
|
|
%th Einheit
|
|
|
|
%th Menge
|
2009-03-11 18:03:28 +01:00
|
|
|
%th Nettopreis
|
|
|
|
%th Summe
|
|
|
|
- total_net, total_gross = 0,0
|
2009-02-06 16:26:35 +01:00
|
|
|
- for stock_change in @delivery.stock_changes.find :all, :include => :stock_article
|
2009-03-11 18:03:28 +01:00
|
|
|
- quantity = stock_change.quantity
|
|
|
|
- sum = quantity * stock_change.stock_article.price
|
|
|
|
- total_net += sum
|
|
|
|
- total_gross += quantity * stock_change.stock_article.gross_price
|
2009-01-16 02:17:49 +01:00
|
|
|
%tr
|
2009-02-06 16:26:35 +01:00
|
|
|
%td= stock_change.stock_article.name
|
|
|
|
%td= stock_change.stock_article.unit
|
2009-03-11 18:03:28 +01:00
|
|
|
%td= quantity
|
|
|
|
%td= number_to_currency stock_change.stock_article.price
|
|
|
|
%td= number_to_currency sum
|
|
|
|
%p
|
|
|
|
Nettosumme:
|
|
|
|
= number_to_currency total_net
|
|
|
|
%p
|
|
|
|
Bruttosumme:
|
|
|
|
= number_to_currency total_gross
|
2009-01-16 02:17:49 +01:00
|
|
|
|
2009-05-15 17:58:02 +02:00
|
|
|
- if @delivery.invoice
|
|
|
|
%p
|
|
|
|
%b Brutto - bereinigter Rechnungsbetrag:
|
|
|
|
= number_to_currency total_gross - @delivery.invoice.net_amount
|
|
|
|
|
2009-01-16 02:17:49 +01:00
|
|
|
%br/
|
2009-03-11 18:03:28 +01:00
|
|
|
= link_to 'Bearbeiten', edit_supplier_delivery_path(@supplier,@delivery)
|
2009-01-16 02:17:49 +01:00
|
|
|
|
|
2009-03-11 18:03:28 +01:00
|
|
|
= link_to 'Lieferungsübersicht', supplier_deliveries_path(@supplier)
|