From c76563f22f5fb3f40c17caf52abbed67383ee15b Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 19 Sep 2019 11:25:12 +0200 Subject: [PATCH] wallet label in accounting export --- app/services/accounting_export_service.rb | 3 +++ config/locales/en.yml | 1 + config/locales/es.yml | 1 + config/locales/fr.yml | 1 + config/locales/pt.yml | 1 + 5 files changed, 7 insertions(+) diff --git a/app/services/accounting_export_service.rb b/app/services/accounting_export_service.rb index ae74027bd..c2ed325ab 100644 --- a/app/services/accounting_export_service.rb +++ b/app/services/accounting_export_service.rb @@ -320,8 +320,11 @@ class AccountingExportService def label(invoice) name = "#{invoice.invoicing_profile.last_name} #{invoice.invoicing_profile.first_name}".tr separator, '' reference = invoice.reference + items = invoice.subscription_invoice? ? [I18n.t('accounting_export.subscription')] : [] items.push I18n.t("accounting_export.#{invoice.reservation.reservable_type}_reservation") if invoice.invoiced_type == 'Reservation' + items.push I18n.t('accounting_export.wallet') if invoice.invoiced_type == 'WalletTransaction' + summary = items.join(' + ') res = "#{reference}, #{summary}" "#{name.truncate(label_max_length - res.length)}, #{res}" diff --git a/config/locales/en.yml b/config/locales/en.yml index a7bb8d644..6d815010c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -144,6 +144,7 @@ en: Training_reservation: "training reserv." Event_reservation: "event reserv." Space_reservation: "space reserv." + wallet: "wallet" trainings: # training availabilities diff --git a/config/locales/es.yml b/config/locales/es.yml index 6c4ff276d..f2d3210b9 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -144,6 +144,7 @@ es: Training_reservation: "training reserv." # translation_missing Event_reservation: "event reserv." # translation_missing Space_reservation: "space reserv." # translation_missing + wallet: "wallet" # translation_missing trainings: # training availabilities diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 897f639ee..677dc2b25 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -144,6 +144,7 @@ fr: Training_reservation: "réserv. formation" Event_reservation: "réserv. évènement" Space_reservation: "réserv. espace" + wallet: "porte-monnaie" trainings: # disponibilités formations diff --git a/config/locales/pt.yml b/config/locales/pt.yml index f7fe301e0..3833f961c 100755 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -144,6 +144,7 @@ pt: Training_reservation: "training reserv." # translation_missing Event_reservation: "event reserv." # translation_missing Space_reservation: "space reserv." # translation_missing + wallet: "wallet" # translation_missing trainings: # training availabilities