mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
[bug] do not include fully used packs in user's packs
This commit is contained in:
parent
e150e13227
commit
95d8f1d204
@ -4,6 +4,7 @@
|
||||
- Fix a bug: missing invoice watermark for norwegian
|
||||
- Fix a bug: prepaid hours not used if bought slot is longer than remaining prepaid time
|
||||
- Fix a bug: cookies modal buttons are too small
|
||||
- Fix a bug: do not include fully used packs in user's packs
|
||||
|
||||
## v5.1.2 2021 July 2
|
||||
|
||||
|
@ -27,6 +27,7 @@ class PrepaidPackService
|
||||
.where('expires_at > ?', DateTime.current)
|
||||
.where('prepaid_packs.priceable_id = ?', priceable.id)
|
||||
.where('prepaid_packs.priceable_type = ?', priceable.class.name)
|
||||
.where('minutes_used < prepaid_packs.minutes')
|
||||
end
|
||||
|
||||
# subtract the number of used prepaid minutes from the user's count
|
||||
|
Loading…
x
Reference in New Issue
Block a user