app/models/payform.rb
# Total payform hours rounded according to department rounding option.
Total payform hours rounded according to department rounding option.
Total payform hours rounded according to department rounding option .
def hours
    raw_hours = payform_items.select{|p| p.active}.map{|i| i.hours}.sum
    rounded_hours = ((raw_hours.to_f * 60 / department.department_config.admin_round_option.to_f).round * (department.department_config.admin_round_option.to_f / 60))
    sprintf( "%0.02f", rounded_hours).to_f
  end
def hours raw_hours = payform_items . select { | p | p . active } . map { | i | i . hours } . sum rounded_hours = ( ( raw_hours . to_f * 60 / department . department_config . admin_round_option . to_f ) . round * ( department . department_config . admin_round_option . to_f / 60 ) ) sprintf ( "%0.02f" , rounded_hours ) . to_f end
Total payform hours rounded according to department rounding option.
Total payform hours rounded according to department rounding option .