Fiw warnings: The private array ->status_short, ->statuts and

->status_long are now array ->labelStatusShort and ->labelStatus
everywhere.
This commit is contained in:
Laurent Destailleur 2023-11-24 10:10:24 +01:00
parent 6c0c1a9881
commit e6eb34a8db
33 changed files with 206 additions and 223 deletions

View file

@ -238,6 +238,7 @@ The following changes may create regressions for some external modules, but were
* The property ->user_validation to store ID of user validating has been renamed into ->user_validation_id.
* The property ->user_creation to store ID of user of creation has been renamed into ->user_creation_id.
* The property ->user_modification to store ID of user of modification has been renamed into ->user_modification_id.
* The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere.
* The duplicate property ->user_creat, ->date_creat, ->date_valid has been removed (use instead user_creation, date_creation, date_validation).
* The method get_substitutionarray_shipment_lines() has been removed. Use the generic get_substitutionarray_lines() instead.
* The method ProductcustomerPrice->fetch_all_log() has been renamed into camel case ->fetchAllLog()

View file

@ -179,11 +179,6 @@ class DolibarrApi
unset($object->alreadypaid);
unset($object->openid);
unset($object->statuts);
unset($object->statuts_short);
unset($object->statuts_logo);
unset($object->statuts_long);
//unset($object->labelStatus);
//unset($object->labelStatusShort);

View file

@ -188,9 +188,9 @@ class Mailing extends CommonObject
public $statut_dest = array();
/**
* @var array statuts
* @var array labelStatus
*/
public $statuts = array();
public $labelStatus = array();
/**
* @var array substitutionarray
@ -220,10 +220,10 @@ class Mailing extends CommonObject
$this->db = $db;
// List of language codes for status
$this->statuts[0] = 'MailingStatusDraft';
$this->statuts[1] = 'MailingStatusValidated';
$this->statuts[2] = 'MailingStatusSentPartialy';
$this->statuts[3] = 'MailingStatusSentCompletely';
$this->labelStatus[0] = 'MailingStatusDraft';
$this->labelStatus[1] = 'MailingStatusValidated';
$this->labelStatus[2] = 'MailingStatusSentPartialy';
$this->labelStatus[3] = 'MailingStatusSentCompletely';
$this->statut_dest[0] = 'MailingStatusNotSent';
$this->statut_dest[1] = 'MailingStatusSent';
@ -893,8 +893,8 @@ class Mailing extends CommonObject
global $langs;
$langs->load("mailing");
$labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]);
$labelStatusShort = $langs->transnoentitiesnoconv($this->statuts[$status]);
$labelStatus = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
$labelStatusShort = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
$statusType = 'status'.$status;
if ($status == 2) {

View file

@ -66,7 +66,7 @@ class LignePrelevement
*/
public $db;
public $statuts = array();
public $labelStatus = array();
const STATUS_DRAFT = 0;
const STATUS_NOT_USED = 1;
@ -89,9 +89,9 @@ class LignePrelevement
// List of language codes for status
$langs->load("withdrawals");
$this->statuts[0] = $langs->trans("StatusWaiting");
$this->statuts[2] = $langs->trans("StatusPaid");
$this->statuts[3] = $langs->trans("StatusRefused");
$this->labelStatus[0] = $langs->trans("StatusWaiting");
$this->labelStatus[2] = $langs->trans("StatusPaid");
$this->labelStatus[3] = $langs->trans("StatusRefused");
}
/**
@ -165,30 +165,30 @@ class LignePrelevement
global $langs;
if ($mode == 0) {
return $langs->trans($this->statuts[$status]);
return $langs->trans($this->labelStatus[$status]);
} elseif ($mode == 1) {
if ($status == 0) {
return img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Waiting
return img_picto($langs->trans($this->labelStatus[$status]), 'statut1', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->labelStatus[$status]); // Waiting
} elseif ($status == 2) {
return img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Credited
return img_picto($langs->trans($this->labelStatus[$status]), 'statut6', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->labelStatus[$status]); // Credited
} elseif ($status == 3) {
return img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->statuts[$status]); // Refused
return img_picto($langs->trans($this->labelStatus[$status]), 'statut8', 'class="valignmiddle"').' '.$langs->transnoentitiesnoconv($this->labelStatus[$status]); // Refused
}
} elseif ($mode == 2) {
if ($status == 0) {
return img_picto($langs->trans($this->statuts[$status]), 'statut1', 'class="valignmiddle"');
return img_picto($langs->trans($this->labelStatus[$status]), 'statut1', 'class="valignmiddle"');
} elseif ($status == 2) {
return img_picto($langs->trans($this->statuts[$status]), 'statut6', 'class="valignmiddle"');
return img_picto($langs->trans($this->labelStatus[$status]), 'statut6', 'class="valignmiddle"');
} elseif ($status == 3) {
return img_picto($langs->trans($this->statuts[$status]), 'statut8', 'class="valignmiddle"');
return img_picto($langs->trans($this->labelStatus[$status]), 'statut8', 'class="valignmiddle"');
}
} elseif ($mode == 3) {
if ($status == 0) {
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut1', 'class="valignmiddle"');
return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->labelStatus[$status]), 'statut1', 'class="valignmiddle"');
} elseif ($status == 2) {
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut6', 'class="valignmiddle"');
return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->labelStatus[$status]), 'statut6', 'class="valignmiddle"');
} elseif ($status == 3) {
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut8', 'class="valignmiddle"');
return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->labelStatus[$status]), 'statut8', 'class="valignmiddle"');
}
}
//return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);

View file

@ -34,6 +34,11 @@ abstract class CommonInvoice extends CommonObject
{
use CommonIncoterm;
/**
* @var string Label used as ref for template invoices
*/
public $title;
/**
* @var int Type of invoice (See TYPE_XXX constants)
*/

View file

@ -682,25 +682,17 @@ abstract class CommonObject
/**
* @var array Array with label of status
*/
public $labelStatus;
/**
* @var array array of status string
* @deprecated Use instead labelStatus
*/
public $statuts = array();
public $labelStatus = array();
/**
* @var array Array with short label of status
*/
protected $labelStatusShort;
public $labelStatusShort = array();
/**
* @var array array of short status string
* @deprecated Use instead labelStatusShort
* @var array Array to store list of tpl
*/
public $statuts_short = array();
public $tpl;
/**
@ -3837,7 +3829,7 @@ abstract class CommonObject
// Situations totals
if (!empty($this->situation_cycle_ref) && !empty($this->situation_counter) && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits')) {
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
if ($this->type != Facture::TYPE_CREDIT_NOTE) {
if ($this->type != Facture::TYPE_CREDIT_NOTE) { // @phpstan-ignore-line
$prev_sits = $this->get_prev_sits();
foreach ($prev_sits as $sit) { // $sit is an object Facture loaded with a fetch.
@ -4597,7 +4589,7 @@ abstract class CommonObject
if ($fieldstatus == 'tosell') {
$this->status = $status;
} elseif ($fieldstatus == 'tobuy') {
$this->status_buy = $status;
$this->status_buy = $status; // @phpstan-ignore-line
} else {
$this->statut = $status;
$this->status = $status;
@ -4991,8 +4983,7 @@ abstract class CommonObject
*/
public function formAddObjectLine($dateSelector, $seller, $buyer, $defaulttpldir = '/core/tpl')
{
global $conf, $user, $langs, $object, $hookmanager, $extrafields;
global $form;
global $conf, $user, $langs, $object, $hookmanager, $extrafields, $form;
// Line extrafield
if (!is_object($extrafields)) {
@ -10295,8 +10286,7 @@ abstract class CommonObject
);
foreach ($fields as $key => $value) {
if (array_key_exists($key, $this->fields)) {
// @phpstan-ignore-next-line
$this->{$key} = $value;
$this->{$key} = $value; // @phpstan-ignore-line
}
}

View file

@ -69,9 +69,9 @@ class FormExpenseReport
if ($useempty) {
$html.='<option value="-1">&nbsp;</option>';
}
$arrayoflabels = $tmpep->statuts;
$arrayoflabels = $tmpep->labelStatus;
if ($useshortlabel) {
$arrayoflabels = $tmpep->statuts_short;
$arrayoflabels = $tmpep->labelStatusShort;
}
foreach ($arrayoflabels as $key => $val) {
if ($selected != '' && $selected == $key) {

View file

@ -2519,7 +2519,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
$title = $langs->trans("Projects");
if (strcmp($status, '') && $status >= 0) {
$title = $langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$status]);
$title = $langs->trans("Projects").' '.$langs->trans($projectstatic->labelStatus[$status]);
}
print '<!-- print_projecttasks_array -->';

View file

@ -717,7 +717,7 @@ class pdf_standard extends ModeleExpenseReport
$pdf->SetXY($posx, $posy);
$pdf->SetFont('', 'B', $default_font_size + 2);
$pdf->SetTextColor(111, 81, 124);
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->statuts_short[$object->status]), '', 'R');
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $posx, 3, $outputlangs->transnoentities($object->labelStatusShort[$object->status]), '', 'R');
if ($showaddress) {
// Sender properties

View file

@ -470,10 +470,8 @@ function cleanObjectDatas($toclean)
unset($toclean->timespent_fk_user);
unset($toclean->timespent_note);
unset($toclean->statuts);
unset($toclean->statuts_short);
unset($toclean->statuts_logo);
unset($toclean->statuts_long);
unset($toclean->labelStatus);
unset($toclean->labelStatusShort);
unset($toclean->element);
unset($toclean->fk_element);

View file

@ -110,9 +110,9 @@ class Delivery extends CommonObject
public $commande_id;
/**
* @var array statuts labels
* @var array Status labels
*/
public $statuts;
public $labelStatus;
/**
* @var DeliveryLine[] lines
@ -135,9 +135,9 @@ class Delivery extends CommonObject
$this->db = $db;
// List of short language codes for status
$this->statuts[-1] = 'StatusDeliveryCanceled';
$this->statuts[0] = 'StatusDeliveryDraft';
$this->statuts[1] = 'StatusDeliveryValidated';
$this->labelStatus[-1] = 'StatusDeliveryCanceled';
$this->labelStatus[0] = 'StatusDeliveryDraft';
$this->labelStatus[1] = 'StatusDeliveryValidated';
}
/**

View file

@ -267,18 +267,18 @@ class Expedition extends CommonObject
$this->db = $db;
// List of long language codes for status
$this->statuts = array();
$this->statuts[-1] = 'StatusSendingCanceled';
$this->statuts[0] = 'StatusSendingDraft';
$this->statuts[1] = 'StatusSendingValidated';
$this->statuts[2] = 'StatusSendingProcessed';
$this->labelStatus = array();
$this->labelStatus[-1] = 'StatusSendingCanceled';
$this->labelStatus[0] = 'StatusSendingDraft';
$this->labelStatus[1] = 'StatusSendingValidated';
$this->labelStatus[2] = 'StatusSendingProcessed';
// List of short language codes for status
$this->statuts_short = array();
$this->statuts_short[-1] = 'StatusSendingCanceledShort';
$this->statuts_short[0] = 'StatusSendingDraftShort';
$this->statuts_short[1] = 'StatusSendingValidatedShort';
$this->statuts_short[2] = 'StatusSendingProcessedShort';
$this->labelStatusShort = array();
$this->labelStatusShort[-1] = 'StatusSendingCanceledShort';
$this->labelStatusShort[0] = 'StatusSendingDraftShort';
$this->labelStatusShort[1] = 'StatusSendingValidatedShort';
$this->labelStatusShort[2] = 'StatusSendingProcessedShort';
}
/**
@ -1928,8 +1928,8 @@ class Expedition extends CommonObject
// phpcs:enable
global $langs;
$labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]);
$labelStatusShort = $langs->transnoentitiesnoconv($this->statuts_short[$status]);
$labelStatus = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
$labelStatusShort = $langs->transnoentitiesnoconv($this->labelStatusShort[$status]);
$statusType = 'status'.$status;
if ($status == self::STATUS_VALIDATED) {

View file

@ -179,9 +179,8 @@ class ExpenseReport extends CommonObject
public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
public $statuts = array();
public $statuts_short = array();
public $statuts_logo;
public $labelStatus = array();
public $labelStatusShort = array();
// Multicurrency
/**
@ -293,9 +292,8 @@ class ExpenseReport extends CommonObject
$this->modepaymentid = 0;
// List of language codes for status
$this->statuts_short = array(0 => 'Draft', 2 => 'Validated', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused');
$this->statuts = array(0 => 'Draft', 2 => 'ValidatedWaitingApproval', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused');
$this->statuts_logo = array(0 => 'status0', 2 => 'status1', 4 => 'status6', 5 => 'status4', 6 => 'status6', 99 => 'status5');
$this->labelStatusShort = array(0 => 'Draft', 2 => 'Validated', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused');
$this->labelStatus = array(0 => 'Draft', 2 => 'ValidatedWaitingApproval', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused');
}
/**
@ -811,10 +809,12 @@ class ExpenseReport extends CommonObject
// phpcs:enable
global $langs;
$labelStatus = $langs->transnoentitiesnoconv($this->statuts[$status]);
$labelStatusShort = $langs->transnoentitiesnoconv($this->statuts_short[$status]);
$labelStatus = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
$labelStatusShort = $langs->transnoentitiesnoconv($this->labelStatusShort[$status]);
$statusType = $this->statuts_logo[$status];
$statuslogo = array(0 => 'status0', 2 => 'status1', 4 => 'status6', 5 => 'status4', 6 => 'status6', 99 => 'status5');
$statusType = $statuslogo[$status];
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
}

View file

@ -239,7 +239,7 @@ print $form->select_dolusers($userid, 'userid', 1, '', 0, $include, '', 0, 0, 0,
print '</td></tr>';
// Status
print '<tr><td class="left">'.$langs->trans("Status").'</td><td class="left">';
$liststatus = $tmpexpensereport->statuts;
$liststatus = $tmpexpensereport->labelStatus;
print $form->selectarray('object_status', $liststatus, GETPOST('object_status', 'intcomma'), -4, 0, 0, '', 1);
print '</td></tr>';
// Year

View file

@ -444,9 +444,8 @@ class Interventions extends DolibarrApi
// phpcs:enable
$object = parent::_cleanObjectDatas($object);
unset($object->statuts_short);
unset($object->statuts_logo);
unset($object->statuts);
unset($object->labelStatus);
unset($object->labelStatusShort);
return $object;
}

View file

@ -80,8 +80,6 @@ class FichinterRec extends Fichinter
public $id_origin;
public $statuts_logo;
/**
* @var string Unit frequency
*/
@ -123,14 +121,11 @@ class FichinterRec extends Fichinter
$this->db = $db;
//status dans l'ordre de l'intervention
$this->statuts[0] = 'Draft';
$this->statuts[1] = 'Closed';
$this->labelStatus[0] = 'Draft';
$this->labelStatus[1] = 'Closed';
$this->statuts_short[0] = 'Draft';
$this->statuts_short[1] = 'Closed';
$this->statuts_logo[0] = 'statut0';
$this->statuts_logo[1] = 'statut1';
$this->labelStatusShort[0] = 'Draft';
$this->labelStatusShort[1] = 'Closed';
}
/**

View file

@ -124,12 +124,12 @@ class CommandeFournisseur extends CommonOrder
/**
* @var array List of status
*/
public $statuts;
public $labelStatus;
/**
* @var array List of status short
*/
public $statuts_short;
public $labelStatusShort;
public $billed;
@ -788,33 +788,33 @@ class CommandeFournisseur extends CommonOrder
// phpcs:enable
global $conf, $langs, $hookmanager;
if (empty($this->statuts) || empty($this->statuts_short)) {
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
$langs->load('orders');
$this->statuts[0] = 'StatusSupplierOrderDraft';
$this->statuts[1] = 'StatusSupplierOrderValidated';
$this->statuts[2] = 'StatusSupplierOrderApproved';
$this->labelStatus[0] = 'StatusSupplierOrderDraft';
$this->labelStatus[1] = 'StatusSupplierOrderValidated';
$this->labelStatus[2] = 'StatusSupplierOrderApproved';
if (empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) {
$this->statuts[3] = 'StatusSupplierOrderOnProcess';
$this->labelStatus[3] = 'StatusSupplierOrderOnProcess';
} else {
$this->statuts[3] = 'StatusSupplierOrderOnProcessWithValidation';
$this->labelStatus[3] = 'StatusSupplierOrderOnProcessWithValidation';
}
$this->statuts[4] = 'StatusSupplierOrderReceivedPartially';
$this->statuts[5] = 'StatusSupplierOrderReceivedAll';
$this->statuts[6] = 'StatusSupplierOrderCanceled'; // Approved->Canceled
$this->statuts[7] = 'StatusSupplierOrderCanceled'; // Process running->canceled
$this->statuts[9] = 'StatusSupplierOrderRefused';
$this->labelStatus[4] = 'StatusSupplierOrderReceivedPartially';
$this->labelStatus[5] = 'StatusSupplierOrderReceivedAll';
$this->labelStatus[6] = 'StatusSupplierOrderCanceled'; // Approved->Canceled
$this->labelStatus[7] = 'StatusSupplierOrderCanceled'; // Process running->canceled
$this->labelStatus[9] = 'StatusSupplierOrderRefused';
// List of language codes for status
$this->statuts_short[0] = 'StatusSupplierOrderDraftShort';
$this->statuts_short[1] = 'StatusSupplierOrderValidatedShort';
$this->statuts_short[2] = 'StatusSupplierOrderApprovedShort';
$this->statuts_short[3] = 'StatusSupplierOrderOnProcessShort';
$this->statuts_short[4] = 'StatusSupplierOrderReceivedPartiallyShort';
$this->statuts_short[5] = 'StatusSupplierOrderReceivedAllShort';
$this->statuts_short[6] = 'StatusSupplierOrderCanceledShort';
$this->statuts_short[7] = 'StatusSupplierOrderCanceledShort';
$this->statuts_short[9] = 'StatusSupplierOrderRefusedShort';
$this->labelStatusShort[0] = 'StatusSupplierOrderDraftShort';
$this->labelStatusShort[1] = 'StatusSupplierOrderValidatedShort';
$this->labelStatusShort[2] = 'StatusSupplierOrderApprovedShort';
$this->labelStatusShort[3] = 'StatusSupplierOrderOnProcessShort';
$this->labelStatusShort[4] = 'StatusSupplierOrderReceivedPartiallyShort';
$this->labelStatusShort[5] = 'StatusSupplierOrderReceivedAllShort';
$this->labelStatusShort[6] = 'StatusSupplierOrderCanceledShort';
$this->labelStatusShort[7] = 'StatusSupplierOrderCanceledShort';
$this->labelStatusShort[9] = 'StatusSupplierOrderRefusedShort';
}
$statustrans = array(
@ -842,8 +842,8 @@ class CommandeFournisseur extends CommonOrder
$statusClass = 'status6';
}
$statusLong = $langs->transnoentitiesnoconv($this->statuts[$status]).$billedtext;
$statusShort = $langs->transnoentitiesnoconv($this->statuts_short[$status]);
$statusLong = $langs->transnoentitiesnoconv($this->labelStatus[$status]).$billedtext;
$statusShort = $langs->transnoentitiesnoconv($this->labelStatusShort[$status]);
$parameters = array('status' => $status, 'mode' => $mode, 'billed' => $billed);
$reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); // Note that $action and $object may have been modified by hook

View file

@ -129,12 +129,12 @@ class CommandeFournisseurDispatch extends CommonObjectLine
$this->db = $db;
// List of language codes for status
$this->statuts[0] = 'Received';
$this->statuts[1] = 'Verified';
$this->statuts[2] = 'Denied';
$this->statuts_short[0] = 'Received';
$this->statuts_short[1] = 'Verified';
$this->statuts_short[2] = 'Denied';
$this->labelStatus[0] = 'Received';
$this->labelStatus[1] = 'Verified';
$this->labelStatus[2] = 'Denied';
$this->labelStatusShort[0] = 'Received';
$this->labelStatusShort[1] = 'Verified';
$this->labelStatusShort[2] = 'Denied';
}
@ -579,34 +579,34 @@ class CommandeFournisseurDispatch extends CommonObjectLine
$langs->load('orders');
if ($mode == 0) {
return $langs->trans($this->statuts[$status]);
return $langs->trans($this->labelStatus[$status]);
} elseif ($mode == 1) {
return $langs->trans($this->statuts_short[$status]);
return $langs->trans($this->labelStatusShort[$status]);
} elseif ($mode == 2) {
return $langs->trans($this->statuts[$status]);
return $langs->trans($this->labelStatus[$status]);
} elseif ($mode == 3) {
if ($status == 0) {
return img_picto($langs->trans($this->statuts[$status]), 'statut0');
return img_picto($langs->trans($this->labelStatus[$status]), 'statut0');
} elseif ($status == 1) {
return img_picto($langs->trans($this->statuts[$status]), 'statut4');
return img_picto($langs->trans($this->labelStatus[$status]), 'statut4');
} elseif ($status == 2) {
return img_picto($langs->trans($this->statuts[$status]), 'statut8');
return img_picto($langs->trans($this->labelStatus[$status]), 'statut8');
}
} elseif ($mode == 4) {
if ($status == 0) {
return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatus[$status]), 'statut0').' '.$langs->trans($this->labelStatus[$status]);
} elseif ($status == 1) {
return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatus[$status]), 'statut4').' '.$langs->trans($this->labelStatus[$status]);
} elseif ($status == 2) {
return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatus[$status]), 'statut8').' '.$langs->trans($this->labelStatus[$status]);
}
} elseif ($mode == 5) {
if ($status == 0) {
return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut0');
return '<span class="hideonsmartphone">'.$langs->trans($this->labelStatusShort[$status]).' </span>'.img_picto($langs->trans($this->labelStatus[$status]), 'statut0');
} elseif ($status == 1) {
return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut4');
return '<span class="hideonsmartphone">'.$langs->trans($this->labelStatusShort[$status]).' </span>'.img_picto($langs->trans($this->labelStatus[$status]), 'statut4');
} elseif ($status == 2) {
return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut8');
return '<span class="hideonsmartphone">'.$langs->trans($this->labelStatusShort[$status]).' </span>'.img_picto($langs->trans($this->labelStatus[$status]), 'statut8');
}
}
return "";

View file

@ -1496,7 +1496,7 @@ class Holiday extends CommonObject
/**
* Affiche un select HTML des statuts de congés payés
* Show select with list of leave status
*
* @param int $selected Id of preselected status
* @param string $htmlname Name of HTML select field
@ -1507,7 +1507,7 @@ class Holiday extends CommonObject
{
global $langs;
// Liste des statuts
// List of status label
$name = array('DraftCP', 'ToReviewCP', 'ApprovedCP', 'CancelCP', 'RefuseCP');
$nb = count($name) + 1;
@ -1515,7 +1515,7 @@ class Holiday extends CommonObject
$out = '<select name="'.$htmlname.'" id="'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'">'."\n";
$out .= '<option value="-1">&nbsp;</option>'."\n";
// Boucle des statuts
// Loop on status
for ($i = 1; $i < $nb; $i++) {
if ($i == $selected) {
$out .= '<option value="'.$i.'" selected>'.$langs->trans($name[$i - 1]).'</option>'."\n";

View file

@ -3244,7 +3244,7 @@ class Product extends CommonObject
* Charge tableau des stats commande fournisseur pour le produit/service
*
* @param int $socid Id societe pour filtrer sur une societe
* @param string $filtrestatut Id des statuts pour filtrer sur des statuts
* @param string $filtrestatut Id of status to filter on status
* @param int $forVirtualStock Ignore rights filter for virtual stock calculation.
* @param int $dateofvirtualstock Date of virtual stock
* @return int Array of stats in $this->stats_commande_fournisseur, <0 if ko or >0 if ok

View file

@ -367,7 +367,7 @@ if ($action == 'create') {
// Status
print '<tr><td>'.$langs->trans("Status").'</td><td>';
print '<select id="warehousestatus" name="statut" class="flat minwidth100">';
foreach ($object->statuts as $key => $value) {
foreach ($object->labelStatus as $key => $value) {
if ($key == 1) {
print '<option value="'.$key.'" selected>'.$langs->trans($value).'</option>';
} else {
@ -936,7 +936,7 @@ if ($action == 'create') {
// Status
print '<tr><td>'.$langs->trans("Status").'</td><td>';
print '<select id="warehousestatus" name="statut" class="flat">';
foreach ($object->statuts as $key => $value) {
foreach ($object->labelStatus as $key => $value) {
if ($key == $object->statut) {
print '<option value="'.$key.'" selected>'.$langs->trans($value).'</option>';
} else {

View file

@ -116,7 +116,7 @@ class Entrepot extends CommonObject
/**
* @var array List of short language codes for status
*/
public $statuts = array();
public $labelStatus = array();
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
@ -177,12 +177,12 @@ class Entrepot extends CommonObject
global $conf;
$this->db = $db;
$this->statuts[self::STATUS_CLOSED] = 'Closed2';
$this->labelStatus[self::STATUS_CLOSED] = 'Closed2';
if (!empty($conf->global->ENTREPOT_EXTRA_STATUS)) {
$this->statuts[self::STATUS_OPEN_ALL] = 'OpenAnyMovement';
$this->statuts[self::STATUS_OPEN_INTERNAL] = 'OpenInternal';
$this->labelStatus[self::STATUS_OPEN_ALL] = 'OpenAnyMovement';
$this->labelStatus[self::STATUS_OPEN_INTERNAL] = 'OpenInternal';
} else {
$this->statuts[self::STATUS_OPEN_ALL] = 'Opened';
$this->labelStatus[self::STATUS_OPEN_ALL] = 'Opened';
}
}
@ -701,8 +701,8 @@ class Entrepot extends CommonObject
}
$langs->load('stocks');
$label = $langs->transnoentitiesnoconv($this->statuts[$status]);
$labelshort = $langs->transnoentitiesnoconv($this->statuts[$status]);
$label = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
$labelshort = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
return dolGetStatus($label, $labelshort, '', $statusType, $mode);
}

View file

@ -600,7 +600,7 @@ print $hookmanager->resPrint;
// Status
if (!empty($arrayfields['t.statut']['checked'])) {
print '<td class="liste_titre center parentonrightofpage">';
print $form->selectarray('search_status', $warehouse->statuts, $search_status, 1, 0, 0, '', 1, 0, 0, '', 'search_status width100 onrightofpage');
print $form->selectarray('search_status', $warehouse->labelStatus, $search_status, 1, 0, 0, '', 1, 0, 0, '', 'search_status width100 onrightofpage');
print '</td>';
}

View file

@ -974,7 +974,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
// Status
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td><td>';
print '<select class="flat" name="status" id="status">';
foreach ($object->statuts_short as $key => $val) {
foreach ($object->labelStatusShort as $key => $val) {
print '<option value="'.$key.'"'.((GETPOSTISSET('status') ? GETPOST('status') : $object->statut) == $key ? ' selected="selected"' : '').'>'.$langs->trans($val).'</option>';
}
print '</select>';

View file

@ -202,8 +202,8 @@ class Project extends CommonObject
*/
public $max_attendees;
public $statuts_short;
public $statuts_long;
public $labelStatusShort;
public $labelStatus;
public $statut; // 0=draft, 1=opened, 2=closed
@ -363,8 +363,8 @@ class Project extends CommonObject
$this->db = $db;
$this->statuts_short = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
$this->statuts_long = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
$this->labelStatusShort = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
$this->labelStatus = array(0 => 'Draft', 1 => 'Opened', 2 => 'Closed');
global $conf;
@ -1309,7 +1309,7 @@ class Project extends CommonObject
$statusClass = $statustrans[$status];
}
return dolGetStatus($langs->transnoentitiesnoconv($this->statuts_long[$status]), $langs->transnoentitiesnoconv($this->statuts_short[$status]), '', $statusClass, $mode);
return dolGetStatus($langs->transnoentitiesnoconv($this->labelStatus[$status]), $langs->transnoentitiesnoconv($this->labelStatusShort[$status]), '', $statusClass, $mode);
}
/**

View file

@ -138,12 +138,12 @@ class Task extends CommonObjectLine
/**
* @var array
*/
public $statuts;
public $labelStatus;
/**
* @var array
*/
public $statuts_short;
public $labelStatusShort;
// Properties calculated from sum of llx_element_time linked to task
public $tobill;
@ -2133,80 +2133,80 @@ class Task extends CommonObjectLine
global $langs;
// list of Statut of the task
$this->statuts[0] = 'Draft';
$this->statuts[1] = 'ToDo';
$this->statuts[2] = 'Running';
$this->statuts[3] = 'Finish';
$this->statuts[4] = 'Transfered';
$this->statuts_short[0] = 'Draft';
$this->statuts_short[1] = 'ToDo';
$this->statuts_short[2] = 'Running';
$this->statuts_short[3] = 'Completed';
$this->statuts_short[4] = 'Transfered';
$this->labelStatus[0] = 'Draft';
$this->labelStatus[1] = 'ToDo';
$this->labelStatus[2] = 'Running';
$this->labelStatus[3] = 'Finish';
$this->labelStatus[4] = 'Transfered';
$this->labelStatusShort[0] = 'Draft';
$this->labelStatusShort[1] = 'ToDo';
$this->labelStatusShort[2] = 'Running';
$this->labelStatusShort[3] = 'Completed';
$this->labelStatusShort[4] = 'Transfered';
if ($mode == 0) {
return $langs->trans($this->statuts[$status]);
return $langs->trans($this->labelStatus[$status]);
} elseif ($mode == 1) {
return $langs->trans($this->statuts_short[$status]);
return $langs->trans($this->labelStatusShort[$status]);
} elseif ($mode == 2) {
if ($status == 0) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut0').' '.$langs->trans($this->labelStatusShort[$status]);
} elseif ($status == 1) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts_short[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut1').' '.$langs->trans($this->labelStatusShort[$status]);
} elseif ($status == 2) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts_short[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut3').' '.$langs->trans($this->labelStatusShort[$status]);
} elseif ($status == 3) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatusShort[$status]);
} elseif ($status == 4) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatusShort[$status]);
} elseif ($status == 5) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts_short[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut5').' '.$langs->trans($this->labelStatusShort[$status]);
}
} elseif ($mode == 3) {
if ($status == 0) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut0');
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut0');
} elseif ($status == 1) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut1');
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut1');
} elseif ($status == 2) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut3');
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut3');
} elseif ($status == 3) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut6');
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6');
} elseif ($status == 4) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut6');
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6');
} elseif ($status == 5) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut5');
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut5');
}
} elseif ($mode == 4) {
if ($status == 0) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut0').' '.$langs->trans($this->labelStatus[$status]);
} elseif ($status == 1) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut1').' '.$langs->trans($this->labelStatus[$status]);
} elseif ($status == 2) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut3').' '.$langs->trans($this->labelStatus[$status]);
} elseif ($status == 3) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatus[$status]);
} elseif ($status == 4) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatus[$status]);
} elseif ($status == 5) {
return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts[$status]);
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut5').' '.$langs->trans($this->labelStatus[$status]);
}
} elseif ($mode == 5) {
/*if ($status==0) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0');
elseif ($status==1) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1');
elseif ($status==2) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3');
elseif ($status==3) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6');
elseif ($status==4) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6');
elseif ($status==5) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5');
/*if ($status==0) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut0');
elseif ($status==1) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut1');
elseif ($status==2) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut3');
elseif ($status==3) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut6');
elseif ($status==4) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut6');
elseif ($status==5) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut5');
*/
//else return $this->progress.' %';
return '&nbsp;';
} elseif ($mode == 6) {
/*if ($status==0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0');
elseif ($status==1) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1');
elseif ($status==2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3');
elseif ($status==3) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6');
elseif ($status==4) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6');
elseif ($status==5) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5');
/*if ($status==0) return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut0');
elseif ($status==1) return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut1');
elseif ($status==2) return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut3');
elseif ($status==3) return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut6');
elseif ($status==4) return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut6');
elseif ($status==5) return $langs->trans($this->labelStatus[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut5');
*/
//else return $this->progress.' %';
return '&nbsp;';

View file

@ -914,7 +914,7 @@ if (!empty($arrayfields['s.name_alias']['checked'])) {
if (!empty($arrayfields['p.fk_statut']['checked'])) {
print '<td class="liste_titre center">';
$arrayofstatus = array();
foreach ($projectstatic->statuts_short as $key => $val) {
foreach ($projectstatic->labelStatusShort as $key => $val) {
$arrayofstatus[$key] = $langs->trans($val);
}
$arrayofstatus['99'] = $langs->trans("NotClosed").' ('.$langs->trans('Draft').'+'.$langs->trans('Opened').')';

View file

@ -853,7 +853,7 @@ if ($action == 'create' || $action == 'presend') {
if ($action == 'set_status') {
$new_status = GETPOST('new_status');
//var_dump($url_page_current . "?track_id=" . $object->track_id);
print $form->formconfirm($url_page_current."?track_id=".$object->track_id."&new_status=".GETPOST('new_status'), $langs->trans("TicketChangeStatus"), $langs->trans("TicketConfirmChangeStatus", $langs->transnoentities($object->statuts_short[$new_status])), "confirm_set_status", '', '', 1);
print $form->formconfirm($url_page_current."?track_id=".$object->track_id."&new_status=".GETPOST('new_status'), $langs->trans("TicketChangeStatus"), $langs->trans("TicketConfirmChangeStatus", $langs->transnoentities($object->labelStatusShort[$new_status])), "confirm_set_status", '', '', 1);
}
// project info

View file

@ -483,7 +483,7 @@ class ActionsTicket extends CommonHookActions
// Sort results to be similar to status object list
//sort($exclude_status);
foreach ($object->statuts_short as $status => $status_label) {
foreach ($object->labelStatusShort as $status => $status_label) {
if (!in_array($status, $exclude_status)) {
print '<div class="inline-block center marginbottomonly">';
@ -495,8 +495,8 @@ class ActionsTicket extends CommonHookActions
print '<a class="butAction butStatus marginbottomonly" href="'.$urlforbutton.'">';
print $object->LibStatut($status, 3, 1).' ';
//print img_picto($langs->trans($object->statuts_short[$status]), 'statut'.$status.'.png@ticket', '', false, 0, 0, '', 'valignmiddle').' ';
print $langs->trans($object->statuts_short[$status]);
//print img_picto($langs->trans($object->labelStatusShort[$status]), 'statut'.$status.'.png@ticket', '', false, 0, 0, '', 'valignmiddle').' ';
print $langs->trans($object->labelStatusShort[$status]);
print '</a>';
print '</div>';
}

View file

@ -520,8 +520,8 @@ class Tickets extends DolibarrApi
"cache_types_tickets",
"cache_category_tickets",
"regeximgext",
"statuts_short",
"statuts"
"labelStatus",
"labelStatusShort"
);
foreach ($attr2clean as $toclean) {
unset($object->$toclean);

View file

@ -233,14 +233,14 @@ class Ticket extends CommonObject
public $cache_msgs_ticket;
/**
* @var array statuts labels
* @var array status labels
*/
public $statuts;
public $labelStatus;
/**
* @var array statuts short labels
* @var array status short labels
*/
public $statuts_short;
public $labelStatusShort;
/**
* @var int Notify thirdparty at create
@ -362,7 +362,7 @@ class Ticket extends CommonObject
$this->db = $db;
$this->statuts_short = array(
$this->labelStatusShort = array(
self::STATUS_NOT_READ => 'Unread',
self::STATUS_READ => 'Read',
self::STATUS_ASSIGNED => 'Assigned',
@ -372,7 +372,7 @@ class Ticket extends CommonObject
self::STATUS_CLOSED => 'SolvedClosed',
self::STATUS_CANCELED => 'Canceled'
);
$this->statuts = array(
$this->labelStatus = array(
self::STATUS_NOT_READ => 'Unread',
self::STATUS_READ => 'Read',
self::STATUS_ASSIGNED => 'Assigned',
@ -1257,7 +1257,7 @@ class Ticket extends CommonObject
*/
public function printSelectStatus($selected = "")
{
print Form::selectarray('search_fk_statut', $this->statuts_short, $selected, $show_empty = 1, $key_in_label = 0, $value_as_key = 0, $option = '', $translate = 1, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '');
print Form::selectarray('search_fk_statut', $this->labelStatusShort, $selected, $show_empty = 1, $key_in_label = 0, $value_as_key = 0, $option = '', $translate = 1, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '');
}
@ -1424,8 +1424,8 @@ class Ticket extends CommonObject
// phpcs:enable
global $langs, $hookmanager;
$labelStatus = $this->statuts[$status];
$labelStatusShort = $this->statuts_short[$status];
$labelStatus = $this->labelStatus[$status];
$labelStatusShort = $this->labelStatusShort[$status];
if ($status == self::STATUS_NOT_READ) {
$statusType = 'status0';

View file

@ -212,21 +212,21 @@ if ($result) {
$dataseries = array();
$colorseries = array();
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_NOT_READ]), 'data' => round($tick['unread']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_NOT_READ]), 'data' => round($tick['unread']));
$colorseries[Ticket::STATUS_NOT_READ] = '-'.$badgeStatus0;
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_READ]), 'data' => round($tick['read']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_READ]), 'data' => round($tick['read']));
$colorseries[Ticket::STATUS_READ] = $badgeStatus1;
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_ASSIGNED]), 'data' => round($tick['assigned']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_ASSIGNED]), 'data' => round($tick['assigned']));
$colorseries[Ticket::STATUS_ASSIGNED] = $badgeStatus3;
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_IN_PROGRESS]), 'data' => round($tick['inprogress']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_IN_PROGRESS]), 'data' => round($tick['inprogress']));
$colorseries[Ticket::STATUS_IN_PROGRESS] = $badgeStatus4;
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_WAITING]), 'data' => round($tick['waiting']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_WAITING]), 'data' => round($tick['waiting']));
$colorseries[Ticket::STATUS_WAITING] = '-'.$badgeStatus4;
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_NEED_MORE_INFO]), 'data' => round($tick['needmoreinfo']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_NEED_MORE_INFO]), 'data' => round($tick['needmoreinfo']));
$colorseries[Ticket::STATUS_NEED_MORE_INFO] = '-'.$badgeStatus3;
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_CANCELED]), 'data' => round($tick['canceled']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_CANCELED]), 'data' => round($tick['canceled']));
$colorseries[Ticket::STATUS_CANCELED] = $badgeStatus9;
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->statuts_short[Ticket::STATUS_CLOSED]), 'data' => round($tick['closed']));
$dataseries[] = array('label' => $langs->transnoentitiesnoconv($object->labelStatusShort[Ticket::STATUS_CLOSED]), 'data' => round($tick['closed']));
$colorseries[Ticket::STATUS_CLOSED] = $badgeStatus6;
} else {
dol_print_error($db);

View file

@ -878,7 +878,7 @@ foreach ($object->fields as $key => $val) {
} elseif ($key == 'fk_statut') {
$arrayofstatus = array();
$arrayofstatus['openall'] = '-- '.$langs->trans('OpenAll').' --';
foreach ($object->statuts_short as $key2 => $val2) {
foreach ($object->labelStatusShort as $key2 => $val2) {
if ($key2 == Ticket::STATUS_CLOSED) {
$arrayofstatus['closeall'] = '-- '.$langs->trans('ClosedAll').' --';
}