3 Replies Latest reply on Feb 2, 2012 2:16 PM by philmodjunk

    Daily Capacity

    JustinRea

      Title

      Daily Capacity

      Post

      Hi,

      I'm trying to create a database to use as a booking system for a boarding kennels. I need to enter the arival date and departure date for each pet and get filemaker to calculate how many kennels are in use on each night. How would I perform  this calculation? Could it then be used to create the invoice?

      Really don't have a clue how to do this so any help would be greatly appreciated!

      Many thanks

        • 1. Re: Daily Capacity
          philmodjunk

          How would the number of kennels in use be used to create an invoice?

          To count the number of kennels in use on a given date, you can perform a find and count the records or define a relationship and count the number of related records.

          Enter find mode and specify this criteria:

          <= specified date in the arrival date field
          >= specified date in the departure date field

          Perform the find (this can be scripted or performed manually.

          With a relationship, you can Define a global date field, gDate and use it in a relationship like this:

          SomeTable::gDate > KennelReservations::Arrival Date AND
          SomeTable::gDate < KennelReservations::Departure Date

          Then Count ( KennelReservatiosn::Arrival Date ) will count the number of kennels in use on a given date entered in the gDate field.

          • 2. Re: Daily Capacity
            JustinRea

            Sorry I didn't expalin myself very well. I was meaning that once I'd created the database with Customers, Pets, Price, arrival and departure dates could I use this info to automaticly create an invoice?

            Back to the first question, nightly capacity. I've understood the first part of your answer using the specific dates but I don't understand where I'm supposed to enter the "SomeTable info?

            Sorry for all the questions bu this is all very new to me!

            Thanks

             

             

             

             

             

             

             

             

             

             

             

             

            • 3. Re: Daily Capacity
              philmodjunk

              SomeTable was my placeholder for a table occurrence name. (Table occurrences are the boxes found in Manage | Database | Relationships.) You'd use an occurrence of whatever table in which you defined the gDate field, which doesn't necessarily have to be a global field, come to think of it...

              With regards to invoicing, I'd have an invoice layout where I'd be filling in the data you list in the first place.

              On the invoice layout...

              You'd select an existing customer or enter data for a new customer

              List each pet to be boarded by this customer

              List any value added services to be performed

              etc.

              There are a number of Invoicing examples that you can take a look at for ideas. The Invoicing starter solution is one. This demo file is another: http://fmforums.com/forum/showpost.php?post/309136/