2013-02-10 09:05:20 +01:00
|
|
|
- title t('.title')
|
2012-11-10 16:44:05 +01:00
|
|
|
|
|
|
|
.row-fluid
|
|
|
|
.span6
|
|
|
|
%h2
|
2013-02-10 09:05:20 +01:00
|
|
|
= t('.unpaid_invoices')
|
2017-10-22 02:21:27 +02:00
|
|
|
%small= link_to t('.show_all'), unpaid_finance_invoices_path
|
2012-11-10 16:44:05 +01:00
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-12-12 00:13:19 +01:00
|
|
|
%th= heading_helper Invoice, :date
|
|
|
|
%th.numeric= heading_helper Invoice, :amount
|
|
|
|
%th= heading_helper Invoice, :supplier
|
2012-11-10 16:44:05 +01:00
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- for invoice in @unpaid_invoices
|
|
|
|
%tr
|
2016-02-17 16:11:40 +01:00
|
|
|
%td= link_to h(format_date(invoice.date)), finance_invoice_path(invoice)
|
2012-11-10 16:44:05 +01:00
|
|
|
%td.numeric= number_to_currency(invoice.amount)
|
|
|
|
%td= invoice.supplier.name
|
2013-04-04 02:49:52 +02:00
|
|
|
%td= link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini'
|
2012-11-10 16:44:05 +01:00
|
|
|
|
|
|
|
%h2
|
2013-02-10 09:05:20 +01:00
|
|
|
= t('.last_transactions')
|
2014-05-06 19:02:01 +02:00
|
|
|
%small= link_to(t('.show_all'), finance_transactions_path)
|
2012-11-10 16:44:05 +01:00
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-12-12 00:13:19 +01:00
|
|
|
%th= heading_helper FinancialTransaction, :created_on
|
|
|
|
%th= heading_helper FinancialTransaction, :ordergroup
|
|
|
|
%th= heading_helper FinancialTransaction, :note
|
|
|
|
%th.numeric= heading_helper FinancialTransaction, :amount
|
2012-11-10 16:44:05 +01:00
|
|
|
%tbody
|
|
|
|
- @financial_transactions.each do |ft|
|
|
|
|
%tr
|
|
|
|
%td= format_date(ft.created_on)
|
|
|
|
%td= ft.ordergroup.name
|
|
|
|
%td= ft.note
|
2018-09-16 12:05:39 +02:00
|
|
|
%td.numeric= format_currency ft.amount
|
2012-11-10 16:44:05 +01:00
|
|
|
.span6
|
|
|
|
%h2
|
2013-02-10 09:05:20 +01:00
|
|
|
= t('.open_transactions')
|
|
|
|
%small= link_to t('.show_all'), finance_order_index_path
|
2012-11-10 16:44:05 +01:00
|
|
|
- unless @orders.empty?
|
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-12-12 00:13:19 +01:00
|
|
|
%th= heading_helper Order, :name
|
|
|
|
%th= t '.end'
|
2013-02-10 09:05:20 +01:00
|
|
|
%th.numeric= t('.amount_fc')
|
2012-11-10 16:44:05 +01:00
|
|
|
%th
|
|
|
|
%tbody
|
|
|
|
- @orders.each do |order|
|
|
|
|
%tr
|
|
|
|
%td= order.name
|
|
|
|
%td= format_date(order.ends)
|
|
|
|
%td.numeric= number_to_currency(order.sum(:fc))
|
2013-12-12 00:13:19 +01:00
|
|
|
%td= link_to t('finance.balancing.orders.clear'), new_finance_order_path(order_id: order.id), class: 'btn btn-mini'
|
2012-11-10 16:44:05 +01:00
|
|
|
- else
|
2013-04-04 02:49:52 +02:00
|
|
|
= t('.everything_cleared')
|