';
diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php
index 59c2b373d1a..029c5b5f223 100644
--- a/htdocs/compta/deplacement/card.php
+++ b/htdocs/compta/deplacement/card.php
@@ -84,7 +84,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) {
}
}
} elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) {
- $result = $object->delete($id);
+ $result = $object->delete($user);
if ($result >= 0) {
header("Location: index.php");
exit;
diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php
index 857d1d6aea9..fb4f9eb17d4 100644
--- a/htdocs/compta/deplacement/class/deplacement.class.php
+++ b/htdocs/compta/deplacement/class/deplacement.class.php
@@ -1,4 +1,6 @@
* Copyright (C) 2004-2011 Laurent Destailleur
* Copyright (C) 2009-2012 Regis Houssin
@@ -310,13 +312,15 @@ class Deplacement extends CommonObject
/**
* Delete record
*
- * @param int $id Id of record to delete
+ * @param User $user USer that Delete
* @return int <0 if KO, >0 if OK
*/
- public function delete($id)
+ public function delete($user)
{
$this->db->begin();
+ $id = $this->id;
+
$sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = ".((int) $id);
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index 0a996018e97..1345d2116f6 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -51,7 +51,7 @@ class Conf
public $use_javascript_ajax;
//! To store if javascript/ajax is enabked
public $disable_compute;
- //! Used to store current currency (ISO code like 'USD', 'EUR', ...)
+ //! Used to store current currency (ISO code like 'USD', 'EUR', ...). To get the currency symbol: $langs->getCurrencySymbol($this->currency)
public $currency;
//! Used to store current css (from theme)
diff --git a/htdocs/core/class/evalmath.class.php b/htdocs/core/class/evalmath.class.php
index c42612afda8..5c659344465 100644
--- a/htdocs/core/class/evalmath.class.php
+++ b/htdocs/core/class/evalmath.class.php
@@ -372,7 +372,7 @@ class EvalMath
/**
* Evaluate postfix notation
*
- * @param string $tokens An array of expression to evaluate ('operators'). The operand are into ->stack.
+ * @param array $tokens Expression
* @param array $vars Array
* @return string Output
*/
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 88f7f7aaa9a..2a109fb0f5c 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4784,7 +4784,7 @@ class Form
* @param int $outputmode 0=HTML select string, 1=Array
* @param int $include [=0] Removed or 1=Keep only
* @param string $morecss More CSS
- * @return string
+ * @return string|array
* @see select_categories()
*/
public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $markafterid = 0, $outputmode = 0, $include = 0, $morecss = '')
@@ -5848,12 +5848,13 @@ class Form
/**
* Retourne la liste des devises, dans la langue de l'utilisateur
*
- * @param string $selected preselected currency code
- * @param string $htmlname name of HTML select list
- * @param string $mode 0 = Add currency symbol into label, 1 = Add 3 letter iso code
+ * @param string $selected preselected currency code
+ * @param string $htmlname name of HTML select list
+ * @param string $mode 0 = Add currency symbol into label, 1 = Add 3 letter iso code
+ * @param string $useempty '1'=Allow empty value
* @return string
*/
- public function selectCurrency($selected = '', $htmlname = 'currency_id', $mode = 0)
+ public function selectCurrency($selected = '', $htmlname = 'currency_id', $mode = 0, $useempty = '')
{
global $conf, $langs, $user;
@@ -5866,6 +5867,9 @@ class Form
}
$out .= '