';
/*
- * Last third parties modified
+ * Latest modified third parties
*/
-$max=15;
+$max = 15;
$sql = "SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
-$sql.= ", s.code_client";
-$sql.= ", s.code_fournisseur";
-$sql.= ", s.logo";
-$sql.= ", s.canvas, s.tms as datem, s.status as status";
-$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
-if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
-$sql.= ' WHERE s.entity IN ('.getEntity('societe').')';
-if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
-if ($socid) $sql.= " AND s.rowid = ".$socid;
-if (! $user->rights->fournisseur->lire) $sql.=" AND (s.fournisseur != 1 OR s.client != 0)";
-$sql.= $db->order("s.tms", "DESC");
-$sql.= $db->plimit($max, 0);
+$sql .= ", s.code_client";
+$sql .= ", s.code_fournisseur";
+$sql .= ", s.logo";
+$sql .= ", s.canvas, s.tms as datem, s.status as status";
+$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
+if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
+$sql .= ' WHERE s.entity IN ('.getEntity('societe').')';
+if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
+if ($socid) $sql .= " AND s.rowid = ".$socid;
+if (!$user->rights->fournisseur->lire) $sql .= " AND (s.fournisseur != 1 OR s.client != 0)";
+$sql .= $db->order("s.tms", "DESC");
+$sql .= $db->plimit($max, 0);
//print $sql;
$result = $db->query($sql);
@@ -274,16 +274,16 @@ if ($result)
{
$objp = $db->fetch_object($result);
- $thirdparty_static->id=$objp->rowid;
- $thirdparty_static->name=$objp->name;
- $thirdparty_static->client=$objp->client;
- $thirdparty_static->fournisseur=$objp->fournisseur;
+ $thirdparty_static->id = $objp->rowid;
+ $thirdparty_static->name = $objp->name;
+ $thirdparty_static->client = $objp->client;
+ $thirdparty_static->fournisseur = $objp->fournisseur;
$thirdparty_static->logo = $objp->logo;
- $thirdparty_static->datem=$db->jdate($objp->datem);
- $thirdparty_static->status=$objp->status;
+ $thirdparty_static->datem = $db->jdate($objp->datem);
+ $thirdparty_static->status = $objp->status;
$thirdparty_static->code_client = $objp->code_client;
$thirdparty_static->code_fournisseur = $objp->code_fournisseur;
- $thirdparty_static->canvas=$objp->canvas;
+ $thirdparty_static->canvas = $objp->canvas;
$thirdparty_static->email = $objp->email;
print '
';
@@ -293,21 +293,21 @@ if ($result)
print "\n";
// Type
print '| ';
- if ($thirdparty_static->client==1 || $thirdparty_static->client==3)
+ if ($thirdparty_static->client == 1 || $thirdparty_static->client == 3)
{
- $thirdparty_static->name=$langs->trans("Customer");
+ $thirdparty_static->name = $langs->trans("Customer");
print $thirdparty_static->getNomUrl(0, 'customer', 0, 1);
}
if ($thirdparty_static->client == 3 && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print " / ";
- if (($thirdparty_static->client==2 || $thirdparty_static->client==3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
+ if (($thirdparty_static->client == 2 || $thirdparty_static->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{
- $thirdparty_static->name=$langs->trans("Prospect");
+ $thirdparty_static->name = $langs->trans("Prospect");
print $thirdparty_static->getNomUrl(0, 'prospect', 0, 1);
}
- if (! empty($conf->fournisseur->enabled) && $thirdparty_static->fournisseur)
+ if (!empty($conf->fournisseur->enabled) && $thirdparty_static->fournisseur)
{
if ($thirdparty_static->client) print " / ";
- $thirdparty_static->name=$langs->trans("Supplier");
+ $thirdparty_static->name = $langs->trans("Supplier");
print $thirdparty_static->getNomUrl(0, 'supplier', 0, 1);
}
print ' | ';
@@ -316,7 +316,7 @@ if ($result)
print dol_print_date($thirdparty_static->datem, 'day');
print "";
print '';
- print $thirdparty_static->getLibStatut(5);
+ print $thirdparty_static->getLibStatut(3);
print " | ";
print "
\n";
$i++;
diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php
index 84766f8e206..0226c724165 100644
--- a/htdocs/stripe/config.php
+++ b/htdocs/stripe/config.php
@@ -46,13 +46,13 @@ $stripearrayofkeysbyenv = array(
$stripearrayofkeys = array();
if (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'alpha'))
{
- $stripearrayofkeys = $stripearrayofkeysbyenv[0]; // Test
+ $stripearrayofkeys = $stripearrayofkeysbyenv[0]; // Test
}
else
{
- $stripearrayofkeys = $stripearrayofkeysbyenv[1]; // Live
+ $stripearrayofkeys = $stripearrayofkeysbyenv[1]; // Live
}
\Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']);
\Stripe\Stripe::setAppInfo("Dolibarr Stripe", DOL_VERSION, "https://www.dolibarr.org"); // add dolibarr version
-\Stripe\Stripe::setApiVersion(empty($conf->global->STRIPE_FORCE_VERSION)?"2019-05-16":$conf->global->STRIPE_FORCE_VERSION); // force version API
+\Stripe\Stripe::setApiVersion(empty($conf->global->STRIPE_FORCE_VERSION) ? "2019-05-16" : $conf->global->STRIPE_FORCE_VERSION); // force version API
diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php
index be272ee2d36..d4032287501 100644
--- a/htdocs/supplier_proposal/class/supplier_proposal.class.php
+++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php
@@ -66,6 +66,9 @@ class SupplierProposal extends CommonObject
*/
public $fk_element='fk_supplier_proposal';
+ /**
+ * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
+ */
public $picto='propal';
/**
@@ -158,8 +161,8 @@ class SupplierProposal extends CommonObject
public $lines = array();
public $line;
- public $labelstatut=array();
- public $labelstatut_short=array();
+ public $labelStatus=array();
+ public $labelStatusShort=array();
public $nbtodo;
public $nbtodolate;
@@ -1698,22 +1701,22 @@ class SupplierProposal extends CommonObject
* Close the askprice
*
* @param User $user Object user that close
- * @param int $statut Statut
+ * @param int $status Status
* @param string $note Comment
* @return int <0 if KO, >0 if OK
*/
- public function cloture($user, $statut, $note)
+ public function cloture($user, $status, $note)
{
global $langs,$conf;
- $this->statut = $statut;
+ $this->statut = $status;
$error=0;
$now=dol_now();
$this->db->begin();
$sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposal";
- $sql.= " SET fk_statut = ".$statut.", note_private = '".$this->db->escape($note)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id;
+ $sql.= " SET fk_statut = ".$status.", note_private = '".$this->db->escape($note)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id;
$sql.= " WHERE rowid = ".$this->id;
$resql=$this->db->query($sql);
@@ -1722,7 +1725,7 @@ class SupplierProposal extends CommonObject
$modelpdf=$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED?$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED:$this->modelpdf;
$trigger_name='SUPPLIER_PROPOSAL_CLOSE_REFUSED';
- if ($statut == 2)
+ if ($status == 2)
{
$trigger_name='SUPPLIER_PROPOSAL_CLOSE_SIGNED';
$modelpdf=$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL?$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL:$this->modelpdf;
@@ -1732,7 +1735,7 @@ class SupplierProposal extends CommonObject
$result = $this->updateOrCreatePriceFournisseur($user);
}
}
- if ($statut == 4)
+ if ($status == 4)
{
$trigger_name='SUPPLIER_PROPOSAL_CLASSIFY_BILLED';
}
@@ -2196,20 +2199,20 @@ class SupplierProposal extends CommonObject
// phpcs:enable
// Init/load array of translation of status
- if (empty($this->labelstatut) || empty($this->labelstatut_short))
+ if (empty($this->labelStatus) || empty($this->labelStatusShort))
{
global $langs;
$langs->load("supplier_proposal");
- $this->labelstatut[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraft");
- $this->labelstatut[self::STATUS_VALIDATED]=$langs->trans("SupplierProposalStatusValidated");
- $this->labelstatut[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSigned");
- $this->labelstatut[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSigned");
- $this->labelstatut[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosed");
- $this->labelstatut_short[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraftShort");
- $this->labelstatut_short[self::STATUS_VALIDATED]=$langs->trans("Opened");
- $this->labelstatut_short[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSignedShort");
- $this->labelstatut_short[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSignedShort");
- $this->labelstatut_short[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosedShort");
+ $this->labelStatus[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraft");
+ $this->labelStatus[self::STATUS_VALIDATED]=$langs->trans("SupplierProposalStatusValidated");
+ $this->labelStatus[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSigned");
+ $this->labelStatus[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSigned");
+ $this->labelStatus[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosed");
+ $this->labelStatusShort[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraftShort");
+ $this->labelStatusShort[self::STATUS_VALIDATED]=$langs->trans("Opened");
+ $this->labelStatusShort[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSignedShort");
+ $this->labelStatusShort[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSignedShort");
+ $this->labelStatusShort[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosedShort");
}
$statusnew='';
@@ -2219,7 +2222,7 @@ class SupplierProposal extends CommonObject
elseif ($status==self::STATUS_NOTSIGNED) $statusnew='status5';
elseif ($status==self::STATUS_CLOSE) $statusnew='status6';
- return dolGetStatus($this->labelstatut[$status], $this->labelstatut_short[$status], '', $statusnew, $mode);
+ return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusnew, $mode);
}
@@ -2258,15 +2261,16 @@ class SupplierProposal extends CommonObject
if ($resql)
{
$label = $labelShort = '';
+ $status = '';
if ($mode == 'opened') {
$delay_warning=$conf->supplier_proposal->cloture->warning_delay;
- $statut = self::STATUS_VALIDATED;
+ $status = self::STATUS_VALIDATED;
$label = $langs->trans("SupplierProposalsToClose");
$labelShort = $langs->trans("ToAcceptRefuse");
}
if ($mode == 'signed') {
$delay_warning=$conf->supplier_proposal->facturation->warning_delay;
- $statut = self::STATUS_SIGNED;
+ $status = self::STATUS_SIGNED;
$label = $langs->trans("SupplierProposalsToProcess"); // May be billed or ordered
$labelShort = $langs->trans("ToClose");
}
@@ -2275,7 +2279,7 @@ class SupplierProposal extends CommonObject
$response->warning_delay = $delay_warning/60/60/24;
$response->label = $label;
$response->labelShort = $labelShort;
- $response->url = DOL_URL_ROOT.'/supplier_proposal/list.php?viewstatut='.$statut;
+ $response->url = DOL_URL_ROOT.'/supplier_proposal/list.php?viewstatut='.$status;
$response->img = img_object('', "propal");
// This assignment in condition is not a bug. It allows walking the results.
diff --git a/htdocs/takepos/ChangeLog.md b/htdocs/takepos/ChangeLog.md
deleted file mode 100644
index 7b623eaa252..00000000000
--- a/htdocs/takepos/ChangeLog.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# CHANGELOG TAKEPOS FOR
DOLIBARR ERP CRM
-
-## 1.0
-Initial version
-
diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php
index dd65469ec05..001fd842165 100644
--- a/htdocs/takepos/takepos.php
+++ b/htdocs/takepos/takepos.php
@@ -562,23 +562,23 @@ function MoreActions(totalactions){
}
}
+// Popup to select the terminal to use
function TerminalsDialog()
{
jQuery("#dialog-info").dialog({
resizable: false,
- height:220,
- width:400,
+ height: global->TAKEPOS_NUM_TERMINALS / 3 * 20); ?>,
+ width: dol_optimize_smallscreen ? 316 : 400); ?>,
modal: true,
buttons: {
- Terminal1: function() {
+ 'trans("Terminal")) ?> 1': function() {
location.href='takepos.php?setterminal=1';
}
global->TAKEPOS_NUM_TERMINALS; $i++)
{
- print "
- ,
- Terminal".$i.": function() {
+ print ",
+ '".dol_escape_js($langs->trans("Terminal"))." ".$i."': function() {
location.href='takepos.php?setterminal=".$i."';
}
";
diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php
index 975f2eb311f..27fc142d991 100644
--- a/htdocs/theme/eldy/badges.inc.php
+++ b/htdocs/theme/eldy/badges.inc.php
@@ -37,7 +37,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
padding: 0;
border-radius: 50%;
padding: 0.45em;
- vertical-align: middle;
+ vertical-align: text-top;
}
a.badge:focus, a.badge:hover {
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index cf5c4f9703a..4a3b73b1d20 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -473,6 +473,12 @@ textarea.centpercent {
.paddingright2 {
padding-: 2px;
}
+.marginleft2 {
+ margin-: 2px;
+}
+.marginright2 {
+ margin-: 2px;
+}
.cursordefault {
cursor: default;
}
diff --git a/htdocs/theme/eldy/progress.inc.php b/htdocs/theme/eldy/progress.inc.php
index 3e330745440..a211c40efb4 100644
--- a/htdocs/theme/eldy/progress.inc.php
+++ b/htdocs/theme/eldy/progress.inc.php
@@ -21,10 +21,10 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
height: 20px;
overflow: hidden;
background-color: #f5f5f5;
- background-color: rgba(0,0,0,0.1);
+ background-color: rgba(128, 128, 128, 0.1);
border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
- box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.progress.spaced{
@@ -167,7 +167,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
}
.progress-bar-yellow,
.progress-bar-warning {
- background-color: #f39c12;
+ background-color: #bc9526;
}
.progress-striped .progress-bar-yellow,
.progress-striped .progress-bar-warning {
@@ -184,4 +184,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+}
+.progress-bar-consumed {
+ background-color: rgb(0, 0, 0, 0.15);
}
\ No newline at end of file
diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php
index 386a81f0afd..24e7e6f7d41 100644
--- a/htdocs/theme/eldy/theme_vars.inc.php
+++ b/htdocs/theme/eldy/theme_vars.inc.php
@@ -81,7 +81,7 @@ $toolTipFontColor='#333';
$textSuccess ='#28a745';
$colorblind_deuteranopes_textSuccess ='#37de5d';
$textDanger ='#dc3545';
-$textWarning ='#f39c12';
+$textWarning ='#bc9526';
$colorblind_deuteranopes_textWarning = $textWarning; // currently not tested with a color blind people so use default color
diff --git a/htdocs/theme/md/badges.inc.php b/htdocs/theme/md/badges.inc.php
index 2a1b9ffd24b..11536240ee0 100644
--- a/htdocs/theme/md/badges.inc.php
+++ b/htdocs/theme/md/badges.inc.php
@@ -36,8 +36,8 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
.badge-dot {
padding: 0;
border-radius: 50%;
- padding: 0.25rem;
- vertical-align: middle;
+ padding: 0.35em;
+ vertical-align: unset;
}
a.badge:focus, a.badge:hover {
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 320a03c2775..04fe7e85d77 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -676,6 +676,12 @@ textarea.centpercent {
.paddingright2 {
padding-: 2px;
}
+.marginleft2 {
+ margin-: 2px;
+}
+.marginright2 {
+ margin-: 2px;
+}
.cursordefault {
cursor: default;
}
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index 0daba74be77..9a3bce8c458 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -1169,123 +1169,123 @@ class Ticket extends CommonObject
/**
* Return status label of object
*
- * @param string $statut id statut
+ * @param string $status Id status
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label
*/
- public function LibStatut($statut, $mode = 0)
+ public function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs;
if ($mode == 0) {
- return $langs->trans($this->statuts[$statut]);
+ return $langs->trans($this->statuts[$status]);
}
elseif ($mode == 1) {
- return $langs->trans($this->statuts_short[$statut]);
+ return $langs->trans($this->statuts_short[$status]);
}
elseif ($mode == 2) {
- if ($statut == self::STATUS_NOT_READ) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ if ($status == self::STATUS_NOT_READ) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_READ) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_READ) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_ASSIGNED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_ASSIGNED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_IN_PROGRESS) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_IN_PROGRESS) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_NEED_MORE_INFO) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_NEED_MORE_INFO) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_WAITING) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_WAITING) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_CLOSED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_CLOSED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_CANCELED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_CANCELED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
}
elseif ($mode == 3) {
- if ($statut == self::STATUS_NOT_READ) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket');
+ if ($status == self::STATUS_NOT_READ) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket');
}
- elseif ($statut == self::STATUS_READ) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket');
+ elseif ($status == self::STATUS_READ) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket');
}
- elseif ($statut == self::STATUS_ASSIGNED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket');
+ elseif ($status == self::STATUS_ASSIGNED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket');
}
- elseif ($statut == self::STATUS_IN_PROGRESS) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket');
+ elseif ($status == self::STATUS_IN_PROGRESS) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket');
}
- elseif ($statut == self::STATUS_NEED_MORE_INFO) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket');
+ elseif ($status == self::STATUS_NEED_MORE_INFO) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket');
}
- elseif ($statut == self::STATUS_WAITING) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket');
+ elseif ($status == self::STATUS_WAITING) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket');
}
- elseif ($statut == self::STATUS_CLOSED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket');
+ elseif ($status == self::STATUS_CLOSED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket');
}
- elseif ($statut == self::STATUS_CANCELED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket');
+ elseif ($status == self::STATUS_CANCELED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket');
}
}
elseif ($mode == 4) {
- if ($statut == self::STATUS_NOT_READ) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ if ($status == self::STATUS_NOT_READ) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_READ) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_READ) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_ASSIGNED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_ASSIGNED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_IN_PROGRESS) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_IN_PROGRESS) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_NEED_MORE_INFO) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_NEED_MORE_INFO) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_WAITING) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_WAITING) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_CLOSED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_CLOSED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
- elseif ($statut == self::STATUS_CANCELED) {
- return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
+ elseif ($status == self::STATUS_CANCELED) {
+ return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]);
}
}
elseif ($mode == 5 || $mode == 6) {
- if ($statut == self::STATUS_NOT_READ) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket');
+ if ($status == self::STATUS_NOT_READ) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket');
}
- elseif ($statut == self::STATUS_READ) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket');
+ elseif ($status == self::STATUS_READ) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket');
}
- elseif ($statut == self::STATUS_ASSIGNED) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket');
+ elseif ($status == self::STATUS_ASSIGNED) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket');
}
- elseif ($statut == self::STATUS_IN_PROGRESS) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket');
+ elseif ($status == self::STATUS_IN_PROGRESS) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket');
}
- elseif ($statut == self::STATUS_NEED_MORE_INFO) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket');
+ elseif ($status == self::STATUS_NEED_MORE_INFO) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket');
}
- elseif ($statut == self::STATUS_WAITING) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket');
+ elseif ($status == self::STATUS_WAITING) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket');
}
- elseif ($statut == self::STATUS_CLOSED) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket');
+ elseif ($status == self::STATUS_CLOSED) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket');
}
- elseif ($statut == self::STATUS_CANCELED) {
- return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket');
+ elseif ($status == self::STATUS_CANCELED) {
+ return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket');
}
}
}
@@ -2228,13 +2228,13 @@ class Ticket extends CommonObject
* Get array of all contacts for a ticket
* Override method of file commonobject.class.php to add phone number
*
- * @param int $statut Status of lines to get (-1=all)
+ * @param int $status Status of lines to get (-1=all)
* @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user)
* @param int $list 0:Return array contains all properties, 1:Return array contains just id
* @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...)
* @return array Array of contacts
*/
- public function listeContact($statut = -1, $source = 'external', $list = 0, $code = '')
+ public function listeContact($status = -1, $source = 'external', $list = 0, $code = '')
{
global $langs;
@@ -2281,8 +2281,8 @@ class Ticket extends CommonObject
}
$sql .= " AND tc.active=1";
- if ($statut >= 0) {
- $sql .= " AND ec.statut = '" . $statut . "'";
+ if ($status >= 0) {
+ $sql .= " AND ec.statut = '" . $status . "'";
}
$sql .= " ORDER BY t.lastname ASC";
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 6e7d2540d32..c34a9f1c7d0 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -954,22 +954,22 @@ class User extends CommonObject
/**
* Change status of a user
*
- * @param int $statut Status to set
+ * @param int $status Status to set
* @return int <0 if KO, 0 if nothing is done, >0 if OK
*/
- public function setstatus($statut)
+ public function setstatus($status)
{
global $conf,$langs,$user;
$error=0;
// Check parameters
- if ($this->statut == $statut) return 0;
- else $this->statut = $statut;
+ if ($this->statut == $status) return 0;
+ else $this->statut = $status;
$this->db->begin();
- // Deactivate user
+ // Save in database
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql.= " SET statut = ".$this->statut;
$sql.= " WHERE rowid = ".$this->id;
@@ -2495,20 +2495,20 @@ class User extends CommonObject
// phpcs:enable
global $langs;
- if (empty($this->labelstatus) || empty($this->labelstatusshort))
+ if (empty($this->labelStatus) || empty($this->labelStatusShort))
{
global $langs;
//$langs->load("mymodule");
- $this->labelstatus[self::STATUS_ENABLED] = $langs->trans('Enabled');
- $this->labelstatus[self::STATUS_DISABLED] = $langs->trans('Disabled');
- $this->labelstatusshort[self::STATUS_ENABLED] = $langs->trans('Enabled');
- $this->labelstatusshort[self::STATUS_DISABLED] = $langs->trans('Disabled');
+ $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled');
+ $this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled');
+ $this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled');
+ $this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Disabled');
}
$statusType = 'status5';
if ($status == self::STATUS_ENABLED) $statusType = 'status4';
- return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
+ return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
}
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index b624bdb34d9..aa4a6b3f8b6 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -52,7 +52,10 @@ class UserGroup extends CommonObject
*/
public $ismultientitymanaged = 1;
- public $picto='group';
+ /**
+ * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
+ */
+ public $picto='group';
/**
* @var int Entity of group
@@ -836,11 +839,11 @@ class UserGroup extends CommonObject
/**
* Renvoi le libelle d'un statut donne
*
- * @param int $statut Id statut
+ * @param int $status Id status
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
- public function LibStatut($statut, $mode = 0)
+ public function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php
index ac99001bf4b..d84b5232773 100644
--- a/htdocs/website/class/website.class.php
+++ b/htdocs/website/class/website.class.php
@@ -745,20 +745,20 @@ class Website extends CommonObject
// phpcs:enable
global $langs;
- if (empty($this->labelstatus) || empty($this->labelstatusshort))
+ if (empty($this->labelStatus) || empty($this->labelStatusShort))
{
global $langs;
//$langs->load("mymodule");
- $this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
- $this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
- $this->labelstatusshort[self::STATUS_DRAFT] = $langs->trans('Disabled');
- $this->labelstatusshort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
+ $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
+ $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
+ $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Disabled');
+ $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
}
$statusType = 'status5';
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
- return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
+ return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
}
diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php
index e85af6244e3..0258198ba10 100644
--- a/htdocs/website/class/websitepage.class.php
+++ b/htdocs/website/class/websitepage.class.php
@@ -545,20 +545,20 @@ class WebsitePage extends CommonObject
// phpcs:enable
global $langs;
- if (empty($this->labelstatus) || empty($this->labelstatusshort))
+ if (empty($this->labelStatus) || empty($this->labelStatusShort))
{
global $langs;
//$langs->load("mymodule");
- $this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
- $this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
- $this->labelstatusshort[self::STATUS_DRAFT] = $langs->trans('Disabled');
- $this->labelstatusshort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
+ $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
+ $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
+ $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Disabled');
+ $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
}
$statusType = 'status5';
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
- return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
+ return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
}
diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php
index 81b76b1c81f..5c79d68aefe 100644
--- a/htdocs/zapier/class/hook.class.php
+++ b/htdocs/zapier/class/hook.class.php
@@ -633,37 +633,37 @@ class Hook extends CommonObject
public function LibStatut($status, $mode = 0)
{
// phpcs:enable
- if (empty($this->labelstatus)) {
+ if (empty($this->labelStatus)) {
global $langs;
//$langs->load("zapier@zapier");
- $this->labelstatus[1] = $langs->trans('Enabled');
- $this->labelstatus[0] = $langs->trans('Disabled');
+ $this->labelStatus[1] = $langs->trans('Enabled');
+ $this->labelStatus[0] = $langs->trans('Disabled');
}
if ($mode == 0) {
- return $this->labelstatus[$status];
+ return $this->labelStatus[$status];
} elseif ($mode == 1) {
- return $this->labelstatus[$status];
+ return $this->labelStatus[$status];
} elseif ($mode == 2) {
if ($status == 1) {
- return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
+ return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
} elseif ($status == 0) {
- return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
+ return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
}
} elseif ($mode == 3) {
- if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
- elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
+ if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
+ elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
} elseif ($mode == 4) {
- if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
- elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
+ if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
+ elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
} elseif ($mode == 5) {
- if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
- elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
+ if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
+ elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
} elseif ($mode == 6) {
if ($status == 1) {
- return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
+ return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
} elseif ($status == 0) {
- return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
+ return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
}
}
}