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
23df88df
Commit
23df88df
authored
Jan 23, 2014
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show selected timesheet
parent
4be46f9b
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
85 deletions
+87
-85
addedit.php
addedit.php
+75
-80
timesheet.class.php
timesheet.class.php
+12
-5
No files found.
addedit.php
View file @
23df88df
This diff is collapsed.
Click to expand it.
timesheet.class.php
View file @
23df88df
...
@@ -45,7 +45,6 @@ class CTimesheet extends w2p_Core_BaseObject {
...
@@ -45,7 +45,6 @@ class CTimesheet extends w2p_Core_BaseObject {
// the constructor of the CTimesheet class, always combined with the table name and the unique key of the table
// the constructor of the CTimesheet class, always combined with the table name and the unique key of the table
public
function
__construct
()
{
public
function
__construct
()
{
parent
::
__construct
(
'timesheet'
,
'timesheet_id'
);
parent
::
__construct
(
'timesheet'
,
'timesheet_id'
);
$this
->
timesheet_id
=
$_POST
[
"timesheet_id"
];
}
}
public
function
isValid
()
{
public
function
isValid
()
{
...
@@ -56,8 +55,16 @@ class CTimesheet extends w2p_Core_BaseObject {
...
@@ -56,8 +55,16 @@ class CTimesheet extends w2p_Core_BaseObject {
return
(
count
(
$this
->
_error
))
?
false
:
true
;
return
(
count
(
$this
->
_error
))
?
false
:
true
;
}
}
public
function
loadFull
()
{
public
function
loadFull
(
$notUsed
=
null
,
$timesheet_id
)
{
// loadFull information for this timesheet
// loadFull information for this timesheet\
}
public
function
load
(
$notUsed
=
null
,
$timesheet_id
)
{
$q
=
$this
->
_getQuery
();
$q
->
addQuery
(
'*'
);
$q
->
addTable
(
'timesheet'
);
$q
->
addWhere
(
'timesheet_id ='
.
(
int
)
$timesheet_id
);
$q
->
loadObject
(
$this
,
true
,
false
);
}
}
protected
function
init
()
{
protected
function
init
()
{
...
@@ -80,7 +87,7 @@ class CTimesheet extends w2p_Core_BaseObject {
...
@@ -80,7 +87,7 @@ class CTimesheet extends w2p_Core_BaseObject {
{
{
$q
=
$this
->
_getQuery
();
$q
=
$this
->
_getQuery
();
$q
->
setDelete
(
'timesheet_project'
);
$q
->
setDelete
(
'timesheet_project'
);
$q
->
addWhere
(
'timesheet_id = '
.
$this
->
timesheet_id
);
$q
->
addWhere
(
'timesheet_id = '
.
(
int
)
$this
->
timesheet_id
);
if
(
!
(
$q
->
exec
()))
{
if
(
!
(
$q
->
exec
()))
{
$this
->
_error
[
'project-purge-timesheet'
]
=
db_error
();
$this
->
_error
[
'project-purge-timesheet'
]
=
db_error
();
return
false
;
return
false
;
...
@@ -92,7 +99,7 @@ class CTimesheet extends w2p_Core_BaseObject {
...
@@ -92,7 +99,7 @@ class CTimesheet extends w2p_Core_BaseObject {
{
{
// Get the current timesheet period
// Get the current timesheet period
$period
=
new
w2p_UtilitiesDate
(
$_POST
[
'timesheet_period'
]);
$period
=
new
w2p_UtilitiesDate
(
$_POST
[
'timesheet_period'
]);
//
$period->setDate($_POST['timesheet_period'],DATE_FORMAT_UNIXTIME);
$period
->
setDate
(
$_POST
[
'timesheet_period'
],
DATE_FORMAT_UNIXTIME
);
$q
=
$this
->
_getQuery
();
$q
=
$this
->
_getQuery
();
$q
->
addQuery
(
'project_id'
);
$q
->
addQuery
(
'project_id'
);
...
...
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