Skip to content

Commit

Permalink
(feat) add wallet amount to members Excel export
Browse files Browse the repository at this point in the history
  • Loading branch information
gnepud committed May 28, 2024
1 parent 6f6ea46 commit bab7fa9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions app/views/exports/users_members.xlsx.axlsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bab7fa9

Please sign in to comment.