Class: Ecom::Core::Payroll
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Ecom::Core::Payroll
- Defined in:
- app/models/ecom/core/payroll.rb
Instance Method Summary collapse
Instance Method Details
#create_next ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'app/models/ecom/core/payroll.rb', line 13 def create_next m = month + 1 y = year if m > 12 m = 1 y += 1 end Payroll.create(month: m, year: y, site_id: site_id) end |