Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-invoices
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-timesheet2-invoices
Commits
68eced71
Commit
68eced71
authored
May 25, 2007
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- improved drop-down box
- implemented im_sub_category
parent
20e77891
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
47 deletions
+4
-47
new.tcl
www/invoices/new.tcl
+4
-47
No files found.
www/invoices/new.tcl
View file @
68eced71
...
...
@@ -102,17 +102,6 @@ if {"" == $target_cost_type_id} {
set target_cost_type_id
[
im_cost_type_invoice
]
}
# Determine the default status if not set
if
{
[
empty_string_p
$project
_status_id
]
}
{
if
{
$target
_cost_type_id ==
[
im_cost_type_quote
]}
{
set project_status_id
[
im_project_status_potential
]
}
else
{
set project_status_id
[
im_project_status_delivered
]
}
}
if
{
[
empty_string_p
$how
_many
]
||
$how
_many < 1
}
{
set how_many
[
ad_parameter -package_id
[
im_package_core_id
]
NumberResultsPerPage
""
50
]
}
...
...
@@ -163,49 +152,17 @@ db_foreach column_list_sql $column_sql {
# ---------------------------------------------------------------
# 4. Define Filter Categories
# ---------------------------------------------------------------
# status_types will be a list of pairs of (project_status_id, project_status
)
set
status_types
[
im_memoize_list select_project_status_types
\
"select project_status_id, project_status
from im_project_status
order by lower(project_status)"
]
set
status_types
[
linsert
$status
_types 0 0 All
]
# project_types will be a list of pairs of (project_type_id, project_type
)
set
project_types
[
im_memoize_list select_project_types
\
"select project_type_id, project_type
from im_project_types
order by lower(project_type)"
]
set
project_types
[
linsert
$project
_types 0 0 All
]
# ---------------------------------------------------------------
# 5. Generate SQL Query
# ---------------------------------------------------------------
set
criteria
[
list
]
if
{
!
[
empty_string_p
$project
_status_id
]
&&
$project
_status_id > 0
}
{
lappend criteria
"p.project_status_id in (
select :project_status_id from dual
UNION
select child_id
from im_category_hierarchy
where parent_id = :project_status_id
)"
lappend criteria
"p.project_status_id in (
[
join
[
im_sub_categories
$project
_status_id
]
","
]
)"
}
if
{
!
[
empty_string_p
$project
_type_id
]
&&
$project
_type_id != 0
}
{
# Select the specified project type and its subtypes
lappend criteria
"p.project_type_id in (
select :project_type_id from dual
UNION
select child_id
from im_category_hierarchy
where parent_id = :project_type_id
)
"
llappend criteria
"p.project_type_id in (
[
join
[
im_sub_categories
$project
_type_id
]
","
]
)"
}
...
...
@@ -338,12 +295,12 @@ set filter_html "
</tr>
<tr>
<td valign=top>
[
_ intranet-timesheet2-invoices.Project_Status
]
:</td>
<td valign=top>
[
im_
select project_status_id
$status
_types
$project
_status_id
]
</td>
<td valign=top>
[
im_
category_select -include_empty_p 1
"Intranet Project Status"
project_status_id
$project
_status_id
]
</td>
</tr>
<tr>
<td valign=top>
[
_ intranet-timesheet2-invoices.Project_Type
]
:</td>
<td valign=top>
[
im_
select project_type_id
$project
_types
$project
_type_id
]
[
im_
category_select -include_empty_p 1
"Intranet Project Type"
project_type_id
$project
_type_id
]
<input type=submit value=Go name=submit>
</td>
</tr>
...
...
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