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
8f58728b
Commit
8f58728b
authored
Mar 31, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added cost center filter from cosine
parent
3fb6bae2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
budget-main-projects.tcl
www/budget-main-projects.tcl
+22
-1
No files found.
www/budget-main-projects.tcl
View file @
8f58728b
...
...
@@ -16,11 +16,11 @@ ad_page_contract {
}
{
{
start_date
"2011-01-01"
}
{
end_date
"2099-12-31"
}
{
report_cost_center_id:integer
""
}
{
level_of_detail:integer 3
}
{
customer_id:integer 0
}
{
output_format
"html"
}
{
number_locale
""
}
}
...
...
@@ -165,6 +165,22 @@ set levels {3 "Customers + Projects"}
# ------------------------------------------------------------
# Conditional SQL Where-Clause
#
set
criteria
[
list
]
if
{
""
ne
$report
_cost_center_id && 0 ne
$report
_cost_center_id
}
{
lappend criteria
"p.project_cost_center_id in (
[
join
[
im_sub_cost_center_ids
$report
_cost_center_id
]
", "
]
)"
}
set
where_clause
[
join
$criteria
" and
\n
"
]
if
{
!
[
empty_string_p
$where
_clause
]}
{
set where_clause
" and
$where
_clause"
}
# ------------------------------------------------------------
# Report SQL - This SQL statement defines the raw data
# that are to be shown.
...
...
@@ -225,6 +241,7 @@ set report_sql "
and (p.project_budget is not NULL OR p.project_budget_hours is not NULL)
and p.end_date >= :start_date::timestamptz
and p.start_date < :end_date::timestamptz
$where
_clause
) p
order by
lower(customer_name),
...
...
@@ -374,6 +391,10 @@ switch $output_format {
<td>End Date:</td>
<td><input type=text name=end_date value='
$end
_date'></td>
</tr>
<tr>
<td>
[
lang::message::lookup
""
intranet-cost.Profit_Center
"Profit Center"
]
:</td>
<td>
[
im_cost_center_select -include_empty 1 -include_empty_name
"All"
report_cost_center_id
$report
_cost_center_id
]
</td>
</tr>
<tr>
<td class=form-label>Format</td>
<td class=form-widget>
...
...
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