Displaying 2 results from an estimated 2 matches for "total_fee".
Did you mean:
total_free
2009 Apr 17
0
Complex query
Hi,
Part of my Invoice table looks like this:
create_table "invoices", :force => true do |t|
t.datetime "sent_at",
t.datetime "received_payment_at",
t.integer "total_fee"
...
end
I want to put together view with monthly sums for ''invoiced amounts'' and
''received amounts'' like this:
month | total invoiced | total received
Feb 08 | 20,000 | 15,000
Mar 08 | 35,000 | 30,000
What'' the...
2008 Aug 31
6
why's my course_duration being reset
...ek *
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
else # from 48 and up
0.5
end
self.course_fee = (self.course_fee * @factor)
self.total_fee = course_booking_fee + accommodation_booking_fee +
course_fee + accommodation_fee
end
validates_date :date_of_birth, :requested_start_date
validates_presence_of :title,
:firstname,
:surname,
:address1,...