PunchControl API getPunchControl() funtion returns Errors

Discussion for TimeTrex open source community developers.
Locked
Yajasi
Posts: 108
Joined: Wed Oct 17, 2012 4:48 pm

PunchControl API getPunchControl() funtion returns Errors

Post by Yajasi »

Code: Select all

    $punchcontrol_obj = new TimeTrexClientAPI( 'PunchControl' );
    $result = $punchcontrol_obj->getPunchControl();
    $punchcontrol_data = $result->getResult();
            // show data for testing
            echo print_r($punchcontrol_data);
The above code will generate the error PHP Notice: SOAP Fault: (Code: Client, String: looks like we got no XML document).

To correct this problem, edit the file ../classes/modules/punch/PunchControlListFactory.class.php.

Code: Select all

// cut the following two lines of code
384               x.name as job,
386               y.name as job_item,
// paste these lines between line 421 and 422
421               x.name as job_name,
                    x.name as job,
                    y.name as job_item,
422               x.status_id as job_status_id,
You should now be able to use the API to retrieve PunchControl data.

TimeTrex, can this fix be included in the next release?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: PunchControl API getPunchControl() funtion returns Error

Post by shaunw »

What version of TimeTrex are you currently using?
Yajasi
Posts: 108
Joined: Wed Oct 17, 2012 4:48 pm

Re: PunchControl API getPunchControl() funtion returns Error

Post by Yajasi »

Oops - sorry. We were using version 7.1.2 when I posted this. Thanks!
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: PunchControl API getPunchControl() funtion returns Error

Post by shaunw »

This will be corrected in the next version of TimeTrex, due out very soon.
Locked