Class: EmployeeTimesheet
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- EmployeeTimesheet
- Includes:
- EmployeeTimesheetsProcedures
- Defined in:
- app/models/employee_timesheet.rb
Overview
Represents a timesheet entry for an employee.
Defined Under Namespace
Classes: View
Instance Method Summary collapse
-
#within_unlocked_period? ⇒ Boolean
Checks if the timesheet entry is within an unlocked payroll period.
Methods included from EmployeeTimesheetsProcedures
Methods inherited from ApplicationRecord
define_decrypted_attribute, define_decrypted_attributes, #errors_in_bullet_points, primary_connection, special_connection
Instance Method Details
#within_unlocked_period? ⇒ Boolean
Checks if the timesheet entry is within an unlocked payroll period.
33 34 35 36 37 38 39 |
# File 'app/models/employee_timesheet.rb', line 33 def within_unlocked_period? company = employee.company period = company.payroll_period_for_date(transaction_date) return true if period.nil? period.unlocked? end |