diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index fd25e728574..9a47f6eaa3b 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -134,7 +134,7 @@ class Facture extends CommonInvoice
public $ref_client;
/**
- * @var string customer ref
+ * @var ?string customer ref
*/
public $ref_customer;
diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php
index 3a609b2a118..c2ebd13181e 100644
--- a/htdocs/compta/stats/index.php
+++ b/htdocs/compta/stats/index.php
@@ -501,9 +501,11 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) {
if ($modecompta=='CREANCES-DETTES') {
$cumulative_previous_year = (!empty($cumulative_ht[$caseprev])?$cumulative_ht[$caseprev]:0);
$cumulative_year = (!empty($cumulative_ht[$case])?$cumulative_ht[$case]:0);
+ $isset_cumulative_previous_year = isset($cumulative_ht[$caseprev]);
} else {
$cumulative_previous_year = (!empty($cumulative[$caseprev])?$cumulative[$caseprev]:0);
$cumulative_year = (!empty($cumulative[$case])?$cumulative[$case]:0);
+ $isset_cumulative_previous_year = isset($cumulative_ht[$caseprev]);
}
if (!empty($cumulative_previous_year) && !empty($cumulative_year)) {
$percent = (round(($cumulative_year - $cumulative_previous_year) / $cumulative_previous_year, 4) * 100);
@@ -517,10 +519,10 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) {
//print '
+Inf% | ';
print '-';
}
- if (isset($cumulative_previous_year) && empty($cumulative_previous_year) && empty($cumulative_year)) {
+ if ($isset_cumulative_previous_year && empty($cumulative_previous_year) && empty($cumulative_year)) {
print '+0%';
}
- if (!isset($cumulative_previous_year) && empty($cumulative_year)) {
+ if (!$isset_cumulative_previous_year && empty($cumulative_year)) {
print '-';
}
} else {
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index 3fbb42ad89f..b3d02e0d72d 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1217,7 +1217,7 @@ if ($action == 'create' || $action == 'adduserldap') {
}
// Other form for user password
- $parameters = array('valuetoshow' => $valuetoshow, 'password' => $password, 'caneditpasswordandsee' => $caneditpasswordandsee, 'caneditpasswordandsend' => $caneditpasswordandsend);
+ $parameters = array('valuetoshow' => $valuetoshow, 'password' => $password, 'caneditpasswordandsee' => $permissiontoeditpasswordandsee, 'caneditpasswordandsend' => $permissiontoeditpasswordandsend);
$reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if ($reshook > 0) {
$valuetoshow = $hookmanager->resPrint; // to replace
@@ -2041,7 +2041,7 @@ if ($action == 'create' || $action == 'adduserldap') {
*/
// Other form for user password
- $parameters = array('valuetoshow' => $valuetoshow, 'caneditpasswordandsee' => $caneditpasswordandsee, 'caneditpasswordandsend' => $caneditpasswordandsend);
+ $parameters = array('valuetoshow' => $valuetoshow, 'caneditpasswordandsee' => $permissiontoeditpasswordandsee, 'caneditpasswordandsend' => $permissiontoeditpasswordandsend);
$reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if ($reshook > 0) {
$valuetoshow = $hookmanager->resPrint; // to replace