I would put both start date and end date. That could simplify the
calculations a little.

Milan Dobrota
http://www.milandobrota.com

On Feb 2, 10:12 am, adrianb <adrian.b...@gmail.com> wrote:
> > Your question isn't really a Rails question, but a good way to do this  
> > would be to have a bookings model and an inventory model.
>
> > The rooms are 'inventory'. Their selling price is in the inventory  
> > model. Dynamic changes can take place to the inventory while retaining  
> > previously booked room rates. .
>
> > The pricing model is linked to the inventory by date, or season, etc.  
> > Rake tasks nightly could update the inventory based on objects in the  
> > pricing model.
>
> > When a booking occurs you create a booking to lock-in the rate, and  
> > eventually that booking turns into an invoice when the customer checks  
> > in.
>
> > You're going to have to allow for the employee to make changes to the  
> > booking rate (with manager approval, of course) in the event the  
> > customer comes in and changes their room after a pricing event has  
> > taken place. etc.
>
> > -john
>
> Thanks for the insight John. I think i glossed over my problem in my
> post. My system isn't a hotel reservation system but a ticketing
> system for a shipping line. I got the reservation part down (by
> treating cots as inventory - which is exactly ChilliCoder's
> suggestion), but the client would like advanced rate changes to be
> setup to allow for bookings made in advance.
>
> The models i'm using are Voyage, Vessel, Route, Rate,
> AccommodationType, Reservation, etc. Voyage belongs to Route, Route
> belongs to Vessel, Vessel has many AccommodationTypes, Route has many
> Rates, Rate belongs to AccommodationType. I decided to put an
> effectivity date in the Rate model and do some checking to determine
> which rate is effective based on the Voyage's departure date. So far
> so good.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to