Skip to content

Instantly share code, notes, and snippets.

@ajmorris
Created September 16, 2008 19:21
Show Gist options
  • Select an option

  • Save ajmorris/11111 to your computer and use it in GitHub Desktop.

Select an option

Save ajmorris/11111 to your computer and use it in GitHub Desktop.
def discretionary_leave
self.tokens.discretionary.map {|time| time.hours}.sum
end
def accrued_annual_leave(year=current_fiscal_year)
RateInfo.new(self, year).accrued_leave + discretionary_leave
end
def net_annual_leave(year=current_fiscal_year)
accrued_annual_leave(year) - used_annual_leave(year)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment