Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-workflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-timesheet2-workflow
Commits
bcea1eba
Commit
bcea1eba
authored
Jan 16, 2008
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- reorganized timesheet /hours/new-2 page to work as a "synchronizer"
between the "screen" and the "database" hours
parent
12073825
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
intranet-timesheet2-workflow-procs.tcl
tcl/intranet-timesheet2-workflow-procs.tcl
+72
-0
No files found.
tcl/intranet-timesheet2-workflow-procs.tcl
View file @
bcea1eba
...
...
@@ -220,6 +220,78 @@ ad_proc -public im_timesheet_conf_object_new {
}
ad_proc -public im_timesheet_conf_object_delete
{
-project_id
-user_id
-day_julian
}
{
Delete a confirmation object for the specified
(
main-
)
project
that covers the specified day.
}
{
# Check for ConfirmationObjects matching the conditions
set conf_ids
[
db_list main_pids
"
select distinct
c.conf_id
from
im_hours h,
im_projects p,
im_projects main_p,
im_timesheet_conf_objects c
where
h.day = to_date(:day_julian, 'J') and
h.user_id = :user_id and
h.project_id = :project_id and
h.project_id = p.project_id and
tree_ancestor_key(p.tree_sortkey, 1) = main_p.tree_sortkey and
c.conf_project_id = main_p.project_id and
c.conf_user_id = :user_id and
to_date(:day_julian, 'J') between c.start_date and c.end_date
"
]
# Delete the conf_objects
set ctr 0
foreach conf_id
$conf
_ids
{
db_string conf_delete
"select im_timesheet_conf_object__delete(:conf_id)"
incr ctr
}
return
$ctr
}
ad_proc -public im_timesheet_costs_delete
{
-project_id
-user_id
-day_julian
}
{
Delete any cost items related to hours logged for the specified project
and day.
}
{
set del_cost_ids
[
db_list del_cost_ids
"
select h.cost_id
from im_hours h
where h.project_id = :project_id
and h.user_id = :user_id
and h.day = to_date(:day_julian, 'J')
"
]
set ctr 0
foreach cost_id
$del
_cost_ids
{
db_dml update_hours
"
update im_hours
set cost_id = null
where cost_id = :cost_id
"
db_string del_ts_costs
"select im_cost__delete(:cost_id)"
incr ctr
}
return
$ctr
}
# ---------------------------------------------------------------------
# Absence Workflow Permissions
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment