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
e813f03e
Commit
e813f03e
authored
Dec 07, 2005
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed absences syntax error in SQL with "last 4 month"
parent
03d2a3ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
index.tcl
www/absences/index.tcl
+4
-4
No files found.
www/absences/index.tcl
View file @
e813f03e
...
...
@@ -128,16 +128,16 @@ if { ![empty_string_p $user_selection] } {
if
{
!
[
empty_string_p
$absence
_type_id
]
&&
$absence
_type_id != -1
}
{
#ns_set put
$bind
_vars absence_type_id
$absence
_type_id
lappend criteria
"a.absence_type
=
:absence_type_id"
lappend criteria
"a.absence_type
_id =
:absence_type_id"
}
switch
$timescale
{
"all"
{
}
"today"
{
lappend criteria
"a.start_date
= '
[
db_string get_today
"select sysdate from dual"
]
'
"
}
"next_1m"
{
lappend criteria
"a.start_date <
'
[
db_string get_next_month
"select add_months(sysdate,1) from dual"
]
' and a.start_date >= '
[
db_string get_today
"select sysdate from dual"
]
'
"
}
"today"
{
lappend criteria
"a.start_date
::date <= now()::date and a.end_date >= now()::date
"
}
"next_1m"
{
lappend criteria
"a.start_date <
now()::date + 30 and a.end_date >= now()::date
"
}
"past"
{
lappend criteria
"a.start_date < '
[
db_string get_today
"select sysdate from dual"
]
'"
}
"future"
{
lappend criteria
"a.start_date > '
[
db_string get_today
"select sysdate from dual"
]
'"
}
"last_3m"
{
lappend criteria
"a.start_date
> '
[
db_string get_3_months_ago
"select add_months(sysdate,-3) from dual"
]
' and a.start_date < '
[
db_string get_today
"select sysdate from dual"
]
'
"
}
"last_3m"
{
lappend criteria
"a.start_date
< now()::date and a.end_date >= now()::date - 120
"
}
}
set
order_by_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