diff --git a/config/locales/de.yml b/config/locales/de.yml index 4bc7d5dd..0f67e016 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -46,6 +46,8 @@ de: financial_transaction: amount: Betrag created_on: Datum + financial_transaction_class: Finanztransaktionsklasse + financial_transaction_type: Finanztransaktionstyp note: Notiz ordergroup: Bestellgruppe user: Eingetragen von diff --git a/config/locales/en.yml b/config/locales/en.yml index e86fae1d..a539ecd1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -46,6 +46,8 @@ en: financial_transaction: amount: Amount created_on: Date + financial_transaction_class: Financial transaction class + financial_transaction_type: Financial transaction type note: Note ordergroup: Ordergroup user: Entered by diff --git a/lib/financial_transactions_csv.rb b/lib/financial_transactions_csv.rb index 20375cac..4a1a9ee2 100644 --- a/lib/financial_transactions_csv.rb +++ b/lib/financial_transactions_csv.rb @@ -9,18 +9,22 @@ class FinancialTransactionsCsv < RenderCSV FinancialTransaction.human_attribute_name(:ordergroup), FinancialTransaction.human_attribute_name(:ordergroup), FinancialTransaction.human_attribute_name(:user), + FinancialTransaction.human_attribute_name(:financial_transaction_class), + FinancialTransaction.human_attribute_name(:financial_transaction_type), FinancialTransaction.human_attribute_name(:note), FinancialTransaction.human_attribute_name(:amount) ] end def data - @object.includes(:user, :ordergroup).each do |t| + @object.includes(:user, :ordergroup, :financial_transaction_type).each do |t| yield [ t.created_on, t.ordergroup_id, t.ordergroup.name, show_user(t.user), + t.financial_transaction_type.financial_transaction_class.name, + t.financial_transaction_type.name, t.note, number_to_currency(t.amount) ]