phpScheduleIt
June 20, 2013, 01:51:21 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: reservation time limit  (Read 602 times)
smashdes
Newbie
*

Karma: 0
Posts: 6


« on: November 07, 2011, 05:51:46 AM »

Hi,

I'm using this fantastic script for a tennis club.
We have a regulation that has these following limit to the reservation:

-a member can book courts for the following week only from 8am of the previous saturday.

For example if I want to book a now for sunday the 13th I have to wait until saturday at 8am.

How can I implement this rule with phpSI ?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #1 on: November 07, 2011, 02:28:18 PM »

Enforcing something like 8AM won't be totally possible, but you can set the minimum notification time for each resource.  If you set this to 168 (24 hours * 7 days), then nobody would be able to reserve anything more than 7 days in advance.

I know that doesn't solve your exact problem.  To enforce that specific rule you'd need to write some code.
Logged
smashdes
Newbie
*

Karma: 0
Posts: 6


« Reply #2 on: November 07, 2011, 07:06:15 PM »

.. I don't think is the right solution because...

every reservation for the following week can be done only starting from saturday..

So if I'm on sunday 1st I've to wait until saturday 7th to book for sunday the 8th..
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #3 on: November 14, 2011, 01:50:12 PM »

For this you'd need to write some code to enforce that rule.  There are a series of checks now being made in lib\Reservation.class.php (check_xxx).  You'd want to make another one of those and call it from add_res() and mod_res().
Logged
smashdes
Newbie
*

Karma: 0
Posts: 6


« Reply #4 on: November 14, 2011, 02:48:09 PM »

perfect! thank you
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!