Page 1 of 1

PunchControl API getPunchControl() funtion returns Errors

Posted: Thu Dec 26, 2013 10:43 pm
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?

Re: PunchControl API getPunchControl() funtion returns Error

Posted: Fri Dec 27, 2013 9:28 am
by shaunw
What version of TimeTrex are you currently using?

Re: PunchControl API getPunchControl() funtion returns Error

Posted: Mon Jan 13, 2014 4:22 pm
by Yajasi
Oops - sorry. We were using version 7.1.2 when I posted this. Thanks!

Re: PunchControl API getPunchControl() funtion returns Error

Posted: Wed Jan 15, 2014 9:33 am
by shaunw
This will be corrected in the next version of TimeTrex, due out very soon.