asadjaved63 / easy-appointments

Automatically exported from code.google.com/p/easy-appointments
0 stars 0 forks source link

Auto-Generated Appointment End Time #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Login to backend
2.Press the "Add Appointment" button on the calendar page
3.Change services in the listbox

What is the expected output? What do you see instead?
It is expected that the appointment end time should be automatically generated 
using the service duration. This is not happening.

Please use labels and text to provide additional information.
E!A Version 1.0

Original issue reported on code.google.com by alextselegidis@gmail.com on 25 Aug 2014 at 9:27

GoogleCodeExporter commented 9 years ago
In the /application/controllers/appointments.php file, if you change line 368 
to be

$current_hour->add(new 
DateInterval("PT".intval($_POST['service_duration'])."M"));

it will work.
This is not the best way to do this, however, I found it to work without 
creating issues.

Original comment by TeuF...@gmail.com on 14 Sep 2014 at 4:27

GoogleCodeExporter commented 9 years ago
hi, I have made the change and no effect. I have multiple services and when  
choose different service the end time is not automatically generated using the 
service duration.

Original comment by parau.lu...@gmail.com on 14 Sep 2014 at 11:35

GoogleCodeExporter commented 9 years ago
Try this.
Search the file for: 
 ("PT15M")
Change "PT15M" to:
 ("PT".intval($_POST['service_duration'])."M")
You see what I'm getting at here? I'm replacing the hard coded PT15M with the 
service_duration value passed in from $_POST. This isn't the best way to do 
this but, it's a quick a dirty mod that works fine for me.

Original comment by TeuF...@gmail.com on 16 Sep 2014 at 4:49

GoogleCodeExporter commented 9 years ago
I have tried the given solution and it's not working. Is it necessary a change 
on the server? or more files?

Original comment by dobel...@gmail.com on 26 Sep 2014 at 11:43