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
6da5a6b8
Commit
6da5a6b8
authored
7 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
FIX #7359
Conflicts: htdocs/fichinter/class/fichinter.class.php
parent
029f1c41
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/fichinter/class/fichinter.class.php
+20
-21
20 additions, 21 deletions
htdocs/fichinter/class/fichinter.class.php
with
20 additions
and
21 deletions
htdocs/fichinter/class/fichinter.class.php
+
20
−
21
View file @
6da5a6b8
...
...
@@ -39,7 +39,7 @@ class Fichinter extends CommonObject
public
$fk_element
=
'fk_fichinter'
;
public
$table_element_line
=
'fichinterdet'
;
public
$picto
=
'intervention'
;
/**
* {@inheritdoc}
*/
...
...
@@ -361,7 +361,7 @@ class Fichinter extends CommonObject
$this
->
fk_contrat
=
$obj
->
fk_contrat
;
$this
->
user_creation
=
$obj
->
fk_user_author
;
$this
->
extraparams
=
(
array
)
json_decode
(
$obj
->
extraparams
,
true
);
if
(
$this
->
statut
==
0
)
$this
->
brouillon
=
1
;
...
...
@@ -542,27 +542,26 @@ class Fichinter extends CommonObject
/**
* Returns amount based on user thm
*
* @return float
a
mount
* @return float
A
mount
*/
function
getAmount
()
{
function
getAmount
()
{
global
$db
;
$amount
=
0
;
$this
->
author
=
new
User
(
$db
);
$this
->
author
->
fetch
(
$this
->
user_creation
);
$thm
=
$this
->
author
->
thm
;
foreach
(
$this
->
lines
as
&
$line
)
{
$amount
+=
$line
->
qty
*
$thm
;
foreach
(
$this
->
lines
as
$line
)
{
$amount
+=
(
$line
->
duration
/
60
/
60
*
$thm
);
}
return
$amount
;
return
price2num
(
$amount
,
'MT'
)
;
}
/**
* Returns the label status
*
...
...
@@ -599,7 +598,7 @@ class Fichinter extends CommonObject
return
'<span class="hideonsmartphone">'
.
$langs
->
trans
(
$this
->
statuts_short
[
$statut
])
.
' </span>'
.
img_picto
(
$langs
->
trans
(
$this
->
statuts
[
$statut
]),
$this
->
statuts_logo
[
$statut
]);
if
(
$mode
==
6
)
return
'<span class="hideonsmartphone">'
.
$langs
->
trans
(
$this
->
statuts
[
$statut
])
.
' </span>'
.
img_picto
(
$langs
->
trans
(
$this
->
statuts
[
$statut
]),
$this
->
statuts_logo
[
$statut
]);
return
''
;
}
...
...
@@ -949,7 +948,7 @@ class Fichinter extends CommonObject
return
-
2
;
}
/**
* Load an object from its id and create a new one in database
...
...
@@ -1001,7 +1000,7 @@ class Fichinter extends CommonObject
$this
->
date_creation
=
''
;
$this
->
date_validation
=
''
;
$this
->
ref_client
=
''
;
// Create clone
$result
=
$this
->
create
(
$user
);
if
(
$result
<
0
)
$error
++
;
...
...
@@ -1013,7 +1012,7 @@ class Fichinter extends CommonObject
{
$this
->
addline
(
$user
,
$this
->
id
,
$line
->
desc
,
$line
->
datei
,
$line
->
duration
);
}
// Hook of thirdparty module
if
(
is_object
(
$hookmanager
))
{
...
...
@@ -1043,8 +1042,8 @@ class Fichinter extends CommonObject
return
-
1
;
}
}
/**
* Adding a line of intervention into data base
*
...
...
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