OLD - Punches not visible

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
vmp
Posts: 99
Joined: Wed Jun 20, 2007 3:41 am

OLD - Punches not visible

Post by vmp »

We have been using TimeTrex since Sep'07.
However our punches for Sep are currently not visible.
Oct & Nov punches are visible.
We're not sure why.

I checked the DB and the punches are present in the punch table, the punch_control_id is present in the punch_control table
I found that the user_date_id for the punch_control record for Sep is not in the user_date table.
It's like the user_date info (schedule) for Sep pay period was deleted, but we dont recall doing so from the system.
Even if we had, the system would have flagged them as deleted = 1, right? But that's not the case. We've never ventured direclty into the DB for manual updates...

How can we make the punches visible?
Please....I hope you have a solution..........
Some MySQL scripts to update the DB perhaps...!!

Below is debug output when navigating the MyTimesheet screen
-----------------------------------------
mysqlt): SET SESSION time_zone='GMT'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select session_id,user_id,ip_address,created_date,updated_date from authentication WHERE session_id = '9add3ac8af4f609e2c4a78e2112b1415' AND ip_address = '62.150.70.108' AND updated_date >= 1194839447
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): update authentication set updated_date = 1194853847 where session_id = '9add3ac8af4f609e2c4a78e2112b1415'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SET SESSION time_zone='Asia/Kuwait'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from station where company_id = '1' AND station_id = '43b72581a9c84bce8ed42439387cea85' AND deleted = 0
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from cron WHERE deleted = 0 ORDER BY last_run_date DESC LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SELECT count(*) FROM message as a LEFT JOIN users as d ON a.object_type_id = 5 AND a.object_id = d.id LEFT JOIN request as b ON a.object_type_id = 50 AND a.object_id = b.id LEFT JOIN user_date as c ON b.user_date_id = c.id LEFT JOIN pay_period_time_sheet_verify as e ON a.object_type_id = 90 AND a.object_id = e.id WHERE a.object_type_id in (5,50,90) AND a.status_id = 10 AND ( ( c.user_id = '1' OR d.id = '1' OR e.user_id = '1' OR a.parent_id in ( select parent_id FROM message WHERE created_by = '1' AND parent_id != 0 ) OR a.parent_id in ( select id FROM message WHERE created_by = '1' AND parent_id = 0 ) ) AND a.created_by != '1' ) AND ( a.deleted = 0 AND ( b.id IS NULL OR ( b.id IS NOT NULL AND b.deleted = 0 ) ) AND ( c.id IS NULL OR ( c.id IS NOT NULL AND c.deleted = 0 ) ) AND ( d.id IS NULL OR ( d.id IS NOT NULL AND d.deleted = 0 ) ) AND ( e.id IS NULL OR ( e.id IS NOT NULL AND e.deleted = 0 ) ) AND NOT ( b.id IS NULL AND c.id IS NULL AND d.id IS NULL AND e.id IS NULL ) )
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(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-11-12' 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): select a.* from permission as a, permission_control as b, permission_user as c where b.id = a.permission_control_id AND b.id = c.permission_control_id AND b.company_id = '1' AND c.user_id = '1' AND ( a.deleted = 0 AND b.deleted = 0 )
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//e1/adodb_e133c8b1723a96276f35a030f6aca62a.cache reloaded, ttl=76367 [ select * from user_generic_data where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select * from user_generic_data where user_id = '1' AND script = '/TimeTrex/interface/timesheet/ViewUserTimeSheet.php' AND is_default = 1 AND deleted = 0 order by updated_date desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SELECT a.object_id, a.parent_id, a.left_id, a.right_id, count(b.object_id)-1 as level FROM user_group_tree a LEFT JOIN user_group_tree b ON a.tree_id = b.tree_id AND a.left_id BETWEEN b.left_id AND b.right_id WHERE a.tree_id = '1' AND a.object_id = 0 GROUP BY a.object_id, a.left_id, a.object_id, a.parent_id, a.right_id
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SELECT object_id FROM user_group_tree WHERE tree_id = '1' AND parent_id = -1 LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SELECT a.object_id, a.parent_id, a.left_id, a.right_id, count(b.object_id)-1 as level FROM user_group_tree a LEFT JOIN user_group_tree b ON a.tree_id = b.tree_id AND a.left_id BETWEEN b.left_id AND b.right_id WHERE a.tree_id = '1' AND a.object_id = '0' GROUP BY a.object_id, a.left_id, a.object_id, a.parent_id, a.right_id
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SELECT a.object_id, a.parent_id, count(b.object_id)-1 as level FROM user_group_tree a LEFT JOIN user_group_tree b ON a.tree_id = b.tree_id AND a.left_id BETWEEN b.left_id AND b.right_id WHERE a.tree_id = '1' AND b.left_id >= '1' AND b.right_id <= '33' AND a.object_id != '0' GROUP BY a.object_id, a.parent_id, a.left_id ORDER BY a.left_id
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from user_group where id = 2
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from branch where company_id = '1' AND deleted = 0
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from department where company_id = '1' AND deleted = 0
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//a4/adodb_a47e439a7316c700be66a9b931749faa.cache reloaded, ttl=76361 [ select * from users where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select a.* from users as a LEFT JOIN branch as b ON a.default_branch_id = b.id LEFT JOIN department as c ON a.default_department_id = c.id LEFT JOIN user_group as d ON a.group_id = d.id LEFT JOIN user_title as e ON a.title_id = e.id where a.company_id = '1' AND a.deleted = 0 order by status_id asc,last_name asc,first_name asc,middle_name asc
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//a4/adodb_a47e439a7316c700be66a9b931749faa.cache reloaded, ttl=76361 [ select * from users where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select * from users where company_id = '1' AND id in ('1') AND deleted = 0 order by status_id asc,last_name asc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from users where company_id = '1' AND id in ('1') AND deleted = 0 order by status_id asc,last_name asc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SET AUTOCOMMIT=0
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): BEGIN
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//e1/adodb_e133c8b1723a96276f35a030f6aca62a.cache reloaded, ttl=76367 [ select * from user_generic_data where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select * from user_generic_data where user_id = '1' AND script = '/TimeTrex/interface/timesheet/ViewUserTimeSheet.php' AND is_default = 1 AND deleted = 0 order by updated_date desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select id,user_id,script,name,is_default,data,created_date,created_by,updated_date,updated_by,deleted_date,deleted_by,deleted,company_id from user_generic_data where id = 4
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): UPDATE user_generic_data SET IS_DEFAULT=0, UPDATED_DATE=1194853847 WHERE id = 4
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select id,name,company_id,user_id,script,data,is_default,updated_date,updated_by from user_generic_data where id = 4
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): UPDATE user_generic_data SET DATA='a:5:{s:9:\"group_ids\";s:2:\"-1\";s:10:\"branch_ids\";s:2:\"-1\";s:14:\"department_ids\";s:2:\"-1\";s:7:\"user_id\";s:1:\"1\";s:4:\"date\";i:1189198800;}', IS_DEFAULT=1 WHERE id = 4
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): COMMIT
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): SET AUTOCOMMIT=1
--------------------------------------------------------------------------------
Smart Commit occurred

--------------------------------------------------------------------------------
(mysqlt): select * from user_date where user_id = '1' AND date_stamp = '2007-09-08' AND deleted = 0 ORDER BY id ASC
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.* from pay_period as a, pay_period_schedule as b, pay_period_schedule_user as c where a.pay_period_schedule_id = b.id AND a.pay_period_schedule_id = c.pay_period_schedule_id AND c.user_id = '1' AND a.start_date <= '2007-09-08 00:00:00' AND a.end_date >= '2007-09-08 00:00:00' AND a.deleted=0 AND b.deleted=0
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select name FROM bread_crumb WHERE user_id = '1' AND name = 'My Timesheet' LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): UPDATE bread_crumb SET url = '/TimeTrex/interface/timesheet/ViewUserTimeSheet.php?filter_data[group_ids]=-1&filter_data[branch_ids]=-1&filter_data[department_ids]=-1&filter_data[user_id]=1&filter_data[date]=1188594000&next_week=1', created_date = 1194853847 WHERE user_id = '1' AND name = 'My Timesheet'
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, c.date_stamp as user_date_stamp, b.note as note from punch as a, punch_control as b, user_date as c, users as d where a.punch_control_id = b.id AND b.user_date_id = c.id AND c.user_id = d.id AND d.company_id = '1' AND c.user_id = '1' AND c.date_stamp >= '2007-09-02' AND c.date_stamp <= '2007-09-08' AND ( a.deleted = 0 AND b.deleted = 0 AND c.deleted = 0 ) ORDER BY a.time_stamp asc, a.status_id desc, a.punch_control_id asc
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//9c/adodb_9c965f4bc6583609fd74dc0d4985ae31.cache reloaded, ttl=76367 [ select * from meal_policy where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select * from meal_policy as a where company_id = '1' AND deleted = 0 order by type_id asc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total 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 over_time_policy as d ON a.over_time_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND a.status_id = 10 AND a.type_id = 100 AND b.date_stamp >= '2007-09-02' AND b.date_stamp <= '2007-09-08' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total 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 over_time_policy as d ON a.over_time_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND a.status_id = 10 AND a.type_id not in (40,100) AND b.date_stamp >= '2007-09-02' AND b.date_stamp <= '2007-09-08' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc, a.over_time_policy_id desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total 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 over_time_policy as d ON a.over_time_policy_id = d.id LEFT JOIN absence_policy as e ON a.absence_policy_id = e.id LEFT JOIN punch_control as f ON a.punch_control_id = f.id where c.company_id = '1' AND b.user_id = '1' AND a.type_id not in (10,40,100) AND b.date_stamp >= '2007-09-02' AND b.date_stamp <= '2007-09-08' AND a.status_id in (10,30) AND ( e.type_id is NULL OR e.type_id = 10 ) AND ( a.deleted = 0 AND b.deleted = 0 AND (f.deleted=0 OR f.deleted is NULL) ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//8e/adodb_8e89048b4e6b4d164af515640a54856a.cache reloaded, ttl=75923 [ select * from premium_policy where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select * from premium_policy as a where company_id = '1' AND deleted = 0 order by type_id asc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp from user_date_total 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 over_time_policy as d ON a.over_time_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND a.status_id = 10 AND a.type_id = 40 AND b.date_stamp >= '2007-09-02' AND b.date_stamp <= '2007-09-08' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//b8/adodb_b8c564b3ad6cd1d98f0d96cde48f4df4.cache reloaded, ttl=76367 [ 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 a.*, b.date_stamp as user_date_stamp from user_date_total 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 over_time_policy as d ON a.over_time_policy_id = d.id where c.company_id = '1' AND b.user_id = '1' AND a.status_id = 30 AND a.type_id not in (40,100) AND b.date_stamp >= '2007-09-02' AND b.date_stamp <= '2007-09-08' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, a.status_id asc, a.type_id asc, d.type_id desc, a.over_time_policy_id desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as user_date_stamp, d.severity_id as severity_id, d.type_id as exception_policy_type_id 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 where c.company_id = '1' AND b.user_id = '1' AND b.date_stamp >= '2007-09-02' AND b.date_stamp <= '2007-09-08' AND ( a.deleted = 0 AND b.deleted = 0 ) ORDER BY b.date_stamp asc, d.type_id
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.*, b.date_stamp as date_stamp from request as a, user_date as b, users as c where a.user_date_id = b.id AND b.user_id = c.id AND c.company_id = '1' AND b.user_id = '1' AND a.status_id = 30 AND b.date_stamp >= '2007-09-02' AND b.date_stamp <= '2007-09-08' AND ( a.deleted = 0 AND b.deleted = 0 AND c.deleted = 0 )
--------------------------------------------------------------------------------
/home/xxx/public_html/TimeTrex/var/timetrex/cache//28/adodb_28012a0803a7cb8a5b2801dd1a8eb041.cache reloaded, ttl=76367 [ select * from holidays where id = -1 ]

--------------------------------------------------------------------------------
(mysqlt): select distinct d.* from policy_group_user as a, policy_group as b, holiday_policy as c, holidays as d where a.policy_group_id = b.id AND b.holiday_policy_id = c.id AND c.id = d.holiday_policy_id AND d.date_stamp >= '2007-09-02' AND d.date_stamp <= '2007-09-08' AND a.user_id in ('1') AND ( c.deleted = 0 AND d.deleted=0 ) order by d.date_stamp desc
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.* from pay_period_time_sheet_verify as a where a.pay_period_id = '31' AND a.user_id = '1' AND ( a.deleted = 0 )
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select * from pay_period where pay_period_schedule_id = '15' AND id < '31' AND deleted=0 ORDER BY id desc LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select sum(total_time) from user_date_total as a, user_date as b where a.user_date_id = b.id AND b.user_id = '1' AND b.pay_period_id = '31' AND ( a.status_id = 20 OR ( a.status_id = 10 AND a.type_id = 100 ) ) AND ( a.deleted = 0 AND b.deleted=0 )
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select sum(total_time) from user_date_total as a, user_date as b, absence_policy as c where a.user_date_id = b.id AND a.absence_policy_id = c.id AND b.user_id = '1' AND b.pay_period_id = '31' AND a.status_id = 30 AND c.type_id = 10 AND ( a.deleted = 0 AND b.deleted=0 )
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select sum(total_time) from user_date_total as a, user_date as b, absence_policy as c where a.user_date_id = b.id AND a.absence_policy_id = c.id AND b.user_id = '1' AND b.pay_period_id = '31' AND a.status_id = 30 AND c.type_id = 30 AND ( a.deleted = 0 AND b.deleted=0 )
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): select a.type_id as type_id, a.over_time_policy_id as over_time_policy_id, sum(total_time) as total_time from user_date_total as a, user_date as b where a.user_date_id = b.id AND b.user_id = '1' AND b.pay_period_id = '31' AND a.status_id = 10 AND a.type_id not in ( 10, 40, 100 ) AND ( a.deleted = 0 AND b.deleted=0 ) group by a.type_id, a.over_time_policy_id order by a.type_id, a.over_time_policy_id
##################################################
Debug Buffer
============================================================================
Memory Usage: 12876504
----------------------------------------------------------------------------
DEBUG [249]: [Function](): URI: /TimeTrex/interface/timesheet/ViewUserTimeSheet.php?filter_data[group_ids]=-1&filter_data[branch_ids]=-1&filter_data[department_ids]=-1&filter_data[user_id]=1&filter_data[date]=1188594000&next_week=1
DEBUG [251]: [Function](): Production: 0
DEBUG [100]: TTDate::setTimeZone(): Setting TimeZone: GMT
DEBUG [497]: Authentication::Check(): Session Name: SessionID
DEBUG [503]: Authentication::Check(): Session ID: 9add3ac8af4f609e2c4a78e2112b1415
DEBUG [399]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:9add3ac8af4f609e2c4a78e2112b1415
DEBUG [78]: Authentication::getIdle(): Idle Seconds Allowed: 14400
DEBUG [399]: Validator::stripNonAlphaNumeric(): Alpha Numeric String:9add3ac8af4f609e2c4a78e2112b1415
DEBUG [69]: [Function](): User Authenticated: admin Created Date: 1194853462
DEBUG [1907]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [100]: TTDate::setTimeZone(): Setting TimeZone: Asia/Kuwait
DEBUG [129]: TTDate::setDateFormat(): Setting Default Date Format: d-M-Y
DEBUG [143]: TTDate::setTimeFormat(): Setting Default Time Format: g:i A
DEBUG [157]: TTDate::setTimeUnitFormat(): Setting Default Time Unit Format: 10
DEBUG [100]: [Function](): Locale Cookie: en_US
DEBUG [235]: TTi18n::getLanguageFromLocale(): Locale: en_US
DEBUG [108]: [Function](): User Preference Language matches cookie!
DEBUG [270]: TTi18n::setLocale(): Attempting to set Locale to: en_KW Category: 6 Current Locale:
DEBUG [273]: TTi18n::setLocale(): Attempting to set Locale to: en_KW
DEBUG [275]: TTi18n::setLocale(): Failed setting i18n locale: en_KW
DEBUG [279]: TTi18n::setLocale(): Failed setting normalized i18n locale: en_US
DEBUG [291]: TTi18n::setLocale(): Setting translator normalized locale to: en_US
DEBUG [309]: TTi18n::setLocale(): Set Locale To: en_KW
DEBUG [1907]: UserFactory::isInformationComplete(): User Information is Complete:
DEBUG [1102]: UserPreferenceFactory::isPreferencesComplete(): User Preferences IS Complete:
DEBUG [136]: [Function](): Station ID Cookie found! 43b72581a9c84bce8ed42439387cea85
DEBUG [243]: [Function](): UnRead Messages: 0
DEBUG [271]: [Function](): Exception Flag to Display: yellow
DEBUG [117]: [Function](): Found Default Filter!
DEBUG [342]: FastTree::getAllChildren(): Getting Root ID: 0
DEBUG [387]: HierarchyListFactory::getHierarchyChildrenByCompanyIdAndUserIdAndObjectTypeID(): Hierarchy Control ID: 1
DEBUG [177]: [Function](): Viewing all users timesheet
DEBUG [302]: TTDate::parseDateTime(): String: 1188594000 Date Format: d-M-Y
DEBUG [395]: TTDate::parseDateTime(): NO Custom Parse Format detected!
DEBUG [398]: TTDate::parseDateTime(): Parsing Date: 1188594000
DEBUG [145]: Validator::isLength(): Value: Default Length: 7 Min: 1 Max: 100
DEBUG [145]: Validator::isLength(): Value: /TimeTrex/interface/timesheet/ViewUserTimeSheet.php Length: 51 Min: 1 Max: 250
DEBUG [739]: Factory::isValid(): Calling Validate()
DEBUG [722]: Factory::StartTransaction(): StartTransaction(): Transaction Count: 0 Trans Off: 0
DEBUG [768]: Factory::Save(): Calling preSave()
DEBUG [169]: UserGenericDataFactory::preSave(): Removing Default Flag From: 4
DEBUG [739]: Factory::isValid(): Calling Validate()
DEBUG [722]: Factory::StartTransaction(): StartTransaction(): Transaction Count: 1 Trans Off: 1
DEBUG [768]: Factory::Save(): Calling preSave()
DEBUG [739]: Factory::isValid(): Calling Validate()
DEBUG [811]: Factory::Save(): Updating...
DEBUG [636]: Factory::getUpdateQuery(): Update
DEBUG [354]: Validator::isDate(): Raw Date: 1194853847 Converted Value: 1194853847
DEBUG [667]: Factory::getUpdateQuery(): Data changed, set updated date:
DEBUG [732]: Factory::CommitTransaction(): CommitTransaction(): Transaction Count: 1 Trans Off: 2
DEBUG [739]: Factory::isValid(): Calling Validate()
DEBUG [811]: Factory::Save(): Updating...
DEBUG [636]: Factory::getUpdateQuery(): Update
DEBUG [354]: Validator::isDate(): Raw Date: 1194853847 Converted Value: 1194853847
DEBUG [667]: Factory::getUpdateQuery(): Data changed, set updated date:
DEBUG [732]: Factory::CommitTransaction(): CommitTransaction(): Transaction Count: 1 Trans Off: 1
DEBUG [273]: [Function](): bPay Period Lookup:
DEBUG [294]: [Function](): Pay Period ID: 31
DEBUG [306]: [Function](): Action:
DEBUG [48]: BreadCrumb::setCrumb(): Dropping Bread Crumb: My Timesheet URL: /TimeTrex/interface/timesheet/ViewUserTimeSheet.php?filter_data[group_ids]=-1&filter_data[branch_ids]=-1&filter_data[department_ids]=-1&filter_data[user_id]=1&filter_data[date]=1188594000&next_week=1
DEBUG [424]: [Function](): Default Action:
DEBUG [1109]: TTDate::getBeginWeekEpoch(): Epoch: 08-Sep-2007 12:00 AM Retval: 02-Sep-2007 12:00 AM Start Day of Week: 0 Offset: 6
DEBUG [1109]: TTDate::getBeginWeekEpoch(): Epoch: 08-Sep-2007 12:00 AM Retval: 02-Sep-2007 12:00 AM Start Day of Week: 0 Offset: 6
DEBUG [429]: [Function](): Start Date: 02-Sep-2007 12:00 AM End Date: 08-Sep-2007 11:59 PM
DEBUG [1280]: TTDate::getCalendarArray(): Start Day Of Week: 0
DEBUG [1282]: TTDate::getCalendarArray(): Raw Start Date: 02-Sep-2007 12:00 AM Raw End Date: 08-Sep-2007 11:59 PM
DEBUG [1109]: TTDate::getBeginWeekEpoch(): Epoch: 02-Sep-2007 12:00 AM Retval: 02-Sep-2007 12:00 AM Start Day of Week: 0 Offset: 0
DEBUG [1109]: TTDate::getBeginWeekEpoch(): Epoch: 08-Sep-2007 11:59 PM Retval: 02-Sep-2007 12:00 AM Start Day of Week: 0 Offset: 6
DEBUG [1293]: TTDate::getCalendarArray(): Cal Start Date: 02-Sep-2007 12:00 AM Cal End Date: 08-Sep-2007 11:59 PM
DEBUG [1358]: TTDate::getCalendarArray(): i: 1188680400 Date: 02-Sep-2007 12:00 AM
DEBUG [1358]: TTDate::getCalendarArray(): i: 1188766800 Date: 03-Sep-2007 12:00 AM
DEBUG [1358]: TTDate::getCalendarArray(): i: 1188853200 Date: 04-Sep-2007 12:00 AM
DEBUG [1358]: TTDate::getCalendarArray(): i: 1188939600 Date: 05-Sep-2007 12:00 AM
DEBUG [1358]: TTDate::getCalendarArray(): i: 1189026000 Date: 06-Sep-2007 12:00 AM
DEBUG [1358]: TTDate::getCalendarArray(): i: 1189112400 Date: 07-Sep-2007 12:00 AM
DEBUG [1358]: TTDate::getCalendarArray(): i: 1189198800 Date: 08-Sep-2007 12:00 AM
DEBUG [600]: [Function](): No Punch Count: 7 Max: 14
DEBUG [600]: [Function](): No Punch Count: 14 Max: 14
DEBUG [604]: [Function](): Stopping Loop at: 1
DEBUG [39]: TimeSheetFormatArrayByDate(): Group Array While Loop:
DEBUG [80]: TimeSheetFormatArrayByDate(): No Punch Count: 6 Max: 7
DEBUG [80]: TimeSheetFormatArrayByDate(): No Punch Count: 7 Max: 7
DEBUG [82]: TimeSheetFormatArrayByDate(): Stopping Loop at: 1
DEBUG [1289]: UserDateTotalListFactory::getWorkedTimeSumByUserIDAndPayPeriodId(): Total:
DEBUG [1250]: [Function](): Worked Total Time: 0
DEBUG [1369]: UserDateTotalListFactory::getPaidAbsenceTimeSumByUserIDAndPayPeriodId(): Total:
DEBUG [1253]: [Function](): Paid Absence Total Time:
DEBUG [1453]: UserDateTotalListFactory::getDockAbsenceTimeSumByUserIDAndPayPeriodId(): Total:
DEBUG [1256]: [Function](): Dock Absence Total Time:
DEBUG [1314]: [Function](): Pay Period Object Found!
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 35.2049 ms (5.99 %) Authentication::Check()
1 21.4050 ms (3.64 %) Interface.inc - Check for Exceptions
1 15.7881 ms (2.68 %) Interface.inc - Check for UNREAD messages...
10 11.1516 ms (1.90 %) getEmptyRecordSet()
1 6.5799 ms (1.12 %) getPermissionHierarchyChildrenByCompanyIdAndUserId
1 351.6097 ms (59.79 %) unprofiled

146.3258 ms (24.88 %) Missed
============================================================================
588.0649 ms (100.00 %) OVERALL TIME
============================================================================
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Do the pay period(s) for September still exist?

When do the punches that you can see start, is it on a pay period start date by chance?

Have you modified/deleted any pay periods at all lately?

Unfortunately if the user_date rows don't exist there isn't anything we can do, there is no way to know which punches belong to which employees.

Something has happened to your database, first more then one *_seq table becomes out of sync, now you are missing a bunch of punches.
vmp
Posts: 99
Joined: Wed Jun 20, 2007 3:41 am

Post by vmp »

Pay period for September still exists

The visible punches start on the 1st Oct.

We deleted unused pay periods.

The punch and related punch_control data is present.

As I understand the DB now, the user_data is inserted when a schedule is prepared for the users. let me know if this is right. I shall see whether I can someohow display the punches on the time sheet cause the created by information is present.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

How did you ensure that the pay periods you deleted were unused?

If you've modified pay period dates/times manually at all, without doing an "import" afterwards that could also cause issues like you are seeing here.

Do you have a backup that you can restore to get the data back? Thats probably your best bet at this point. Trying to manually re-create it is asking for even more problems.
vmp
Posts: 99
Joined: Wed Jun 20, 2007 3:41 am

Post by vmp »

No, we dont have a backup.

However, the pay_period that we deleted is still present in the DB flagged as deleted = 1
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Is the pay period that was deleted the one that would contain the missing punches?

If so, are the rows in the user_date table that are associated to that pay period?

select * from user_date where pay_period_id = <id of deleted pay period>
Locked