Delicious      Technorati      Blinklist      Furl      Reddit

TimeTrex Time and Attendance

TimeTrex Time and Attendance


* FAQ    * Search
* Login   * Register

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Feb 16, 2016 8:57 pm 
Offline

Joined: Wed Nov 18, 2015 1:36 am
Posts: 13
Hi,

I cannot seem to get the result in acquiring a User's Wage Hourly Rate.

Code:
require_once('../classes/modules/api/client/TimeTrexClientAPI.class.php');
/*
 Global variables
*/
$TIMETREX_URL = 'http://localhost/timetrex/api/soap/api.php';
$TIMETREX_USERNAME = 'username';
$TIMETREX_PASSWORD = 'password';

$api_session = new TimeTrexClientAPI();
$api_session->Login( $TIMETREX_USERNAME, $TIMETREX_PASSWORD );
if ( $TIMETREX_SESSION_ID == FALSE ) {
   echo "Login Failed!<br>\n";
   exit;
}

$user_obj = new TimeTrexClientAPI( 'User' );
$result = $user_obj->getUser(
                           array('filter_data' => array(
                                                'user_name' => '1002',
                                             )
                           )
                        );

$user_data = $result->getResult();
$user_id = $user_data[0]['id'];

$wage_obj = new TimeTrexClientAPI( 'UserWage' );
/*$resultw = $wage_obj->getCommonUserWageData();*/
$resultw = $wage_obj->getUserWage(
                           array('filter_data' => array(
                                                'user_id' => $user_id
                                             )
                           
                           )
                        );

$wage_data = $resultw->getResult();

var_dump($wage_data);



Using the code above I only get this dump result:

Code:
boolean true


Any parameters I missed in here?

Thanks.


Top
 Profile  
 
PostPosted: Tue Feb 16, 2016 10:17 pm 
Offline

Joined: Wed Nov 18, 2015 1:36 am
Posts: 13
All good..

I just f*d up the timetrex_url since i have a test and live environment.

wasted my whole morning looking for the issue. smh :lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Time and Attendance




Powered by phpBB® Forum Software © phpBB Group