Class: Ecom::Core::CrewTime

Inherits:
ApplicationRecord show all
Defined in:
app/models/ecom/core/crew_time.rb

Instance Method Summary collapse

Instance Method Details

#calculate_converted_hoursObject



16
17
18
19
20
21
22
23
# File 'app/models/ecom/core/crew_time.rb', line 16

def calculate_converted_hours
  if overtime
    rate = OvertimeType.find(overtime_type_id).rate
    self.converted_hours = hours * rate
  else
    self.converted_hours = hours
  end
end