Adopt model to allow FinancialTransaction without an ordergroup

This will allow us to add accounting for the foodcoop itself, to support
listing for spendings independent of the order (e.g. rent, electricity).
This commit is contained in:
Patrick Gansterer 2019-11-01 14:07:23 +01:00
parent 1053b3883d
commit 1a49bee42d
11 changed files with 22 additions and 7 deletions

View file

@ -14,7 +14,7 @@
- for t in @financial_transactions
%tr
%td= link_to format_time(t.created_on), add_financial_transaction_finance_link_path(@financial_link, financial_transaction: t.id), method: :put
%td= t.ordergroup.name
%td= t.ordergroup_name
- if FinancialTransactionType.has_multiple_types
%td= h t.financial_transaction_type.name
%td= number_to_currency t.amount