Added more info to delivery/show for easier comparision of invoice amount and sum of delivered items.
This commit is contained in:
parent
8bfa83118c
commit
c03f3da21a
2 changed files with 10 additions and 1 deletions
|
@ -3,7 +3,7 @@ class DeliveriesController < ApplicationController
|
|||
before_filter :find_supplier, :exclude => :fill_new_stock_article_form
|
||||
|
||||
def index
|
||||
@deliveries = @supplier.deliveries.find(:all)
|
||||
@deliveries = @supplier.deliveries.all :order => 'delivered_on DESC'
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
%p
|
||||
%b Rechnungsbetrag:
|
||||
= link_to_invoice(@delivery)
|
||||
- if @delivery.invoice
|
||||
%p
|
||||
%b bereinigter Rechnungsbetrag:
|
||||
= number_to_currency @delivery.invoice.net_amount
|
||||
|
||||
%h2 Artikel
|
||||
%table.list{:style => "width:30em"}
|
||||
|
@ -37,6 +41,11 @@
|
|||
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)
|
||||
|
|
||||
|
|
Loading…
Reference in a new issue