Improved stockit: Creating/updating of stock_articles.\nTranslated deliveries and invoices.

This commit is contained in:
Benjamin Meichsner 2009-02-11 18:09:04 +01:00
parent 325d47b22f
commit 86b2b28dc9
19 changed files with 248 additions and 86 deletions

View file

@ -8,36 +8,36 @@
- if @invoice.order
%p= "Diese Rechnung ist mit einer #{link_to "Bestellung", @invoice.order} verknüpft."
%p
= f.label :supplier_id
Lieferant
%br/
= f.select :supplier_id, Supplier.all.collect { |s| [s.name, s.id] }
%p
= f.label :number
Rechnungsnummer
%br/
= f.text_field :number
%p
= f.label :date
Rechnungsdatum
%br/
= f.date_select :date
%p
= f.label :paid_on
Bezahlt am
%br/
= f.date_select :paid_on, :include_blank => true
%p
= f.label :amount
Rechnungsbetrag
%br/
= f.text_field :amount
%p
= f.label :deposit
Pfand berechnet
%br/
= f.text_field :deposit
%p
= f.label :deposit_credit
Pfand gutgeschrieben
%br/
= f.text_field :deposit_credit
%p
= f.label :note
Notiz
%br/
= f.text_area :note
= f.text_area :note, :size => "28x8"
%p
= f.submit "Speichern"

View file

@ -1,6 +1,6 @@
<h1>Editing invoice</h1>
<% title "Rechnung bearbeiten" %>
<%= render :partial => 'form' %>
<%= link_to 'Show', [:finance, @invoice] %> |
<%= link_to 'Back', finance_invoices_path %>
<%= link_to "Anzeigen", [:finance, @invoice] %> |
<%= link_to 'Zurück', finance_invoices_path %>

View file

@ -1,33 +1,33 @@
<% title "Invoices" %>
<% title "Rechnungen" %>
<table class="list" style="width:70em">
<thead>
<tr>
<th>Supplier</th>
<th>Number</th>
<th>Date</th>
<th>Paid on</th>
<th>Amount</th>
<th>Delivery</th>
<th>Nummer</th>
<th>Lieferant</th>
<th>Datum</th>
<th>Bezahlt am</th>
<th>Betrag</th>
<th>Lieferung</th>
<th>Bestellung</th>
<th>Note</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% for invoice in @invoices %>
<tr>
<td><%= link_to h(invoice.number), finance_invoice_path(invoice)%></td>
<td><%=h invoice.supplier.name %></td>
<td><%=h invoice.number %></td>
<td><%= invoice.date %></td>
<td><%= invoice.paid_on %></td>
<td><%= invoice.amount %></td>
<td><%= format_date invoice.date %></td>
<td><%= format_date invoice.paid_on %></td>
<td><%= number_to_currency invoice.amount %></td>
<td><%= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery %></td>
<td><%= link_to format_date(invoice.order.ends), :controller => 'balancing', :action => 'new', :id => invoice.order if invoice.order %></td>
<td><%=h truncate(invoice.note) %></td>
<td><%= link_to 'Show', finance_invoice_path(invoice) %></td>
<td><%= link_to 'Edit', edit_finance_invoice_path(invoice) %></td>
<td><%= link_to 'Destroy', finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete %></td>
<td><%= link_to icon(:edit), edit_finance_invoice_path(invoice) %></td>
<td><%= link_to icon(:delete), finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</tbody>
@ -35,4 +35,4 @@
<br />
<%= link_to 'New invoice', new_finance_invoice_path %>
<%= link_to 'Neue Rechnung anlegen', new_finance_invoice_path %>

View file

@ -1,28 +1,34 @@
- title "Rechnung #{@invoice.number}"
%p
%b Supplier:
%b Lieferant:
=h @invoice.supplier.name
- if @invoice.delivery
%p
%b Delivery:
%b Lieferung:
="Diese Rechnung ist mit einer #{link_to "Lieferung", [@invoice.supplier,@invoice.delivery]} verknüpft."
%p
%b Number:
%b Rechnungsnummer:
=h @invoice.number
%p
%b Date:
%b Datum:
=h @invoice.date
%p
%b Paid on:
%b Bezahlt am:
=h @invoice.paid_on
%p
%b Amount:
%b Rechnungsbetrag:
=h @invoice.amount
%p
%b Note:
%b Pfand berechnet:
=h @invoice.deposit
%p
%b Pfand gutgeschrieben:
=h @invoice.deposit_credit
%p
%b Notiz:
=h @invoice.note
= link_to 'Edit', edit_finance_invoice_path(@invoice)
= link_to "Bearbeiten", edit_finance_invoice_path(@invoice)
|
= link_to 'Back', finance_invoices_path
= link_to "Zurück", finance_invoices_path