phpScheduleIt
May 23, 2013, 04:15:37 PM *
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: Cost -> Reservation  (Read 921 times)
dash2nash
Newbie
*

Karma: 0
Posts: 3


« on: September 05, 2010, 09:19:32 AM »

Hi, I guess i'm pretty new here, I've used this system quite a while but havent realize that there's a forum.
Anw, I was trying to put a 'cost' (or whatever the attribute will be called) on reservation table.
The purpose of me putting this attribute is to keep track of the cost for each reservation.
And later on, this attribute will enhance the system to give a new functionality, which is simple business-reporting.

At the moment I'm still trying to find out how the things work tho, any help would b great.
The things I have done:
1. Putting cost attribute on reservation table (after summary)
2. Putting new option on 'my control panel' which is still leading to nowhere

The things I'm still confused on (at least until this point):
1. (this may sound dumb, but I'm a beginner-programmer) what actually programming language are you using? Object Oriented PHP?
2. Where's the file (or part of code) to display the form when I'm creating a new reservation.

Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: September 07, 2010, 01:43:16 PM »

1) The current version should work with PHP 4.3+
2) All UI is contained within the \templates directory.  For the reservation form, this would be in \templates\reserve.template.php

There is a developers guide out on SourceForge that goes through the steps of adding a new field.  If you haven't had a chance yet I'd recommend taking a look.
Logged
dash2nash
Newbie
*

Karma: 0
Posts: 3


« Reply #2 on: September 09, 2010, 12:13:41 AM »

Cheers! I finished with adding cost and balance for (simple) reporting analysis, next step I'll do the sales accounting for each month
Also, I was trying to 'reserve' a reservation from an interface website (not sure if i'm using the right term here), in simple ways, I want to book a reservation from other website directly to the system, without the login to admin, the one way to assure that the reservation is valid is doing payment (via paypal) before a reservation is booked on the system. I don't know how can I get the data for reservation and how to query the resid, machid, scheduleid, etc.
Any suggestion?
« Last Edit: September 09, 2010, 12:20:35 AM by dash2nash » Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #3 on: September 13, 2010, 01:19:36 PM »

If you know the reservation Id, this should be pretty straightforward.  There is a method named load_by_id() on the lib\Reservation.class.php object.  Just create a reservation with the Id, call that method and you should be ready to rock.
Logged
dash2nash
Newbie
*

Karma: 0
Posts: 3


« Reply #4 on: September 16, 2010, 06:21:32 AM »

And now my question is how can I generate / get that reservation Id  Huh  Huh is the reservation_id just some random numbers or what?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #5 on: September 20, 2010, 01:41:01 PM »

It is a random string, but if you're pulling a range of reservations out of the database then you will have the ID for each record.

If you need to generate new Ids, there is a method called get_new_id() in lib\DBEngine.class.php which you can use/copy.
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!