2019-11-01 17:25:20 +01:00
|
|
|
- title @ordergroup ? t('.title', name: @ordergroup.name) : t('.title_foodcoop')
|
2012-11-10 16:44:05 +01:00
|
|
|
|
2012-11-12 13:13:01 +01:00
|
|
|
- content_for :actionbar do
|
2019-11-01 17:25:20 +01:00
|
|
|
- url = @ordergroup ? new_finance_ordergroup_transaction_path(@ordergroup) : new_finance_foodcoop_financial_transaction_path
|
|
|
|
= link_to t('.new_transaction'), url, class: 'btn btn-primary'
|
2012-11-12 13:13:01 +01:00
|
|
|
|
2019-11-01 17:25:20 +01:00
|
|
|
- if @ordergroup
|
|
|
|
- content_for :sidebar do
|
|
|
|
.well.well-small
|
|
|
|
%strong= t('.balance', balance: number_to_currency(@ordergroup.account_balance))
|
|
|
|
%br/
|
|
|
|
%small= t('.last_updated_at', when: distance_of_time_in_words(Time.now, @ordergroup.account_updated))
|
2019-02-03 15:51:02 +01:00
|
|
|
%p
|
2019-11-01 17:25:20 +01:00
|
|
|
- unless FoodsoftConfig[:charge_members_manually]
|
2019-02-03 15:51:02 +01:00
|
|
|
%p
|
2019-11-01 17:25:20 +01:00
|
|
|
%b= heading_helper(Ordergroup, :available_funds) + ':'
|
|
|
|
= number_to_currency(@ordergroup.get_available_funds)
|
|
|
|
- if FinancialTransactionClass.has_multiple_classes
|
|
|
|
- FinancialTransactionClass.sorted.each do |c|
|
|
|
|
%p
|
|
|
|
%b= c.display + ':'
|
|
|
|
= number_to_currency(@ordergroup["sum_of_class_#{c.id}"])
|
2019-02-03 15:51:02 +01:00
|
|
|
|
2012-11-10 16:44:05 +01:00
|
|
|
|
2019-11-01 17:25:20 +01:00
|
|
|
= render 'transactions_search', url: finance_group_transactions_path(@ordergroup)
|
2012-11-10 16:44:05 +01:00
|
|
|
|
2019-11-01 19:30:23 +01:00
|
|
|
#transactions= render 'transactions', with_csv: true, with_hidden: true
|