Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting-finance
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-finance
Commits
4d831fa9
Commit
4d831fa9
authored
Apr 03, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added filter for profit centers
parent
f31776ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
finance-costs-monthly.adp
www/finance-costs-monthly.adp
+6
-0
finance-costs-monthly.tcl
www/finance-costs-monthly.tcl
+7
-6
No files found.
www/finance-costs-monthly.adp
View file @
4d831fa9
...
...
@@ -26,6 +26,12 @@
<input type=textfield 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>Minimum Turnover</td>
<td class=form-widget>
...
...
www/finance-costs-monthly.tcl
View file @
4d831fa9
...
...
@@ -14,6 +14,7 @@ ad_page_contract {
}
{
{
start_date
""
}
{
end_date
""
}
{
report_cost_center_id
""
}
{
output_format
"html"
}
{
project_id:integer 0
}
{
prov_id:integer 0
}
...
...
@@ -114,16 +115,15 @@ set current_url [im_url_with_query]
# ------------------------------------------------------------
set
criteria
[
list
]
if
{
""
!=
$project
_id && 0 !=
$project
_id
}
{
lappend criteria
"p.project_id = :project_id"
}
if
{
""
!=
$prov
_id && 0 !=
$prov
_id
}
{
lappend criteria
"p.company_id = :prov_id"
if
{
""
!=
$project
_id && 0 !=
$project
_id
}
{
lappend criteria
"c.project_id = :project_id"
}
if
{
""
!=
$prov
_id && 0 !=
$prov
_id
}
{
lappend criteria
"c.provider_id = :prov_id"
}
if
{
""
ne
$report
_cost_center_id && 0 ne
$report
_cost_center_id
}
{
lappend criteria
"c.cost_center_id in (
[
join
[
im_sub_cost_center_ids
$report
_cost_center_id
]
", "
]
)"
}
set
where_clause
[
join
$criteria
"
\n\t
and "
]
if
{
""
!=
$where
_clause
}
{
set where_clause
"and
$where
_clause"
}
set
sql
"
select c.cost_id,
c.cost_name,
...
...
@@ -148,6 +148,7 @@ set sql "
and c.effective_date >= to_date(:start_date, 'YYYY-MM-DD')
and c.effective_date < to_date(:end_date, 'YYYY-MM-DD')
and c.effective_date::date < to_date(:end_date, 'YYYY-MM-DD')
$where
_clause
"
# ------------------------------------------------------------
...
...
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