1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

(bug) fix cannot debit prepaid pack after reservation of machine

This commit is contained in:
Du Peng 2022-10-14 16:56:01 +02:00
parent 844624954b
commit 62a62ec1eb

View File

@ -160,6 +160,7 @@ class ShoppingCart
# The total booked minutes are subtracted from the user's prepaid minutes
def update_packs(objects)
objects.filter { |o| o.is_a? Reservation }.each do |reservation|
reservation.reload
PrepaidPackService.update_user_minutes(@customer, reservation)
end
end