55 lines
No EOL
1.4 KiB
Text
55 lines
No EOL
1.4 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)
|
|
- if @delivery.invoice
|
|
%p
|
|
%b bereinigter Rechnungsbetrag:
|
|
= number_to_currency @delivery.invoice.net_amount
|
|
%p
|
|
%b Notiz:
|
|
= simple_format @delivery.note
|
|
|
|
%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
|
|
|
|
- if @delivery.invoice
|
|
%p
|
|
%b Brutto - bereinigter Rechnungsbetrag:
|
|
= number_to_currency total_gross - @delivery.invoice.net_amount
|
|
|
|
%br/
|
|
= link_to 'Bearbeiten', edit_supplier_delivery_path(@supplier,@delivery)
|
|
|
|
|
= link_to 'Lieferungsübersicht', supplier_deliveries_path(@supplier) |