Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting
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-reporting
Commits
1173b5cd
Commit
1173b5cd
authored
Mar 07, 2024
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added number formatting and right alingment
parent
d45ddde8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
timesheet-customer-project.tcl
www/timesheet-customer-project.tcl
+21
-9
No files found.
www/timesheet-customer-project.tcl
View file @
1173b5cd
...
...
@@ -19,6 +19,7 @@ ad_page_contract {
{
level_of_detail 2
}
{
truncate_note_length 4000
}
{
output_format
"html"
}
{
number_locale
""
}
{
project_id:integer 0
}
{
task_id:integer 0
}
{
company_id:integer 0
}
...
...
@@ -71,15 +72,17 @@ set edit_timesheet_p [im_permission $current_user_id "add_hours_all"]
if
{[
im_permission
$current
_user_id
"edit_hours_all"
]}
{
set
edit_timesheet_p 1
}
set
view_hours_all_p
[
im_permission
$current
_user_id
"view_hours_all"
]
if
{
!$view_hours_all_p
}
{
set user_id
$current
_user_id
}
set
locale
[
lang::user::locale
]
if
{
""
==
$number
_locale
}
{
set number_locale
$locale
}
# If project_id and task_id are set and equal, exclude task_id from sql
if
{
0 !=
$task
_id &&
""
!=
$task
_id && 0 !=
$project
_id &&
""
!=
$project
_id &&
$project
_id ==
$task
_id
}
{
set task_id 0
}
# ------------------------------------------------------------
# Constants
...
...
@@ -330,7 +333,7 @@ set report_def [list \
$sub
_project_nr
$user
_initials
"<nobr>
$date
_pretty</nobr>"
$hours
_link
"#align=right
$hours
_link"
"<nobr>
$note
</nobr>"
}
\
content
{}
\
...
...
@@ -341,7 +344,7 @@ set report_def [list \
$sub
_project_nr
$user
_initials
""
"<i>
$hours
_user_subtotal</i>"
"
#align=right
<i>
$hours
_user_subtotal</i>"
""
}
\
]
\
...
...
@@ -351,7 +354,7 @@ set report_def [list \
$sub
_project_nr
""
""
"<i>
$hours
_project_sub_subtotal</i>"
"
#align=right
<i>
$hours
_project_sub_subtotal</i>"
""
}
\
]
\
...
...
@@ -546,6 +549,11 @@ switch $output_format {
[
im_report_output_format_select output_format
""
$output
_format
]
</td>
</tr>
<tr>
<td class=form-label>
[
lang::message::lookup
""
intranet-reporting.Number_Format
"Number Format"
]
</td>
<td>
[
im_report_number_locale_select number_locale
$number
_locale
]
</td>
</td>
</tr>
<tr>
<td class=form-label></td>
<td class=form-widget><input type=submit value='
[
lang::message::lookup
""
acs-kernel.common_Submit
"Submit"
]
'></td>
...
...
@@ -610,9 +618,13 @@ db_foreach sql $sql {
if
{[
string
length
$note
]
>
$truncate
_note_length
}
{
set note
"
[
string
range
$note
0
$truncate
_note_length
]
..."
}
set hours_link
$hours
set hours_formatted
[
im_report_format_number
$hours
$output
_format
$number
_locale
]
set hours_formatted
$hours
# !!!
set hours_link
$hours
_formatted
if
{
$edit
_timesheet_p
}
{
set hours_link
" <a href=
\"
[
export_vars -base
$hours
_url
{
julian_date user_id
{
project_id
$sub
_project_id
}
{
return_url
$this
_url
}}]
\"
>
$hours
</a>
\n
"
set hours_link
" <a href=
\"
[
export_vars -base
$hours
_url
{
julian_date user_id
{
project_id
$sub
_project_id
}
{
return_url
$this
_url
}}]
\"
>
$hours
_formatted
</a>
\n
"
}
im_report_display_footer
\
...
...
@@ -625,9 +637,9 @@ db_foreach sql $sql {
-cell_class
$class
im_report_update_counters -counters
$counters
set hours_user_subtotal
[
expr
{
round
(
100.0 *
$hours
_user_subtotal
)
/ 100.0
}
]
set hours_project_sub_subtotal
[
expr
{
round
(
100.0 *
$hours
_project_sub_subtotal
)
/ 100.0
}
]
set hours_project_subtotal
[
expr
{
round
(
100.0 *
$hours
_project_subtotal
)
/ 100.0
}
]
set hours_user_subtotal
[
im_report_format_number
[
expr
{
round
(
100.0 *
$hours
_user_subtotal
)
/ 100.0
}]
$output
_format
$number
_locale
]
set hours_project_sub_subtotal
[
im_report_format_number
[
expr
{
round
(
100.0 *
$hours
_project_sub_subtotal
)
/ 100.0
}]
$output
_format
$number
_locale
]
set hours_project_subtotal
[
im_report_format_number
[
expr
{
round
(
100.0 *
$hours
_project_subtotal
)
/ 100.0
}]
$output
_format
$number
_locale
]
set last_value_list
[
im_report_render_header
\
-output_format
$output
_format
\
...
...
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