1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

wallet label in accounting export

This commit is contained in:
Sylvain 2019-09-19 11:25:12 +02:00
parent f81a2e4343
commit c76563f22f
5 changed files with 7 additions and 0 deletions

View File

@ -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}"

View File

@ -144,6 +144,7 @@ en:
Training_reservation: "training reserv."
Event_reservation: "event reserv."
Space_reservation: "space reserv."
wallet: "wallet"
trainings:
# training availabilities

View File

@ -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

View File

@ -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

View File

@ -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