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
web2project
timesheet
Commits
cf7cf8e1
Commit
cf7cf8e1
authored
Dec 09, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add humanreadible project status to the sheet.
parent
7739ed40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
addedit.php
addedit.php
+10
-7
No files found.
addedit.php
View file @
cf7cf8e1
...
@@ -48,7 +48,7 @@ if (!$obj->load( $timesheet_id, false ) && ($timesheet_id > 0) ) {
...
@@ -48,7 +48,7 @@ if (!$obj->load( $timesheet_id, false ) && ($timesheet_id > 0) ) {
// setup the title block
// setup the title block
// Fill the title block either with 'Edit' or with 'New' depending on
// Fill the title block either with 'Edit' or with 'New' depending on
// if timesheet_id has been transmitted via GET or is empty
// if timesheet_id has been transmitted via GET or is empty
$ttl
=
$timesheet_id
>
0
?
"Edit Timesheet"
:
"New Timesheet"
;
$ttl
=
(
$timesheet_id
>
0
)
?
"Edit Timesheet"
:
"New Timesheet"
;
$titleBlock
=
new
CTitleBlock
(
$ttl
,
'timesheet.png'
,
$m
,
"
$m
.
$a
"
);
$titleBlock
=
new
CTitleBlock
(
$ttl
,
'timesheet.png'
,
$m
,
"
$m
.
$a
"
);
$titleBlock
->
addCrumb
(
"?m=timesheet"
,
"view all timesheets"
);
$titleBlock
->
addCrumb
(
"?m=timesheet"
,
"view all timesheets"
);
if
(
$canDelete
&&
(
$timesheet_id
>
0
)
)
{
if
(
$canDelete
&&
(
$timesheet_id
>
0
)
)
{
...
@@ -276,10 +276,13 @@ else {
...
@@ -276,10 +276,13 @@ else {
</table>
</table>
<?php
<?php
// Get Project Status information.
$project_types
=
dPgetSysVal
(
"ProjectStatus"
);
// Find all tasks in this timesheet period and account them to the project.
// Find all tasks in this timesheet period and account them to the project.
function
showproject
()
function
showproject
()
{
{
global
$AppUI
,
$period
,
$obj
;
global
$AppUI
,
$period
,
$obj
,
$project_types
;
$q
=
new
DBQuery
();
$q
=
new
DBQuery
();
$q
->
addQuery
(
'project_id'
);
$q
->
addQuery
(
'project_id'
);
...
@@ -328,7 +331,7 @@ function showproject()
...
@@ -328,7 +331,7 @@ function showproject()
{
{
$taskDate
=
new
CDate
(
$logitem
[
'task_log_date'
]);
$taskDate
=
new
CDate
(
$logitem
[
'task_log_date'
]);
if
(
$period
->
GetMonth
()
==
$taskDate
->
GetMonth
())
{
if
(
$period
->
GetMonth
()
==
$taskDate
->
GetMonth
())
{
$amount
=
$amount
+
$logitem
[
"task_log_hours"
];
$amount
=
$amount
+
$logitem
[
'task_log_hours'
];
}
}
// else do not account the worked hours to the project for this month
// else do not account the worked hours to the project for this month
}
}
...
@@ -337,7 +340,7 @@ function showproject()
...
@@ -337,7 +340,7 @@ function showproject()
echo
$amount
;
echo
$amount
;
$timesheet_worked
=
$timesheet_worked
+
$amount
;
$timesheet_worked
=
$timesheet_worked
+
$amount
;
echo
'</td>'
;
echo
'</td>'
;
echo
'<td>'
.
$
row
[
"project_status"
]
.
'</td>'
;
echo
'<td>'
.
$
project_types
[
$row
[
'project_status'
]
]
.
'</td>'
;
echo
'</tr>'
;
echo
'</tr>'
;
}
}
$obj
->
timesheet_worked
=
$timesheet_worked
;
$obj
->
timesheet_worked
=
$timesheet_worked
;
...
@@ -345,7 +348,7 @@ function showproject()
...
@@ -345,7 +348,7 @@ function showproject()
function
showtimesheetproject
()
function
showtimesheetproject
()
{
{
global
$timesheet_id
;
global
$timesheet_id
,
$project_types
;
$q
=
new
DBQuery
();
$q
=
new
DBQuery
();
$q
->
addQuery
(
'timesheet_id'
);
$q
->
addQuery
(
'timesheet_id'
);
...
@@ -371,8 +374,8 @@ function showtimesheetproject()
...
@@ -371,8 +374,8 @@ function showtimesheetproject()
echo
'<td><a href="?m=projects&a=view&project_id='
.
$project
[
"project_id"
]
.
'">'
.
$project
[
"project_name"
]
.
'</a>'
;
echo
'<td><a href="?m=projects&a=view&project_id='
.
$project
[
"project_id"
]
.
'">'
.
$project
[
"project_name"
]
.
'</a>'
;
// echo '<td><a href="?m=projects&a=view&project_id=' . $row["timesheet_project"] . '">' . $project["project_name"] . '</a>';
// echo '<td><a href="?m=projects&a=view&project_id=' . $row["timesheet_project"] . '">' . $project["project_name"] . '</a>';
echo
'</td>'
;
echo
'</td>'
;
echo
'<td>'
.
$row
[
"timesheet_project_amount"
]
.
'</td>'
;
echo
'<td>'
.
$row
[
'timesheet_project_amount'
]
.
'</td>'
;
echo
'<td>'
.
$project
[
"project_status"
]
.
'</td>'
;
echo
'<td>'
.
$project
_types
[
$project
[
'project_status'
]
]
.
'</td>'
;
echo
'</tr>'
;
echo
'</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