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
48560b59
Commit
48560b59
authored
Nov 27, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed rounding, only showing current user
parent
c9878a02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
index.tcl
www/hours/index.tcl
+9
-7
No files found.
www/hours/index.tcl
View file @
48560b59
...
...
@@ -167,9 +167,6 @@ if {![im_column_exists im_hours conf_object_id]} { set confirm_timesheet_hours_p
# ---------------------------------------------------------------
# Attendance Management
# ---------------------------------------------------------------
...
...
@@ -182,8 +179,9 @@ if {$attendance_management_installed_p} {
im_category_from_id
(
ai.attendance_type_id
)
as type,
round
((
extract
(
epoch from attendance_end - attendance_start
)
/ 3600
)
::numeric, 2
)
as duration_hours
from im_attendance_intervals ai
where ai.attendance_start::date >= :first_day_of_month_ansi::date and
ai.attendance_id is not null and -- discard elements in process
where ai.attendance_user_id = :current_user_id and
ai.attendance_start::date >= :first_day_of_month_ansi::date and
ai.attendance_id is not null and -- discard elements in process of completing
ai.attendance_end::date <= :last_day_of_month_ansi::date
"
...
...
@@ -424,9 +422,13 @@ for { set current_date $first_julian_date} { $current_date <= $last_julian_date
# Attendance Management
if {
$attendance
_management_installed_p} {
set work ""
if {
[
info
exists att_work_hash
(
$current
_date
)]
} { set work
$att
_work_hash(
$current
_date) }
if {
[
info
exists att_work_hash
(
$current
_date
)]
} {
set work
[
expr
round
(
10.0 *
$att
_work_hash
(
$current
_date
))
/ 10.0
]
}
set break ""
if {
[
info
exists att_break_hash
(
$current
_date
)]
} { set work
$att
_break_hash(
$current
_date) }
if {
[
info
exists att_break_hash
(
$current
_date
)]
} {
set work
[
expr
round
(
10.0 *
$att
_break_hash
(
$current
_date
))
/ 10.0
]
}
set line_items
[
list
]
if {"" ne
$work
} { lappend line_items "
Work:
${work}
h
" }
...
...
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