Fix scrutinizer

This commit is contained in:
Laurent Destailleur 2017-11-29 16:25:12 +01:00
parent 2693e5db6d
commit 682afe8918
2 changed files with 22 additions and 19 deletions

View File

@ -223,8 +223,10 @@ class lettering extends BookKeeping
* @param boolean $notrigger no trigger * @param boolean $notrigger no trigger
* @return number * @return number
*/ */
public function updateLettrage($ids = array(), $notrigger = false) { public function updateLettrage($ids = array(), $notrigger = false)
{
$error = 0; $error = 0;
$lettre = 'AAA';
dol_syslog(get_class($this) . "::" . __METHOD__, LOG_DEBUG); dol_syslog(get_class($this) . "::" . __METHOD__, LOG_DEBUG);
@ -239,7 +241,6 @@ class lettering extends BookKeeping
$lettre++; $lettre++;
} else { } else {
$this->errors[] = 'Error' . $this->db->lasterror(); $this->errors[] = 'Error' . $this->db->lasterror();
;
$error++; $error++;
} }
@ -254,7 +255,6 @@ class lettering extends BookKeeping
} }
} else { } else {
$this->errors[] = 'Erreur sql' . $this->db->lasterror(); $this->errors[] = 'Erreur sql' . $this->db->lasterror();
;
$error++; $error++;
} }
@ -262,6 +262,8 @@ class lettering extends BookKeeping
$now = dol_now(); $now = dol_now();
if (! $error)
{
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping SET"; $sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping SET";
$sql .= " lettering_code='" . $lettre . "'"; $sql .= " lettering_code='" . $lettre . "'";
$sql .= " , date_lettering = '" . $this->db->idate($now) . "'"; // todo correct date it's false $sql .= " , date_lettering = '" . $this->db->idate($now) . "'"; // todo correct date it's false
@ -274,6 +276,7 @@ class lettering extends BookKeeping
$error++; $error++;
$this->errors[] = "Error " . $this->db->lasterror(); $this->errors[] = "Error " . $this->db->lasterror();
} }
}
if (! $error) { if (! $error) {
if (! $notrigger) { if (! $notrigger) {

View File

@ -1215,7 +1215,7 @@ class ActionComm extends CommonObject
*/ */
function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto=0, $notooltip=0) function getNomUrl($withpicto=0,$maxlength=0,$classname='',$option='',$overwritepicto=0, $notooltip=0)
{ {
global $conf, $langs, $user, $hookmanager; global $conf, $langs, $user, $hookmanager, $action;
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
@ -1231,7 +1231,7 @@ class ActionComm extends CommonObject
if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL'); if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL');
} }
$tooltip = '<u>' . $langs->trans('ShowAction'.$objp->code) . '</u>'; $tooltip = '<u>' . $langs->trans('ShowAction') . '</u>';
if (! empty($this->ref)) if (! empty($this->ref))
$tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref; $tooltip .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
if (! empty($label)) if (! empty($label))