Displaying 1 result from an estimated 1 matches for "course_fee".
2008 Aug 31
6
why's my course_duration being reset
...he Selected Accomodation
# set course_booking_fee from the Selected Course
self.course_booking_fee = course.registration_fee
self.accommodation_booking_fee = accomodation.booking_fee
end
def calculate_fees
# DO STUFF !
# self.blah_fee = blah_duration * whatever
self.course_fee = course.price_per_week * course_duration.to_i
self.accommodation_fee = accomodation.price_per_week *
accomodation_duration.to_i
@factor = case @duration_in_weeks
when 1..4
1.0
when 5..12
0.9
when 13..24
0.8
when 25..47
0.7
els...