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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
223e5027
Commit
223e5027
authored
11 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Info tab was wrong with interventions
parent
190dabc3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/core/lib/functions2.lib.php
+24
-12
24 additions, 12 deletions
htdocs/core/lib/functions2.lib.php
htdocs/fichinter/class/fichinter.class.php
+7
-8
7 additions, 8 deletions
htdocs/fichinter/class/fichinter.class.php
htdocs/fichinter/info.php
+15
-11
15 additions, 11 deletions
htdocs/fichinter/info.php
with
46 additions
and
31 deletions
htdocs/core/lib/functions2.lib.php
+
24
−
12
View file @
223e5027
...
...
@@ -205,13 +205,15 @@ function dol_print_object_info($object)
print
$langs
->
trans
(
"CreatedBy"
)
.
': '
;
if
(
is_object
(
$object
->
user_creation
))
{
print
$object
->
user_creation
->
getNomUrl
(
1
);
if
(
$object
->
user_creation
->
id
)
print
$object
->
user_creation
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
else
{
$userstatic
=
new
User
(
$db
);
$userstatic
->
fetch
(
$object
->
user_creation
);
print
$userstatic
->
getNomUrl
(
1
);
if
(
$userstatic
->
id
)
print
$userstatic
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
print
'<br>'
;
}
...
...
@@ -230,13 +232,15 @@ function dol_print_object_info($object)
print
$langs
->
trans
(
"ModifiedBy"
)
.
': '
;
if
(
is_object
(
$object
->
user_modification
))
{
print
$object
->
user_modification
->
getNomUrl
(
1
);
if
(
$object
->
user_modification
->
id
)
print
$object
->
user_modification
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
else
{
$userstatic
=
new
User
(
$db
);
$userstatic
->
fetch
(
$object
->
user_modification
);
print
$userstatic
->
getNomUrl
(
1
);
if
(
$userstatic
->
id
)
print
$userstatic
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
print
'<br>'
;
}
...
...
@@ -255,13 +259,15 @@ function dol_print_object_info($object)
print
$langs
->
trans
(
"ValidatedBy"
)
.
': '
;
if
(
is_object
(
$object
->
user_validation
))
{
print
$object
->
user_validation
->
getNomUrl
(
1
);
if
(
$object
->
user_validation
->
id
)
print
$object
->
user_validation
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
else
{
$userstatic
=
new
User
(
$db
);
$userstatic
->
fetch
(
$object
->
user_validation
);
print
$userstatic
->
getNomUrl
(
1
);
if
(
$userstatic
->
id
)
print
$userstatic
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
print
'<br>'
;
}
...
...
@@ -280,13 +286,15 @@ function dol_print_object_info($object)
print
$langs
->
trans
(
"ApprovedBy"
)
.
': '
;
if
(
is_object
(
$object
->
user_approve
))
{
print
$object
->
user_approve
->
getNomUrl
(
1
);
if
(
$object
->
user_approve
->
id
)
print
$object
->
user_approve
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
else
{
$userstatic
=
new
User
(
$db
);
$userstatic
->
fetch
(
$object
->
user_approve
);
print
$userstatic
->
getNomUrl
(
1
);
if
(
$userstatic
->
id
)
print
$userstatic
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
print
'<br>'
;
}
...
...
@@ -305,13 +313,15 @@ function dol_print_object_info($object)
print
$langs
->
trans
(
"ClosedBy"
)
.
': '
;
if
(
is_object
(
$object
->
user_cloture
))
{
print
$object
->
user_cloture
->
getNomUrl
(
1
);
if
(
$object
->
user_cloture
->
id
)
print
$object
->
user_cloture
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
else
{
$userstatic
=
new
User
(
$db
);
$userstatic
->
fetch
(
$object
->
user_cloture
);
print
$userstatic
->
getNomUrl
(
1
);
if
(
$userstatic
->
id
)
print
$userstatic
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
print
'<br>'
;
}
...
...
@@ -330,13 +340,15 @@ function dol_print_object_info($object)
print
$langs
->
trans
(
"ConciliatedBy"
)
.
': '
;
if
(
is_object
(
$object
->
user_rappro
))
{
print
$object
->
user_rappro
->
getNomUrl
(
1
);
if
(
$object
->
user_rappro
->
id
)
print
$object
->
user_rappro
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
else
{
$userstatic
=
new
User
(
$db
);
$userstatic
->
fetch
(
$object
->
user_rappro
);
print
$userstatic
->
getNomUrl
(
1
);
if
(
$userstatic
->
id
)
print
$userstatic
->
getNomUrl
(
1
);
else
print
$langs
->
trans
(
"Unknown"
);
}
print
'<br>'
;
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/fichinter/class/fichinter.class.php
+
7
−
8
View file @
223e5027
...
...
@@ -607,9 +607,9 @@ class Fichinter extends CommonObject
}
/**
*
I
nformation
sur l'objet fiche intervention
*
Load i
nformation
on object
*
* @param int $id Id
de la fiche d'intervention
* @param int $id Id
of object
* @return void
*/
function
info
(
$id
)
...
...
@@ -625,13 +625,12 @@ class Fichinter extends CommonObject
$sql
.
=
" WHERE f.rowid = "
.
$id
;
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$result
=
$this
->
db
->
query
(
$sql
);
if
(
$result
)
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
{
if
(
$this
->
db
->
num_rows
(
$res
ult
))
if
(
$this
->
db
->
num_rows
(
$res
ql
))
{
$obj
=
$this
->
db
->
fetch_object
(
$res
ult
);
$obj
=
$this
->
db
->
fetch_object
(
$res
ql
);
$this
->
id
=
$obj
->
rowid
;
...
...
@@ -649,7 +648,7 @@ class Fichinter extends CommonObject
$this
->
user_validation
=
$vuser
;
}
}
$this
->
db
->
free
(
$res
ult
);
$this
->
db
->
free
(
$res
ql
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
htdocs/fichinter/info.php
+
15
−
11
View file @
223e5027
<?php
/* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2009-201
0
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-201
3
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -31,32 +31,36 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
$langs
->
load
(
'companies'
);
$langs
->
load
(
"interventions"
);
$
fichinter
id
=
GETPOST
(
'id'
,
'int'
);
$id
=
GETPOST
(
'id'
,
'int'
);
// Security check
if
(
$user
->
societe_id
)
$socid
=
$user
->
societe_id
;
$result
=
restrictedArea
(
$user
,
'ficheinter'
,
$fichinterid
,
'fichinter'
);
$object
=
new
Fichinter
(
$db
);
if
(
$id
>
0
)
{
$object
->
fetch
(
$id
);
}
/*
* View
*/
* View
*/
llxHeader
();
$fichinter
=
new
Fichinter
(
$db
);
$fichinter
->
fetch
(
$fichinterid
);
$societe
=
new
Societe
(
$db
);
$societe
->
fetch
(
$
fichinter
->
socid
);
$societe
->
fetch
(
$
object
->
socid
);
$head
=
fichinter_prepare_head
(
$
fichinter
);
$head
=
fichinter_prepare_head
(
$
object
);
dol_fiche_head
(
$head
,
'info'
,
$langs
->
trans
(
'InterventionCard'
),
0
,
'intervention'
);
$
fichinter
->
info
(
$fichinter
->
id
);
$
object
->
info
(
$object
->
id
);
print
'<table width="100%"><tr><td>'
;
dol_print_object_info
(
$
fichinter
);
dol_print_object_info
(
$
object
);
print
'</td></tr></table>'
;
print
'</div>'
;
...
...
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