foodsoft/app/views/finance/index.html.haml

61 lines
1.8 KiB
Plaintext
Raw Normal View History

2013-02-10 09:05:20 +01:00
- title t('.title')
.row-fluid
.span6
%h2
2013-02-10 09:05:20 +01:00
= t('.unpaid_invoices')
%small= link_to t('.show_all'), finance_invoices_path
%table.table.table-striped
%thead
%tr
2013-02-10 09:05:20 +01:00
%th= t('.date')
%th.numeric= t('.amount')
%th= t('.supplier')
%th
%tbody
- for invoice in @unpaid_invoices
%tr
%td= format_date(invoice.date)
%td.numeric= number_to_currency(invoice.amount)
%td= invoice.supplier.name
%td= link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini'
%h2
2013-02-10 09:05:20 +01:00
= t('.last_transactions')
%small= link_to(t('.show_all'), finance_ordergroups_path)
%table.table.table-striped
%thead
%tr
2013-02-10 09:05:20 +01:00
%th= t('.date')
%th= t('.group')
%th= t('.note')
%th.numeric= t('.amount')
%tbody
- @financial_transactions.each do |ft|
%tr
%td= format_date(ft.created_on)
%td= ft.ordergroup.name
%td= ft.note
%td.numeric{:style => "color:#{ft.amount < 0 ? 'red' : 'black'}"}= number_to_currency(ft.amount)
.span6
%h2
2013-02-10 09:05:20 +01:00
= t('.open_transactions')
%small= link_to t('.show_all'), finance_order_index_path
- unless @orders.empty?
%table.table.table-striped
%thead
%tr
2013-02-10 09:05:20 +01:00
%th= t('.supplier')
%th= t('.end')
%th.numeric= t('.amount_fc')
%th
%tbody
- @orders.each do |order|
%tr
%td= order.name
%td= format_date(order.ends)
%td.numeric= number_to_currency(order.sum(:fc))
2013-02-10 09:05:20 +01:00
%td= link_to t('.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini'
- else
= t('.everything_cleared')