Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/bookingbug_yellowfin/person_capacity_future.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.add_person_capacity_for_company company_id, date = ::Date.today
booked_time = 0
blocked_time = 0
next if person.schedule.blank?
total_time = person.schedule.total_time_available_for_date(cdate)/60.0 #Convert to hours
total_time = person.schedule.total_time_available_for_date(cdate).to_i/60.0 #Convert to hours
booked_slots = Slot.where(person_id: person.id, date: cdate, status: Slot::BOOKING_BOOKED)
for slot in booked_slots
booked_time += slot.ilen*5
Expand Down
2 changes: 1 addition & 1 deletion app/models/bookingbug_yellowfin/person_capacity_usage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def self.add_person_capacity_for_company company_id, date = ::Date.yesterday
booked_time = 0
blocked_time = 0
next if person.schedule.blank?
total_time = person.schedule.total_time_available_for_date(date)
total_time = person.schedule.total_time_available_for_date(date).to_i
total_time = total_time/60.0 #Convert to hours
booked_slots = Slot.where(person_id: person.id, date: date, status: Slot::BOOKING_BOOKED)
for slot in booked_slots
Expand Down