phpScheduleIt
June 18, 2013, 03:37:07 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: How to apply minimum reservation time?  (Read 1012 times)
m8internet
Newbie
*

Karma: 0
Posts: 8


« on: February 10, 2012, 08:43:58 AM »

I ran into an issue with allowing users to submit new reservations, but eventually found the answer
Pretty much had a doh moment!

I am now need to implement the minimum reservation time so that it increases the end time to match the Start time plus the minimum reservation length
Similar to :
http://php.brickhost.com/forums/index.php?topic=4415.0

Any and all assistance welcome
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #1 on: February 13, 2012, 01:09:17 PM »

Does the approach in the post that you linked to work?
Logged
m8internet
Newbie
*

Karma: 0
Posts: 8


« Reply #2 on: February 24, 2012, 05:39:00 AM »

Does the approach in the post that you linked to work?
No, I followed the instructions but like everyone else in that thread the minimum reservation time was not applied
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #3 on: February 27, 2012, 01:58:20 PM »

Is this purely on the UI?
Logged
m8internet
Newbie
*

Karma: 0
Posts: 8


« Reply #4 on: February 27, 2012, 03:32:09 PM »

Is this purely on the UI?
What is the UI and where do I find it?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #5 on: March 05, 2012, 01:09:35 PM »

Sorry. What I'm asking is do you only need the end time drop down to be adjusted when you are creating a new reservation?
Logged
m8internet
Newbie
*

Karma: 0
Posts: 8


« Reply #6 on: March 06, 2012, 01:07:58 AM »

I eventually realised UI, meant User Interface
Yes, it is when a customer is submitting a new reservation

As an example
Resource 1
Minimum Reservation Time = 2 hours

Resource 6
Minimum Reservation Time = 7 hours
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #7 on: March 06, 2012, 01:09:24 PM »

I haven't tested this, but give it a try.

Change line 677 of templates/reserve.template.php to:

Code:
if ( ($res->get_end() + $rs['minres'] == $i) ) {
Logged
m8internet
Newbie
*

Karma: 0
Posts: 8


« Reply #8 on: March 08, 2012, 01:31:20 PM »

Change line 677 of templates/reserve.template.php to:
Line 677 is currently :
Code:
            echo '<td class="formNames" width="50%"><div id="div_start_date" style="float:left;width:86px;">' . Time::formatDate($start_date, '', false) . '</div>' . Time::formatTime($res->get_start()) . "</td>\n"
Are you sure you have the correct line?
Alternatively, can you post what the line would originall look like
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #9 on: March 12, 2012, 04:04:07 PM »

It would have been this:

Code:
if ( ($res->get_end() == $i) ) {
Logged
m8internet
Newbie
*

Karma: 0
Posts: 8


« Reply #10 on: March 14, 2012, 01:52:09 AM »

No, that doesn't work
Adding that code results in Error 500
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5506


WWW
« Reply #11 on: March 19, 2012, 02:18:04 PM »

Hmm, how about this:

Code:
if ( (($res->get_end() + $rs['minres']) == $i) ) {
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!