Punch Types

Discussion for TimeTrex open source community developers.
Locked
Zaphod
Posts: 6
Joined: Tue Jul 29, 2008 12:11 am

Punch Types

Post by Zaphod »

Hi All,

I'm attempting to use TimeTrex for a scheduling system within a small company (approx 20 staff) however, our current system uses an SMS to report shift times and my employer wants to keep this system.

Unfortunately it doesn't seem to be supported using TTs current system, and I'm trying to find out the best way to add a new punch type/interface.

I'm happy enough to do the development, but I'd like to have some idea of where I should start looking to attach my module within TT.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Can you provide a detailed example of how you currently track time with SMS? What is included in the SMS messages?

TimeTrex currently does have a WAP module included in the Business Edition that works quite well.
Zaphod
Posts: 6
Joined: Tue Jul 29, 2008 12:11 am

Post by Zaphod »

Sure. The SMS is sent in a format as follows

location_code start_date start_time end_time start_break_time end_break_time

so an example would be

LOC 29/07/08 2330 0630 0230 0300

This would mean that the staff member was at location code LOC, started his shift at 11:30pm on the 29th of July 2008, and had a break starting at 2:30am and came off break at 3am.

The staff have been used to doing this for a number of years, especially since an SMS is cheaper than internet data in Australia, and not all mobile phone holders have a data plan.

This company provides security staff to a number of venues around the area and there isn't much chance of putting in a punchcard system, or equivalent at each venue so a mobile phone/SMS combo works well. Unfortunately the existing scheduling system is very old and can't support more than 50 staff, so a replacement is required, hence I am looking at timetrex as a possible solution.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

It sounds extremely error prone to me, but I suppose it could work alright.

The first place I would look is at the punch/Punch.php file. It gives you a good idea of how to save a single punch.
Zaphod
Posts: 6
Joined: Tue Jul 29, 2008 12:11 am

Post by Zaphod »

Error prone it may be, but that's how I've been asked to set it up.

Thanks for the pointer, I'll take a look through Punch.php and see if I can make something work to keep my boss happy.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Please keep us updated on your progress, we're interested to hear how it works out for you.
Zaphod
Posts: 6
Joined: Tue Jul 29, 2008 12:11 am

Post by Zaphod »

Can do, but it would be easier if there was another example of external input rather than a web form.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Try this file instead:

tools/import/import_punches.php
Locked