mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
fix warnings
This commit is contained in:
@@ -524,8 +524,11 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
$typeleaves = $object->getTypes(1, -1);
|
||||
$labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']);
|
||||
|
||||
if (empty($typeleaves[$object->fk_type])) {
|
||||
$labeltoshow = $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type);
|
||||
} else {
|
||||
$labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']);
|
||||
}
|
||||
if ($object->halfday == 2) {
|
||||
$starthalfdaykey = "Afternoon";
|
||||
$endhalfdaykey = "Morning";
|
||||
|
||||
@@ -1366,8 +1366,12 @@ class Holiday extends CommonObject
|
||||
// show type for this record only in ajax to not overload lists
|
||||
if (!$nofetch && !empty($this->fk_type)) {
|
||||
$typeleaves = $this->getTypes(1, -1);
|
||||
$labeltoshow = (($typeleaves[$this->fk_type]['code'] && $langs->trans($typeleaves[$this->fk_type]['code']) != $typeleaves[$this->fk_type]['code']) ? $langs->trans($typeleaves[$this->fk_type]['code']) : $typeleaves[$this->fk_type]['label']);
|
||||
$datas['type'] = '<br><b>'.$langs->trans("Type") . ':</b> ' . (empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $this->fk_type) : $labeltoshow);
|
||||
if (empty($typeleaves[$this->fk_type])) {
|
||||
$labeltoshow = $langs->trans("TypeWasDisabledOrRemoved", $this->fk_type);
|
||||
} else {
|
||||
$labeltoshow = (($typeleaves[$this->fk_type]['code'] && $langs->trans($typeleaves[$this->fk_type]['code']) != $typeleaves[$this->fk_type]['code']) ? $langs->trans($typeleaves[$this->fk_type]['code']) : $typeleaves[$this->fk_type]['label']);
|
||||
}
|
||||
$datas['type'] = '<br><b>'.$langs->trans("Type") . ':</b> ' . $labeltoshow;
|
||||
}
|
||||
if (isset($this->halfday) && !empty($this->date_debut) && !empty($this->date_fin)) {
|
||||
$listhalfday = array(
|
||||
|
||||
Reference in New Issue
Block a user