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 best way to write a query & a view to achieve this?
Thanks!
RQ
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---