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
|
before_filter :find_supplier, :exclude => :fill_new_stock_article_form
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@deliveries = @supplier.deliveries.find(:all)
|
@deliveries = @supplier.deliveries.all :order => 'delivered_on DESC'
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # index.html.erb
|
format.html # index.html.erb
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
%p
|
%p
|
||||||
%b Rechnungsbetrag:
|
%b Rechnungsbetrag:
|
||||||
= link_to_invoice(@delivery)
|
= link_to_invoice(@delivery)
|
||||||
|
- if @delivery.invoice
|
||||||
|
%p
|
||||||
|
%b bereinigter Rechnungsbetrag:
|
||||||
|
= number_to_currency @delivery.invoice.net_amount
|
||||||
|
|
||||||
%h2 Artikel
|
%h2 Artikel
|
||||||
%table.list{:style => "width:30em"}
|
%table.list{:style => "width:30em"}
|
||||||
|
@ -37,6 +41,11 @@
|
||||||
Bruttosumme:
|
Bruttosumme:
|
||||||
= number_to_currency total_gross
|
= number_to_currency total_gross
|
||||||
|
|
||||||
|
- if @delivery.invoice
|
||||||
|
%p
|
||||||
|
%b Brutto - bereinigter Rechnungsbetrag:
|
||||||
|
= number_to_currency total_gross - @delivery.invoice.net_amount
|
||||||
|
|
||||||
%br/
|
%br/
|
||||||
= link_to 'Bearbeiten', edit_supplier_delivery_path(@supplier,@delivery)
|
= link_to 'Bearbeiten', edit_supplier_delivery_path(@supplier,@delivery)
|
||||||
|
|
|
|
||||||
|
|
Loading…
Reference in a new issue