Sha256: b7e110fd2c82bfedb37e3ba331078d8bc4614bad77ef0276cdc102308dfc4607

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

module Xeroizer
  module Record
    module Payroll

      class PayScheduleModel < PayrollBaseModel

        set_permissions :read, :write, :update

        def create_method
          :http_post
        end
      end

      class PaySchedule < PayrollBase

        SCHEDULE_TYPES = {
          'WEEKLY' => 'Once per week on the same Day each week',
          'MONTHLY' => 'Once a month on the same Day each month',
          'BIWEEKLY' => 'Every 14 days on the same Day each period',
          'QUARTERLY' => 'Once a quarter on the same Day',
          'SEMIMONTHLY' => 'Twice a month on the same 2 Days each period',
          'FOURWEEKLY' => '',
          'YEARLY' => ''
        } unless defined?(SCHEDULE_TYPES)

        set_primary_key :pay_schedule_id

        guid :pay_schedule_id
        string :pay_schedule_name
        date :payment_date
        date :start_date
        string :schedule_type

        validates_presence_of :pay_schedule_name, :payment_date,
          :start_date, :schedule_type, :unless => :new_record?
        validates_inclusion_of :schedule_type, :in => SCHEDULE_TYPES
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

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