1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(bug) event number places error in statistic

This commit is contained in:
Du Peng 2024-01-05 18:22:44 +01:00
parent 9685b9cad9
commit ab93c3d146
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,8 @@
## Next release
- translation files added for Swedish
- Fix a bug: unable to show extended prices of space
- Fix a bug: event number places error in statistic
- [TODO DEPLOY] `rails fablab:maintenance:regenerate_statistics[2023,9]`
## v6.3.8 2023 December 29

View File

@ -22,7 +22,7 @@ class Statistics::Builders::ReservationsBuilderService
coupon: r[:coupon],
groupName: r[:groupName],
}.merge(user_info_stat(r)))
stat[:stat] = (type == 'booking' ? 1 : r[:nb_hours])
stat[:stat] = (type == 'booking' ? (category == 'event' ? r[:nb_places] : 1) : r[:nb_hours])
stat["#{category}Id".to_sym] = r["#{category}_id".to_sym]
stat = add_custom_attributes(category, stat, r)