i18n finance + controller

This commit is contained in:
Manuel Wiedenmann 2013-02-10 15:05:20 +07:00
parent 2d58054d1c
commit 8be93c33f8
13 changed files with 186 additions and 91 deletions

View file

@ -1,16 +1,16 @@
- title "Finanzbereich"
- title t('.title')
.row-fluid
.span6
%h2
Unbezahlte Rechnungen
%small= link_to "alle anzeigen", finance_invoices_path
= t('.unpaid_invoices')
%small= link_to t('.show_all'), finance_invoices_path
%table.table.table-striped
%thead
%tr
%th Datum
%th.numeric Betrag
%th Lieferantin
%th= t('.date')
%th.numeric= t('.amount')
%th= t('.supplier')
%th
%tbody
- for invoice in @unpaid_invoices
@ -18,18 +18,18 @@
%td= format_date(invoice.date)
%td.numeric= number_to_currency(invoice.amount)
%td= invoice.supplier.name
%td= link_to "Bearbeiten", edit_finance_invoice_path(invoice), class: 'btn btn-mini'
%td= link_to t('.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini'
%h2
letzte Überweisungen
%small= link_to "alle anzeigen", finance_ordergroups_path
= t('.last_transactions')
%small= link_to(t('.show_all'), finance_ordergroups_path)
%table.table.table-striped
%thead
%tr
%th Datum
%th Gruppe
%th Notiz
%th.numeric Betrag
%th= t('.date')
%th= t('.group')
%th= t('.note')
%th.numeric= t('.amount')
%tbody
- @financial_transactions.each do |ft|
%tr
@ -39,15 +39,15 @@
%td.numeric{:style => "color:#{ft.amount < 0 ? 'red' : 'black'}"}= number_to_currency(ft.amount)
.span6
%h2
noch nicht abgerechnet
%small= link_to "alle anzeigen", finance_order_index_path
= t('.open_transactions')
%small= link_to t('.show_all'), finance_order_index_path
- unless @orders.empty?
%table.table.table-striped
%thead
%tr
%th Lieferantin
%th Ende
%th.numeric Betrag(FC)
%th= t('.supplier')
%th= t('.end')
%th.numeric= t('.amount_fc')
%th
%tbody
- @orders.each do |order|
@ -55,6 +55,6 @@
%td= order.name
%td= format_date(order.ends)
%td.numeric= number_to_currency(order.sum(:fc))
%td= link_to "Abrechnen", new_finance_order_path(order_id: order.id), class: 'btn btn-mini'
%td= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini'
- else
Super, alles schon abgerechnet...
= t('.everything_cleared')