Sha256: a460bd154f07d2f00324d996904be7be1402534891ef667caf420b39e9a328ea

Contents?: true

Size: 776 Bytes

Versions: 3

Compression:

Stored size: 776 Bytes

Contents

module Xeroizer
  module Record
    module Payroll

      class DeductionLineModel < PayrollBaseModel

      end

      class DeductionLine < PayrollBase

        DEDUCTION_TYPE_CALCULATION_TYPE = {
          'FIXEDAMOUNT' => '',
          'PRETAX' => '',
          'POSTTAX' => ''
        } unless defined?(DEDUCTION_TYPE_CALCULATION_TYPE)

        guid          :deduction_type_id, :api_name => 'DeductionTypeID'
        string        :calculation_type

        decimal :percentage
        decimal :amount

        # US Payroll fields
        decimal :employee_max

        validates_presence_of :earning_rate_id, :calculation_type, :unless => :new_record?
        validates_inclusion_of :calculation_type, :in => DEDUCTION_TYPE_CALCULATION_TYPE
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
xeroizer-3.0.1 lib/xeroizer/models/payroll/deduction_line.rb
xeroizer-3.0.0 lib/xeroizer/models/payroll/deduction_line.rb
xeroizer-3-pre-beta-3.0.0.pre.beta lib/xeroizer/models/payroll/deduction_line.rb