Class: SalaryBookingTemplatesController
- Inherits:
-
BookingTemplatesController
- Object
- BookingTemplatesController
- SalaryBookingTemplatesController
- Defined in:
- app/controllers/salary_booking_templates_controller.rb
Instance Method Summary collapse
Instance Method Details
#copy ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/salary_booking_templates_controller.rb', line 4 def copy # Duplicate original record template = resource.dup # Rebuild positions set_resource_ivar template render 'edit' end |
#statistics ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/salary_booking_templates_controller.rb', line 14 def statistics if params['date'] date = Date.parse(params['date']) else date = Date.today end @duration = date.beginning_of_month..date.end_of_month @salary_booking_templates = SalaryBookingTemplate.all end |