Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2
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
1
Merge Requests
1
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
Commits
abd52e0b
Commit
abd52e0b
authored
Oct 13, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosine #5727: Added a custom hook for adding timesheet costs
parent
b80b9429
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
intranet-timesheet2-procs.tcl
tcl/intranet-timesheet2-procs.tcl
+9
-1
No files found.
tcl/intranet-timesheet2-procs.tcl
View file @
abd52e0b
...
@@ -126,8 +126,16 @@ ad_proc -public im_timesheet2_sync_timesheet_costs {
...
@@ -126,8 +126,16 @@ ad_proc -public im_timesheet2_sync_timesheet_costs {
create costs for new im_hours entries coming
create costs for new im_hours entries coming
from an external application
from an external application
}
{
}
{
ns_log Notice
"im_timesheet2_sync_timesheet_costs -user_id
$user
_id -project_id
$project
_id -julian_date
$julian
_date"
set sync_timesheet_costs
[
parameter::get_from_package_key -package_key intranet-timesheet2 -parameter SyncHoursP -default 1
]
set sync_timesheet_costs
[
parameter::get_from_package_key -package_key intranet-timesheet2 -parameter SyncHoursP -default 1
]
if
{
!$sync_timesheet_costs
}
{
return
}
if
{
"0"
eq
$sync
_timesheet_costs
}
{
return
}
if
{
"1"
ne
$sync
_timesheet_costs
}
{
# Use custom procedure to sync hours
ns_log Notice
"im_timesheet2_sync_timesheet_costs: custom sync procedure '
$sync
_timesheet_costs'"
set result
[
$sync
_timesheet_costs -user_id
$user
_id -project_id
$project
_id -julian_date
$julian
_date
]
ns_log Notice
"im_timesheet2_sync_timesheet_costs: custom sync:
$result
"
return
$result
}
set default_currency
[
im_parameter -package_id
[
im_package_cost_id
]
"DefaultCurrency"
""
"EUR"
]
set default_currency
[
im_parameter -package_id
[
im_package_cost_id
]
"DefaultCurrency"
""
"EUR"
]
set default_hourly_cost
[
parameter::get_from_package_key -package_key intranet-cost -parameter DefaultTimesheetHourlyCost -default 100
]
set default_hourly_cost
[
parameter::get_from_package_key -package_key intranet-cost -parameter DefaultTimesheetHourlyCost -default 100
]
...
...
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