Class: SalaryReportsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/salary_reports_controller.rb

Instance Method Summary collapse

Instance Method Details

#yearly_ahv_statementObject

Actions



6
7
8
9
10
11
# File 'app/controllers/salary_reports_controller.rb', line 6

def yearly_ahv_statement
  @value_period = Date.parse(params[:by_value_period][:from] || Date.today.beginning_of_year)..Date.parse(params[:by_value_period][:to] || Date.today.end_of_year) if params[:by_value_period]
  @value_period ||= Date.today.beginning_of_year..Date.today.end_of_year

  @employments = Employment.valid_during(@value_period).all
end