Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
timesheet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dotproject
timesheet
Commits
05bf8f64
Commit
05bf8f64
authored
Sep 07, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless showtimesheetproject() function. It was broken anyway.
parent
370978e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
47 deletions
+2
-47
addedit.php
addedit.php
+2
-47
No files found.
addedit.php
View file @
05bf8f64
...
@@ -381,45 +381,6 @@ function showproject()
...
@@ -381,45 +381,6 @@ function showproject()
echo
'<tr><td> </td><td> </td><td><b>'
.
dPformSafe
(
'Total'
)
.
'</b></td><td><b>'
.
$timesheet_worked
.
'</b></td><td> </td></tr>'
;
echo
'<tr><td> </td><td> </td><td><b>'
.
dPformSafe
(
'Total'
)
.
'</b></td><td><b>'
.
$timesheet_worked
.
'</b></td><td> </td></tr>'
;
}
// end of function showproject()
}
// end of function showproject()
function
showtimesheetproject
()
{
global
$timesheet_id
,
$project_types
;
// FIXME: There is a bug in this function. It doesn't take current timesheet into account
// as well as it should. Some hours from other periods maybe accounted on this project, while
// we only want to see the time worked in this period.
$q
=
new
DBQuery
();
$q
->
addQuery
(
'timesheet_id'
);
$q
->
addQuery
(
'timesheet_project'
);
$q
->
addQuery
(
'timesheet_project_amount'
);
$q
->
addTable
(
'timesheet_project'
);
$q
->
addWhere
(
'timesheet_id = '
.
$timesheet_id
);
$q
->
addOrder
(
'timesheet_project ASC'
);
$timesheet
=
$q
->
LoadList
();
foreach
(
$timesheet
as
$row
)
{
$p
=
new
DBQuery
();
$p
->
addQuery
(
'project_id'
);
$p
->
addQuery
(
'project_name'
);
$p
->
addQuery
(
'project_status'
);
$p
->
addTable
(
'projects'
);
$p
->
addWhere
(
'project_id = '
.
$row
[
"timesheet_project"
]);
$p
->
addOrder
(
'project_name ASC'
);
$projects
=
$p
->
LoadList
();
foreach
(
$projects
as
$project
)
{
if
(
intval
(
$row
[
'timesheet_project_amount'
]
)
>
0
)
{
echo
'<tr>'
;
echo
'<td> </td>'
;
echo
'<td><a href="?m=projects&a=view&project_id='
.
$project
[
"project_id"
]
.
'">'
.
$project
[
"project_name"
]
.
'</a></td>'
;
echo
'<td>'
.
$row
[
'timesheet_project_amount'
]
.
'</td>'
;
echo
'<td>'
.
$project_types
[
$project
[
'project_status'
]]
.
'</td>'
;
echo
'</tr>'
;
}
}
}
}
// end of function showtimesheetproject()
// Print the overview table
// Print the overview table
echo
'<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">'
;
echo
'<table width="100%" border="0" cellpadding="2" cellspacing="1" class="tbl">'
;
echo
'<tr>'
;
echo
'<tr>'
;
...
@@ -439,14 +400,8 @@ function showtimesheetproject()
...
@@ -439,14 +400,8 @@ function showtimesheetproject()
echo
'<input type="hidden" name="timesheet_creator" value="'
.
$obj
->
timesheet_creator
.
'" />'
;
echo
'<input type="hidden" name="timesheet_creator" value="'
.
$obj
->
timesheet_creator
.
'" />'
;
echo
'<input type="hidden" name="timesheet_worked" value="'
.
$obj
->
timesheet_worked
.
'" />'
;
echo
'<input type="hidden" name="timesheet_worked" value="'
.
$obj
->
timesheet_worked
.
'" />'
;
if
(
$status
==
0
)
showproject
();
else
// FIXME: Workaround for problem in showtimesheetproject(); function. Now all hours worked are
// recalculated from the projects table, while you actually would like to see the hours as
// submitted/approved by users and manager.
showproject
();
showproject
();
//showtimesheetproject();
echo
'<script language="javascript">workedHoursChange('
.
$obj
->
timesheet_worked
.
');</script>'
;
echo
'<script language="javascript">workedHoursChange('
.
$obj
->
timesheet_worked
.
');</script>'
;
echo
"</form>"
;
echo
"</form>"
;
echo
"</table>"
;
echo
"</table>"
;
...
...
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