48b6515c08
* Since s.b. started this already. I changed every string 'Lieferant' to 'Lieferantin' to give note on female existance in this world :-)
43 lines
No EOL
1.1 KiB
Text
43 lines
No EOL
1.1 KiB
Text
- title "Lieferung anzeigen"
|
|
|
|
%p
|
|
%b Lieferantin:
|
|
=h @delivery.supplier.name
|
|
%p
|
|
%b Geliefert am:
|
|
= @delivery.delivered_on
|
|
%p
|
|
%b Rechnungsbetrag:
|
|
= link_to_invoice(@delivery)
|
|
|
|
%h2 Artikel
|
|
%table.list{:style => "width:30em"}
|
|
%tr
|
|
%th Artikel
|
|
%th Einheit
|
|
%th Menge
|
|
%th Nettopreis
|
|
%th Summe
|
|
- total_net, total_gross = 0,0
|
|
- for stock_change in @delivery.stock_changes.find :all, :include => :stock_article
|
|
- quantity = stock_change.quantity
|
|
- sum = quantity * stock_change.stock_article.price
|
|
- total_net += sum
|
|
- total_gross += quantity * stock_change.stock_article.gross_price
|
|
%tr
|
|
%td= stock_change.stock_article.name
|
|
%td= stock_change.stock_article.unit
|
|
%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
|
|
|
|
%br/
|
|
= link_to 'Bearbeiten', edit_supplier_delivery_path(@supplier,@delivery)
|
|
|
|
|
= link_to 'Lieferungsübersicht', supplier_deliveries_path(@supplier) |