Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Posts
    70

    Unanswered: How do I combine bookings?

    I am making a mock database for a cleaning company. I am very happy with it so far except for one major thing.


    Each booking can have a number of services which are all charged at separate rates and spend a different amount of time to complete. If I have 2 services in a booking, it will appear twice in a table but with the service different. I am at the stage where I am creating forms, how can I combine the services per booking to give a total cost and total time required per booking.

    I think the db can explain it better. If you look in the query KerasFutureBookings and the form, you will see what I mean.
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    its no different to selling a product
    you create an order that contains everything that is perinent to the order / sale
    you have a sub table which contains the services bought by the customer

    the orders table has a foreign key to the customers (thats where you pull the address, contact details etc.
    the order details table has a foriegn key to the order (so you know which order each item 'belongs' to. it also has a foreign key to a products table (which identifies what products have been consumed / sold.

    intrinsically products and services are the same. with careful deisgnf they can be in the same physical table. you may however have to think in detail how you handle services which may be sold by time (eg hours).
    you may also need to think about rate scales. eg some service companies may charge X for the first 30 minutes, then y for the remaining time
    you may also need to define setup 'products' eg travel time.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2012
    Posts
    70
    I've done everything you have said, I think, in my table already.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •