class TimesheetRow

File

timesheet_row.rb

(C)

Hipposoft 2008

Purpose

Describe the behaviour of TimesheetRow objects. See below for more details.


07-Jan-2008 (ADH): Created.

Constants

DAY_NAMES
DAY_ORDER

Day number order within a row - Monday to Sunday. While originally this was intended to be potentially mutable, it became too onerous elsewhere to calculate week numbers and far simpler/more reliable/faster to just use “cweek” in Ruby. Thus weeks must always run Monday->Sunday.

FIRST_DAY
LAST_DAY

Public Instance Methods

row_sum() click to toggle source

Return the sum of hours in work packets on this row.

# File app/models/timesheet_row.rb, line 53
def row_sum()
  return self.work_packets.sum( :worked_hours )
end