Class: HrLite::PayrollLineItem

Inherits:
ApplicationRecord show all
Includes:
Audited, EncryptedMoney
Defined in:
app/models/hr_lite/payroll_line_item.rb

Overview

A one-off on one month's payslip: a bonus, an incentive, arrears after a backdated revision, a reimbursement, a one-time deduction.

Dated to the MONTH, not to the run, so deleting a draft run and computing it again does not lose them.

Constant Summary

Constants included from Audited

Audited::REDACTED, Audited::SKIPPED_ATTRIBUTES

Class Method Summary collapse

Class Method Details

.for_slip(user, period_month) ⇒ Object



24
25
26
# File 'app/models/hr_lite/payroll_line_item.rb', line 24

def self.for_slip(user, period_month)
  where(user_id: user.id, period_month: period_month).includes(:component)
end