diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ec67f45..ccdce3dd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next release - Fix a bug: unable to show member children for admin +- improvement: add wallet amount to members Excel export ## v6.3.23 2024 May 20 diff --git a/app/views/exports/users_members.xlsx.axlsx b/app/views/exports/users_members.xlsx.axlsx index e05916abe..43cd048b4 100644 --- a/app/views/exports/users_members.xlsx.axlsx +++ b/app/views/exports/users_members.xlsx.axlsx @@ -35,7 +35,9 @@ wb.add_worksheet(name: ExcelService.name_safe(t('export_members.members'))) do | t('export_members.echo_sciences'), t('export_members.organization'), t('export_members.organization_address'), - t('export_members.note')] + t('export_members.note'), + t('export_members.wallet_amount'), + ] sheet.add_row columns, style: header # data rows @@ -69,7 +71,8 @@ wb.add_worksheet(name: ExcelService.name_safe(t('export_members.members'))) do | member.profile.echosciences || '', member.invoicing_profile&.organization&.name || '', member.invoicing_profile&.organization&.address&.address || '', - ActionController::Base.helpers.sanitize(member.profile.note, tags: []) || '' + ActionController::Base.helpers.sanitize(member.profile.note, tags: []) || '', + member.wallet&.amount ? ActionController::Base.helpers.number_to_currency(member.wallet&.amount / 100.0, locale: CURRENCY_LOCALE) : '' ] styles = [nil, nil, nil, nil, nil, nil, date, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, date, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil] diff --git a/config/locales/en.yml b/config/locales/en.yml index b719e20ee..836b1e758 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -228,6 +228,7 @@ en: man: "Man" woman: "Woman" without_subscriptions: "Without subscriptions" + wallet_amount: "Wallet" #machines/trainings/events reservations list to EXCEL format export_reservations: reservations: "Reservations"