mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
(bug) fix cannot debit prepaid pack after reservation of machine
This commit is contained in:
parent
844624954b
commit
62a62ec1eb
@ -160,6 +160,7 @@ class ShoppingCart
|
|||||||
# The total booked minutes are subtracted from the user's prepaid minutes
|
# The total booked minutes are subtracted from the user's prepaid minutes
|
||||||
def update_packs(objects)
|
def update_packs(objects)
|
||||||
objects.filter { |o| o.is_a? Reservation }.each do |reservation|
|
objects.filter { |o| o.is_a? Reservation }.each do |reservation|
|
||||||
|
reservation.reload
|
||||||
PrepaidPackService.update_user_minutes(@customer, reservation)
|
PrepaidPackService.update_user_minutes(@customer, reservation)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user