Skip to content

Commit

Permalink
fix: screen bug fix efficiency_table
Browse files Browse the repository at this point in the history
  • Loading branch information
danilogomes committed Nov 7, 2023
1 parent ca36cb2 commit c05ef72
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/services/team_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ def compute_memberships_realized_hours(team, start_date, end_date)
private

def calculate_hours_per_month(sallary, month_hours)
result = sallary / month_hours
if result.nan? || result.infinite?
0.0
else
result
if month_hours == 0
result = 0.0
else
result = sallary / month_hours
if result.infinite? || result.nan?
0.0
else
result
end
end
end

Expand Down

0 comments on commit c05ef72

Please sign in to comment.