2009-01-06 11:49:19 +01:00
|
|
|
%h1 Finanzbereich
|
|
|
|
.left_column{:style => 'width: 50%'}
|
2009-01-10 19:36:58 +01:00
|
|
|
.box_title
|
2009-02-12 21:38:41 +01:00
|
|
|
%h2 Unbezahlte Rechnungen
|
2009-01-10 19:36:58 +01:00
|
|
|
.column_content
|
2009-02-12 21:38:41 +01:00
|
|
|
%p= link_to "Zeige alle Rechnungen", finance_invoices_path
|
2009-01-10 19:36:58 +01:00
|
|
|
%table.list
|
|
|
|
%thead
|
|
|
|
%tr
|
2009-02-12 21:38:41 +01:00
|
|
|
%th Datum
|
|
|
|
%th Betrag
|
2009-03-22 13:56:54 +01:00
|
|
|
%th Lieferantin
|
2009-01-10 19:36:58 +01:00
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- for invoice in @unpaid_invoices
|
|
|
|
%tr{:class => cycle("even","odd", :name => "invoices")}
|
|
|
|
%td= format_date(invoice.date)
|
|
|
|
%td= number_to_currency(invoice.amount)
|
|
|
|
%td=h invoice.supplier.name
|
2009-02-12 21:38:41 +01:00
|
|
|
%td= link_to "Bearbeiten", edit_finance_invoice_path(invoice)
|
2009-01-10 19:36:58 +01:00
|
|
|
|
2009-01-06 11:49:19 +01:00
|
|
|
.box_title
|
|
|
|
%h2 letzte Überweisungen
|
|
|
|
.column_content
|
|
|
|
%p
|
2011-06-09 21:35:05 +02:00
|
|
|
= link_to "Bestellgruppen", :controller => 'financial_transactions'
|
2009-01-06 11:49:19 +01:00
|
|
|
%table.list
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th Datum
|
|
|
|
%th Gruppe
|
|
|
|
%th Notiz
|
|
|
|
%th Betrag
|
|
|
|
%tbody
|
|
|
|
- @financial_transactions.each do |ft|
|
|
|
|
%tr{:class => cycle("even","odd", :name => "financial_transaction")}
|
|
|
|
%td= format_date(ft.created_on)
|
2009-01-14 12:46:01 +01:00
|
|
|
%td= ft.ordergroup.name
|
2009-01-06 11:49:19 +01:00
|
|
|
%td{:style => "width:50%"}=h ft.note
|
|
|
|
%td{:style => "color:#{ft.amount < 0 ? 'red' : 'black'}", :class => "currency"}= number_to_currency(ft.amount)
|
|
|
|
|
|
|
|
.right_column{:style => 'width: 46%'}
|
|
|
|
.box_title
|
|
|
|
%h2 noch nicht abgerechnet
|
|
|
|
.column_content
|
2012-06-21 17:19:00 +02:00
|
|
|
%p= link_to "Bestellungsübersicht", finance_balancing_path
|
2009-01-06 11:49:19 +01:00
|
|
|
- unless @orders.empty?
|
|
|
|
%table.list
|
|
|
|
%thead
|
|
|
|
%tr
|
2009-03-22 13:56:54 +01:00
|
|
|
%th Lieferantin
|
2009-01-06 11:49:19 +01:00
|
|
|
%th Ende
|
|
|
|
%th Betrag(FC)
|
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- @orders.each do |order|
|
|
|
|
%tr{:class => cycle("even","odd", :name => "order")}
|
2009-02-05 16:40:02 +01:00
|
|
|
%td= order.name
|
2009-01-06 11:49:19 +01:00
|
|
|
%td= format_date(order.ends)
|
2009-01-29 01:57:51 +01:00
|
|
|
%td{:class => "currency"}= number_to_currency(order.sum(:fc))
|
2012-07-27 18:03:46 +02:00
|
|
|
%td= link_to "abrechnen", new_finance_order_path(order_id: order.id)
|
2009-01-06 11:49:19 +01:00
|
|
|
- else
|
|
|
|
Super, alles schon abgerechnet...
|