mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
little fix Reservation#generate_invoice_items take into account that plan can be purchased at the same time when reserving machine
This commit is contained in:
parent
c78e010888
commit
d104403af0
@ -45,7 +45,7 @@ class Reservation < ActiveRecord::Base
|
||||
# === Machine reservation ===
|
||||
when Machine
|
||||
base_amount = reservable.prices.find_by(group_id: user.group_id, plan_id: plan.try(:id)).amount
|
||||
users_credits_manager = UsersCredits::Manager.new(reservation: self)
|
||||
users_credits_manager = UsersCredits::Manager.new(reservation: self, plan: plan)
|
||||
|
||||
slots.each_with_index do |slot, index|
|
||||
description = reservable.name + " #{I18n.l slot.start_at, format: :long} - #{I18n.l slot.end_at, format: :hour_minute}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user