Correction pour validation Stickler CI / stickler-ci
This commit is contained in:
parent
4dd42496fa
commit
28d330996c
@ -1777,7 +1777,7 @@ class Contact extends CommonObject
|
|||||||
* @param int $active 1=Active only, 0=Not active only, -1=All
|
* @param int $active 1=Active only, 0=Not active only, -1=All
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function loadCacheOfProspStatus($active=1)
|
public function loadCacheOfProspStatus($active = 1)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -1800,7 +1800,7 @@ class Contact extends CommonObject
|
|||||||
*
|
*
|
||||||
* @return string Libelle
|
* @return string Libelle
|
||||||
*/
|
*/
|
||||||
function getLibProspLevel()
|
public function getLibProspLevel()
|
||||||
{
|
{
|
||||||
return $this->LibProspLevel($this->fk_prospectlevel);
|
return $this->LibProspLevel($this->fk_prospectlevel);
|
||||||
}
|
}
|
||||||
@ -1811,7 +1811,7 @@ class Contact extends CommonObject
|
|||||||
* @param int $fk_prospectlevel Prospect level
|
* @param int $fk_prospectlevel Prospect level
|
||||||
* @return string label of level
|
* @return string label of level
|
||||||
*/
|
*/
|
||||||
function LibProspLevel($fk_prospectlevel)
|
public function LibProspLevel($fk_prospectlevel)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -1832,7 +1832,7 @@ class Contact extends CommonObject
|
|||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
* @deprecated Use update function instead
|
* @deprecated Use update function instead
|
||||||
*/
|
*/
|
||||||
function set_prospect_level(User $user)
|
public function setProspectLevel(User $user)
|
||||||
{
|
{
|
||||||
return $this->update($this->id, $user);
|
return $this->update($this->id, $user);
|
||||||
}
|
}
|
||||||
@ -1844,9 +1844,9 @@ class Contact extends CommonObject
|
|||||||
* @param string $label Label to use for status for added status
|
* @param string $label Label to use for status for added status
|
||||||
* @return string Libelle
|
* @return string Libelle
|
||||||
*/
|
*/
|
||||||
function getLibProspCommStatut($mode=0, $label='')
|
public function getLibProspCommStatut($mode = 0, $label = '')
|
||||||
{
|
{
|
||||||
return $this->LibProspCommStatut($this->stcomm_id, $mode, $label, $this->stcomm_picto);
|
return $this->libProspCommStatut($this->stcomm_id, $mode, $label, $this->stcomm_picto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1862,7 +1862,7 @@ class Contact extends CommonObject
|
|||||||
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
|
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
|
||||||
* @return string Libelle du statut
|
* @return string Libelle du statut
|
||||||
*/
|
*/
|
||||||
function LibProspCommStatut($statut, $mode=0, $label='', $picto='')
|
public function libProspCommStatut($statut, $mode = 0, $label = '', $picto = '')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('customers');
|
$langs->load('customers');
|
||||||
|
|||||||
@ -1017,10 +1017,9 @@ while ($i < min($num, $limit))
|
|||||||
{
|
{
|
||||||
// Prospect status
|
// Prospect status
|
||||||
print '<td class="center nowrap"><div class="nowrap">';
|
print '<td class="center nowrap"><div class="nowrap">';
|
||||||
print '<div class="inline-block">'.$contactstatic->LibProspCommStatut($obj->stcomm_id,2,$contactstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto);
|
print '<div class="inline-block">' . $contactstatic->libProspCommStatut($obj->stcomm_id, 2, $contactstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto);
|
||||||
print '</div> - <div class="inline-block">';
|
print '</div> - <div class="inline-block">';
|
||||||
foreach($contactstatic->cacheprospectstatus as $key => $val)
|
foreach ($contactstatic->cacheprospectstatus as $key => $val) {
|
||||||
{
|
|
||||||
$titlealt = 'default';
|
$titlealt = 'default';
|
||||||
if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label'];
|
if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label'];
|
||||||
if ($obj->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="' . $_SERVER["PHP_SELF"] . '?stcommcontactid=' . $obj->rowid . '&stcomm=' . $val['code'] . '&action=setstcomm' . $param . ($page ? '&page=' . urlencode($page) : '') . '">' . img_action($titlealt, $val['code'], $val['picto']) . '</a>';
|
if ($obj->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="' . $_SERVER["PHP_SELF"] . '?stcommcontactid=' . $obj->rowid . '&stcomm=' . $val['code'] . '&action=setstcomm' . $param . ($page ? '&page=' . urlencode($page) : '') . '">' . img_action($titlealt, $val['code'], $val['picto']) . '</a>';
|
||||||
|
|||||||
@ -197,14 +197,17 @@ class FormCompany extends Form
|
|||||||
{
|
{
|
||||||
$options = array();
|
$options = array();
|
||||||
|
|
||||||
if ($empty) {
|
if ($empty)
|
||||||
|
{
|
||||||
$options[''] = '';
|
$options[''] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
while ($obj = $this->db->fetch_object($resql)) {
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
|
{
|
||||||
$level = $langs->trans($obj->code);
|
$level = $langs->trans($obj->code);
|
||||||
|
|
||||||
if ($level == $obj->code) {
|
if ($level == $obj->code)
|
||||||
|
{
|
||||||
$level = $langs->trans($obj->label);
|
$level = $langs->trans($obj->label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user