Simplify balancing view. Part 1 of ...
This commit is contained in:
parent
218f40eb8d
commit
467874a8a5
22 changed files with 128 additions and 170 deletions
63
app/views/finance/balancing/index.html.haml
Normal file
63
app/views/finance/balancing/index.html.haml
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
%h1 Finanzbereich
|
||||
.left_column{:style => 'width: 50%'}
|
||||
.box_title
|
||||
%h2 Unbezahlte Rechnungen
|
||||
.column_content
|
||||
%p= link_to "Zeige alle Rechnungen", finance_invoices_path
|
||||
%table.list
|
||||
%thead
|
||||
%tr
|
||||
%th Datum
|
||||
%th Betrag
|
||||
%th Lieferantin
|
||||
%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
|
||||
%td= link_to "Bearbeiten", edit_finance_invoice_path(invoice)
|
||||
|
||||
.box_title
|
||||
%h2 letzte Überweisungen
|
||||
.column_content
|
||||
%p
|
||||
= link_to "Bestellgruppen", :controller => 'financial_transactions'
|
||||
%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)
|
||||
%td= ft.ordergroup.name
|
||||
%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
|
||||
%p= link_to "Bestellungsübersicht", finance_balancing_path
|
||||
- unless @orders.empty?
|
||||
%table.list
|
||||
%thead
|
||||
%tr
|
||||
%th Lieferantin
|
||||
%th Ende
|
||||
%th Betrag(FC)
|
||||
%th
|
||||
%tbody
|
||||
- @orders.each do |order|
|
||||
%tr{:class => cycle("even","odd", :name => "order")}
|
||||
%td= order.name
|
||||
%td= format_date(order.ends)
|
||||
%td{:class => "currency"}= number_to_currency(order.sum(:fc))
|
||||
%td= link_to "abrechnen", new_finance_order_path(id: order)
|
||||
- else
|
||||
Super, alles schon abgerechnet...
|
||||
Loading…
Add table
Add a link
Reference in a new issue