Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
3ab1c569
Commit
3ab1c569
authored
15 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: project id is lost
parent
c17d4059
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/fichinter/fiche.php
+8
-8
8 additions, 8 deletions
htdocs/fichinter/fiche.php
htdocs/fichinter/fichinter.class.php
+7
-8
7 additions, 8 deletions
htdocs/fichinter/fichinter.class.php
with
15 additions
and
16 deletions
htdocs/fichinter/fiche.php
+
8
−
8
View file @
3ab1c569
<?php
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-200
9
Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-20
1
0 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -138,7 +138,7 @@ if ($_POST["action"] == 'add')
$fichinter
->
socid
=
$_POST
[
"socid"
];
$fichinter
->
duree
=
$_POST
[
"duree"
];
$fichinter
->
projet_id
=
$_POST
[
"projetid
p
"
];
$fichinter
->
proje
c
t_id
=
$_POST
[
"proje
c
tid"
];
$fichinter
->
author
=
$user
->
id
;
$fichinter
->
description
=
$_POST
[
"description"
];
$fichinter
->
ref
=
$_POST
[
"ref"
];
...
...
@@ -170,7 +170,7 @@ if ($_POST["action"] == 'update')
$fichinter
=
new
Fichinter
(
$db
);
$fichinter
->
socid
=
$_POST
[
"socid"
];
$fichinter
->
projet_id
=
$_POST
[
"projetid
p
"
];
$fichinter
->
proje
c
t_id
=
$_POST
[
"proje
c
tid"
];
$fichinter
->
author
=
$user
->
id
;
$fichinter
->
description
=
$_POST
[
"description"
];
$fichinter
->
ref
=
$_POST
[
"ref"
];
...
...
@@ -212,7 +212,7 @@ if ($_POST['action'] == 'classin')
{
$fichinter
=
new
Fichinter
(
$db
);
$fichinter
->
fetch
(
$_GET
[
'id'
]);
$result
=
$fichinter
->
setProject
(
$_POST
[
'projetid'
]);
$result
=
$fichinter
->
setProject
(
$_POST
[
'proje
c
tid'
]);
if
(
$result
<
0
)
dol_print_error
(
$db
,
$fichinter
->
error
);
}
...
...
@@ -453,7 +453,7 @@ if ($_GET["action"] == 'create')
$langs
->
load
(
"project"
);
print
'<tr><td valign="top">'
.
$langs
->
trans
(
"Project"
)
.
'</td><td>'
;
$numprojet
=
select_projects
(
$societe
->
id
,
$projetid
,
'projetid
p
'
);
$numprojet
=
select_projects
(
$societe
->
id
,
$
_POST
[
"
proje
c
tid
"
]
,
'proje
c
tid'
);
if
(
$numprojet
==
0
)
{
print
' <a href="../projet/fiche.php?socid='
.
$societe
->
id
.
'&action=create">'
.
$langs
->
trans
(
"AddProject"
)
.
'</a>'
;
...
...
@@ -573,11 +573,11 @@ elseif ($fichinterid)
print
'</td><td colspan="3">'
;
if
(
$_GET
[
'action'
]
==
'classin'
)
{
$html
->
form_project
(
$_SERVER
[
'PHP_SELF'
]
.
'?id='
.
$fichinter
->
id
,
$fichinter
->
socid
,
$fichinter
->
proje
t
id
p
,
'projetid'
);
$html
->
form_project
(
$_SERVER
[
'PHP_SELF'
]
.
'?id='
.
$fichinter
->
id
,
$fichinter
->
socid
,
$fichinter
->
proje
ct_
id
,
'projetid'
);
}
else
{
$html
->
form_project
(
$_SERVER
[
'PHP_SELF'
]
.
'?id='
.
$fichinter
->
id
,
$fichinter
->
socid
,
$fichinter
->
proje
t
id
p
,
'none'
);
$html
->
form_project
(
$_SERVER
[
'PHP_SELF'
]
.
'?id='
.
$fichinter
->
id
,
$fichinter
->
socid
,
$fichinter
->
proje
ct_
id
,
'none'
);
}
print
'</td>'
;
print
'</tr>'
;
...
...
@@ -622,12 +622,12 @@ elseif ($fichinterid)
/*
* Lignes d'intervention
*/
$sql
=
'SELECT ft.rowid, ft.description, ft.fk_fichinter, ft.duree, ft.rang'
;
$sql
.
=
', '
.
$db
->
pdate
(
'ft.date'
)
.
' as date_intervention'
;
$sql
.
=
' FROM '
.
MAIN_DB_PREFIX
.
'fichinterdet as ft'
;
$sql
.
=
' WHERE ft.fk_fichinter = '
.
$fichinterid
;
$sql
.
=
' ORDER BY ft.rang ASC, ft.rowid'
;
$resql
=
$db
->
query
(
$sql
);
if
(
$resql
)
{
...
...
This diff is collapsed.
Click to expand it.
htdocs/fichinter/fichinter.class.php
+
7
−
8
View file @
3ab1c569
<?php
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-200
9
Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-20
1
0 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -54,7 +54,7 @@ class Fichinter extends CommonObject
var
$description
;
var
$note_private
;
var
$note_public
;
var
$projet_id
;
var
$proje
c
t_id
;
var
$modelpdf
;
var
$lignes
=
array
();
...
...
@@ -122,7 +122,7 @@ class Fichinter extends CommonObject
$sql
.
=
", "
.
$this
->
author
;
$sql
.
=
", '"
.
addslashes
(
$this
->
description
)
.
"'"
;
$sql
.
=
", '"
.
$this
->
modelpdf
.
"'"
;
$sql
.
=
", "
.
(
$this
->
projet_id
?
$this
->
projet_id
:
0
);
$sql
.
=
", "
.
(
$this
->
proje
c
t_id
?
$this
->
proje
c
t_id
:
0
);
$sql
.
=
")"
;
dol_syslog
(
"Fichinter::create sql="
.
$sql
);
...
...
@@ -152,9 +152,9 @@ class Fichinter extends CommonObject
global
$conf
;
if
(
!
is_numeric
(
$this
->
duree
))
{
$this
->
duree
=
0
;
}
if
(
!
strlen
(
$this
->
projet_id
))
if
(
!
strlen
(
$this
->
proje
c
t_id
))
{
$this
->
projet_id
=
0
;
$this
->
proje
c
t_id
=
0
;
}
/*
...
...
@@ -163,7 +163,7 @@ class Fichinter extends CommonObject
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"fichinter SET "
;
$sql
.
=
", description = '"
.
addslashes
(
$this
->
description
)
.
"'"
;
$sql
.
=
", duree = "
.
$this
->
duree
;
$sql
.
=
", fk_projet = "
.
$this
->
projet_id
;
$sql
.
=
", fk_projet = "
.
$this
->
proje
c
t_id
;
$sql
.
=
" WHERE rowid = "
.
$id
;
$sql
.
=
" AND entity = "
.
$conf
->
entity
;
...
...
@@ -211,8 +211,7 @@ class Fichinter extends CommonObject
$this
->
datec
=
$this
->
db
->
jdate
(
$obj
->
datec
);
$this
->
datev
=
$this
->
db
->
jdate
(
$obj
->
datev
);
$this
->
datem
=
$this
->
db
->
jdate
(
$obj
->
datem
);
$this
->
projetidp
=
$obj
->
fk_projet
;
$this
->
projet_id
=
$obj
->
fk_projet
;
$this
->
project_id
=
$obj
->
fk_projet
;
$this
->
note_public
=
$obj
->
note_public
;
$this
->
note_private
=
$obj
->
note_private
;
$this
->
modelpdf
=
$obj
->
model_pdf
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment