Invalid User Date ID.

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
bobbyt
Posts: 7
Joined: Thu Mar 15, 2007 2:45 pm

Invalid User Date ID.

Post by bobbyt »

Trying to add PTO Absence for one employe for 11/21/2007 and I get the following error... "Invalid User Date ID."

I can add a PTO Absence for other employees on this day and I can add a PTO Absence for this employee the day before and after this date.

I also tried added just a punch for that day and I get this error... "Pay Period is Currently Locked, or Date/Time is incorrect." and the same as above it works for other employess and the day before and after.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Try to add the absence for the employee again but this time just before you press the submit button, enable debugging mode as described in this FAQ entry:
http://forums.timetrex.com/viewtopic.php?t=89

Then press the Submit button after you have modified the timetrex.ini.php file. Copy and paste the debug output here.
bobbyt
Posts: 7
Joined: Thu Mar 15, 2007 2:45 pm

debug output

Post by bobbyt »

(mysqlt): SET SESSION sql_mode='ansi' (mysqlt): select session_id,user_id,ip_address,created_date,updated_date from authentication WHERE session_id = 'd072fa4084c6b293762619855a77d022' AND ip_address = '10.0.30.58' AND updated_date >= 1190056031 (mysqlt): update authentication set updated_date = 1190070431 where session_id = 'd072fa4084c6b293762619855a77d022' (mysqlt): SET SESSION time_zone='US/Mountain' (mysqlt): select * from cron WHERE deleted = 0 ORDER BY last_run_date DESC LIMIT 1 (mysqlt): select d.severity_id as severity_id, count(*) as count from exception as a LEFT JOIN user_date as b ON a.user_date_id = b.id LEFT JOIN users as c ON b.user_id = c.id LEFT JOIN exception_policy as d ON a.exception_policy_id = d.id LEFT JOIN pay_period as e ON b.pay_period_id = e.id where b.user_id = '1' AND b.date_stamp < '2007-09-17 00:00:00' AND e.status_id = 10 AND NOT EXISTS ( select z.id from request as z where z.user_date_id = a.user_date_id AND z.status_id = 30 ) AND ( a.deleted = 0 AND b.deleted = 0 AND e.deleted=0) GROUP BY d.severity_id ORDER BY d.severity_id desc (mysqlt): SET AUTOCOMMIT=0 (mysqlt): BEGIN (mysqlt): select * from user_date where user_id = '416' AND date_stamp = '2007-11-21 00:00:00' AND deleted = 0 (mysqlt): select * from absence_policy where id = '1' AND deleted = 0 (mysqlt): select * from department where id = '8' AND deleted = 0 FailTrans was called

ADOConnection.FailTrans() % line 726, file: Factory.class.php
Factory.FailTransaction() % line 150, file: EditUserAbsence.php

/tmp/timetrex//07/adodb_07da2a118c1d8d1691581f55510b314b.cache reloaded, ttl=55883 [ select * from absence_policy where id = -1 ]
(mysqlt): select * from absence_policy as a where company_id = '1' AND deleted = 0 order by type_id asc (mysqlt): select * from branch where company_id = '1' AND deleted = 0 (mysqlt): select * from department where company_id = '1' AND deleted = 0
Edit Absence
Incorrect Input!

1. Invalid User Date ID.

Employee: Sam Gallegos
Date: 11/21/2007
Repeat Absence for: day(s) after above date.
Time: ie: hh:mm (2:15)
Type:
Accrual Policy: None
Available Balance: N/A
Branch:
Department:
Override:


Debug Buffer
============================================================================
Memory Usage: 6497216
----------------------------------------------------------------------------
DEBUG [153]: [Function](): URI: /timetrex/interface/punch/EditUserAbsence.php
DEBUG [155]: [Function](): Production: 1
DEBUG [486]: Authentication::Check(): Session Name: SessionID
DEBUG [492]: Authentication::Check(): Session ID: d072fa4084c6b293762619855a77d022
DEBUG [301]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:d072fa4084c6b293762619855a77d022
DEBUG [78]: Authentication::getIdle(): Idle Seconds Allowed: 14400
DEBUG [301]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:d072fa4084c6b293762619855a77d022
DEBUG [62]: [Function](): User Authenticated: rt21869 Created Date: 1190037473
DEBUG [1825]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [92]: TTDate::setTimeZone(): Setting TimeZone: US/Mountain
DEBUG [108]: TTDate::setDateFormat(): Setting Default Date Format: m/d/Y
DEBUG [122]: TTDate::setTimeFormat(): Setting Default Time Format: g:i A
DEBUG [136]: TTDate::setTimeUnitFormat(): Setting Default Time Unit Format: 10
DEBUG [1825]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [954]: UserPreferenceFactory::isPreferencesComplete(): User Preferences IS Complete:
DEBUG [199]: [Function](): UnRead Messages: 0
DEBUG [160]: TTDate::parseTimeUnit(): Time Unit Format: 10
DEBUG [87]: [Function](): Submit!
DEBUG [94]: [Function](): Repeating Punch For: 0 Days
DEBUG [720]: Factory::StartTransaction(): StartTransaction(): Transaction Count: 0 Trans Off: 0
DEBUG [100]: [Function](): Absence Repeat: 0
DEBUG [107]: [Function](): Date Stamp: 11/21/2007 12:00 AM
DEBUG [209]: UserDateFactory::findOrInsertUserDate(): More then 1 user date row was detected!!: 2
DEBUG [212]: UserDateFactory::findOrInsertUserDate(): Cant find or insert User Date ID. User ID: 416 Date: 1195628400
DEBUG [405]: Validator::Error(): Validation Error: Label: user_date Msg: Invalid User Date ID
DEBUG [94]: Validator::inArrayKey(): Key: 30
DEBUG [94]: Validator::inArrayKey(): Key: 10
DEBUG [106]: Validator::isNumeric(): Value:28800
DEBUG [737]: Factory::isValid(): Calling Validate()
DEBUG [1735]: UserDateTotalFactory::Validate(): Checking over already existing overridden entries ... User Date ID: Status ID: 30 Type ID: 10
DEBUG [1749]: UserDateTotalFactory::Validate(): Record Count:
DEBUG [384] Array: Validator::isValid(): Errors

array(1) {
["user_date"]=>
array(1) {
[0]=>
string(20) "Invalid User Date ID"
}
}


DEBUG [725]: Factory::FailTransaction(): FailTransaction(): Transaction Count: 1 Trans Off: 1
DEBUG [384] Array: Validator::isValid(): Errors

array(1) {
["user_date"]=>
array(1) {
[0]=>
string(20) "Invalid User Date ID"
}
}


DEBUG [374]: Validator::isValid(): Num Errors: 1
DEBUG [374]: Validator::isValid(): Num Errors: 1
DEBUG [374]: Validator::isValid(): Num Errors: 1
DEBUG [374]: Validator::isValid(): Num Errors: 1
DEBUG [374]: Validator::isValid(): Num Errors: 1
DEBUG [374]: Validator::isValid(): Num Errors: 1
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 42.9270 ms (16.05 %) Authentication::Check()
1 21.1241 ms (7.90 %) Interface.inc - Check for Exceptions
1 11.7321 ms (4.39 %) Interface.inc - Check for UNREAD messages...
1 2.4271 ms (0.91 %) getEmptyRecordSet()
1 170.0513 ms (63.57 %) unprofiled

19.2313 ms (7.19 %) Missed
============================================================================
267.4930 ms (100.00 %) OVERALL TIME
============================================================================
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

This is the issue here:
DEBUG [209]: UserDateFactory::findOrInsertUserDate(): More then 1 user date row was detected!!: 2
What version of TimeTrex and MySQL are you using?
bobbyt
Posts: 7
Joined: Thu Mar 15, 2007 2:45 pm

Version Numbers

Post by bobbyt »

TimeTrex = 1.5.0
mysql = 5.0.22
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Please upgrade to the latest version of TimeTrex. v2.0.3 or even better v2.1.0-rc3 as v1.5.0 is quite old now.

I would recommend keeping up to date on the new versions as much as possible as sometimes there are important fixes that can prevent issues such as this. Not to mention you will gain access to additional features.

The upgrade should hopefully fix this issue for you.
bobbyt
Posts: 7
Joined: Thu Mar 15, 2007 2:45 pm

Update to New Version

Post by bobbyt »

Updated TimeTrex to newest version and it fixed the problem.

Thank you...
Locked