Fix type of prospect level

This commit is contained in:
Laurent Destailleur 2024-01-19 16:22:16 +01:00
parent e5b9f03e8c
commit abf80ecbef
2 changed files with 11 additions and 5 deletions

View file

@ -339,8 +339,14 @@ class Contact extends CommonObject
public $roles;
public $cacheprospectstatus = array();
/**
* @var string Prospect level. ie: 'PL_LOW', 'PL...'
*/
public $fk_prospectlevel;
public $stcomm_id;
public $statut_commercial;
/**
@ -1951,7 +1957,7 @@ class Contact extends CommonObject
/**
* Return label of prospect level
*
* @param int $fk_prospectlevel Prospect level
* @param string $fk_prospectlevel Prospect level
* @return string label of level
*/
public function libProspLevel($fk_prospectlevel)
@ -1960,7 +1966,7 @@ class Contact extends CommonObject
$lib = $langs->trans("ProspectLevel".$fk_prospectlevel);
// If lib not found in language file, we get label from cache/database
if ($lib == $langs->trans("ProspectLevel".$fk_prospectlevel)) {
if ($lib == "ProspectLevel".$fk_prospectlevel) {
$lib = $langs->getLabelFromKey($this->db, $fk_prospectlevel, 'c_prospectlevel', 'code', 'label');
}
return $lib;

View file

@ -533,7 +533,7 @@ class Societe extends CommonObject
public $transport_mode_supplier_id;
/**
* @var int ID
* @var string Prospect level. ie: 'PL_LOW', 'PL...'
*/
public $fk_prospectlevel;
@ -4563,7 +4563,7 @@ class Societe extends CommonObject
/**
* Return label of prospect level
*
* @param int $fk_prospectlevel Prospect level
* @param string $fk_prospectlevel Prospect level
* @return string label of level
*/
public function LibProspLevel($fk_prospectlevel)
@ -4573,7 +4573,7 @@ class Societe extends CommonObject
$lib = $langs->trans("ProspectLevel".$fk_prospectlevel);
// If lib not found in language file, we get label from cache/database
if ($lib == $langs->trans("ProspectLevel".$fk_prospectlevel)) {
if ($lib == "ProspectLevel".$fk_prospectlevel) {
$lib = $langs->getLabelFromKey($this->db, $fk_prospectlevel, 'c_prospectlevel', 'code', 'label');
}
return $lib;