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
370978e4
Commit
370978e4
authored
Sep 07, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show total amount of hours worked in timesheet details.
parent
15ee5557
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
addedit.php
addedit.php
+12
-11
No files found.
addedit.php
View file @
370978e4
...
@@ -136,11 +136,11 @@ if (intval($obj->timesheet_period)) {
...
@@ -136,11 +136,11 @@ if (intval($obj->timesheet_period)) {
}
}
// Get the current timesheet status
// Get the current timesheet status
$status
=
0
;
if
(
intval
(
$obj
->
timesheet_status
))
if
(
intval
(
$obj
->
timesheet_status
))
$status
=
$obj
->
timesheet_status
;
$status
=
$obj
->
timesheet_status
;
else
{
else
{
$status
=
0
;
$obj
->
timesheet_status
=
$status
;
$obj
->
timesheet_status
=
0
;
}
}
// Get the current timesheet creation date
// Get the current timesheet creation date
...
@@ -263,8 +263,10 @@ if (intval($obj->timesheet_worked)) {
...
@@ -263,8 +263,10 @@ if (intval($obj->timesheet_worked)) {
echo
'<td align="right" nowrap="nowarp">'
.
$AppUI
->
_
(
'Status'
)
.
': </td>'
;
echo
'<td align="right" nowrap="nowarp">'
.
$AppUI
->
_
(
'Status'
)
.
': </td>'
;
echo
'<td width="100%" align="right"">'
;
echo
'<td width="100%" align="right"">'
;
if
(
(
$canEdit
)
&&
((
$status
==
0
)
||
echo
'STATUS: '
.
$status
;
(
$config_options
[
'approval_by'
][
'value'
]
==
$AppUI
->
user_id
))
)
{
if
(
(
$canEdit
)
&&
(
$config_options
[
'approval_by'
][
'value'
]
==
$AppUI
->
user_id
)
)
{
echo
'<select name="timesheet_status" size="1" class="text" onChange="changeIt()">'
;
echo
'<select name="timesheet_status" size="1" class="text" onChange="changeIt()">'
;
echo
'<option '
;
if
(
$status
==
0
)
echo
"selected"
;
echo
'value="0">'
.
dPformSafe
(
'Open for Editing'
)
.
'</option>'
;
echo
'<option '
;
if
(
$status
==
0
)
echo
"selected"
;
echo
'value="0">'
.
dPformSafe
(
'Open for Editing'
)
.
'</option>'
;
echo
'<option '
;
if
(
$status
==
1
)
echo
"selected"
;
echo
'value="1">'
.
dPformSafe
(
'Submitted'
)
.
'</option>'
;
echo
'<option '
;
if
(
$status
==
1
)
echo
"selected"
;
echo
'value="1">'
.
dPformSafe
(
'Submitted'
)
.
'</option>'
;
...
@@ -367,17 +369,16 @@ function showproject()
...
@@ -367,17 +369,16 @@ function showproject()
if
(
$amount
>
0
)
{
if
(
$amount
>
0
)
{
echo
'<tr>'
;
echo
'<tr>'
;
echo
'<td> </td>'
;
echo
'<td> </td>'
;
echo
'<td><a href="?m=projects&a=view&project_id='
.
$row
[
"project_id"
]
.
'">'
.
$row
[
"project_name"
]
.
'</a>'
;
echo
'<td><a href="?m=projects&a=view&project_id='
.
$row
[
"project_id"
]
.
'">'
.
$row
[
"project_name"
]
.
'</a></td>'
;
echo
'</td>'
;
echo
'<td> </td>'
;
echo
'<td>'
;
echo
'<td>'
.
$amount
.
'</td>'
;
echo
$amount
;
$timesheet_worked
=
$timesheet_worked
+
$amount
;
$timesheet_worked
=
$timesheet_worked
+
$amount
;
echo
'</td>'
;
echo
'<td>'
.
$project_types
[
$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
;
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
()
function
showtimesheetproject
()
...
@@ -410,8 +411,7 @@ function showtimesheetproject()
...
@@ -410,8 +411,7 @@ function showtimesheetproject()
{
{
echo
'<tr>'
;
echo
'<tr>'
;
echo
'<td> </td>'
;
echo
'<td> </td>'
;
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></td>'
;
echo
'</td>'
;
echo
'<td>'
.
$row
[
'timesheet_project_amount'
]
.
'</td>'
;
echo
'<td>'
.
$row
[
'timesheet_project_amount'
]
.
'</td>'
;
echo
'<td>'
.
$project_types
[
$project
[
'project_status'
]]
.
'</td>'
;
echo
'<td>'
.
$project_types
[
$project
[
'project_status'
]]
.
'</td>'
;
echo
'</tr>'
;
echo
'</tr>'
;
...
@@ -425,6 +425,7 @@ function showtimesheetproject()
...
@@ -425,6 +425,7 @@ function showtimesheetproject()
echo
'<tr>'
;
echo
'<tr>'
;
echo
'<th nowrap="nowrap"> </th>'
;
echo
'<th nowrap="nowrap"> </th>'
;
echo
'<th nowrap="nowrap">'
.
$AppUI
->
_
(
'Project'
)
.
'</th>'
;
echo
'<th nowrap="nowrap">'
.
$AppUI
->
_
(
'Project'
)
.
'</th>'
;
echo
'<th nowrap="nowrap">'
.
$AppUI
->
_
(
'Customer'
)
.
'</th>'
;
echo
'<th nowrap="nowrap">'
.
$AppUI
->
_
(
'Worked hours'
)
.
'</th>'
;
echo
'<th nowrap="nowrap">'
.
$AppUI
->
_
(
'Worked hours'
)
.
'</th>'
;
echo
'<th nowrap="nowrap">'
.
$AppUI
->
_
(
'Project status'
)
.
'</th>'
;
echo
'<th nowrap="nowrap">'
.
$AppUI
->
_
(
'Project status'
)
.
'</th>'
;
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