From b029fb98d65341e0687885ceae3cc27b0ea2d29f Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Sun, 3 Feb 2019 15:51:02 +0100 Subject: [PATCH] Show sums for financial transaction types for ordergroups --- .../finance/financial_transactions/index.html.haml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/views/finance/financial_transactions/index.html.haml b/app/views/finance/financial_transactions/index.html.haml index 23cf1d1c..584729cd 100644 --- a/app/views/finance/financial_transactions/index.html.haml +++ b/app/views/finance/financial_transactions/index.html.haml @@ -8,6 +8,17 @@ %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)) + %p + - unless FoodsoftConfig[:charge_members_manually] + %p + %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}"]) + = render 'transactions_search', url: finance_ordergroup_transactions_path(@ordergroup)