diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 2ae74dae103..34af6f4cbda 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2740,7 +2740,7 @@ class FactureFournisseur extends CommonInvoice $alreadypaid = $this->alreadypaid; } - $$datas['picto'] .= ' '.$this->getLibStatut(5, $alreadypaid); + $datas['picto'] .= ' '.$this->getLibStatut(5, $alreadypaid); } if ($moretitle) { $datas['picto'] .= ' - '.$moretitle; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 4792c8b67b5..2d3cc7d9d37 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1311,6 +1311,7 @@ class Holiday extends CommonObject global $conf, $langs; $langs->load('holiday'); + $nofetch = empty($params['nofetch']) ? false : true; $datas = []; $datas['picto'] = img_picto('', $this->picto).' '.$langs->trans("Holiday").''; @@ -1318,6 +1319,23 @@ class Holiday extends CommonObject $datas['picto'] .= ' '.$this->getLibStatut(5); } $datas['ref'] = '
'.$langs->trans('Ref').': '.$this->ref; + // 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'] = '
'.$langs->trans("Type") . ': ' . (empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $this->fk_type) : $labeltoshow); + } + if (isset($this->halfday) && !empty($this->date_debut) && !empty($this->date_fin)) { + $listhalfday = array( + 'morning' => $langs->trans("Morning"), + "afternoon" => $langs->trans("Afternoon") + ); + $starthalfday = ($this->halfday == -1 || $this->halfday == 2) ? 'afternoon' : 'morning'; + $endhalfday = ($this->halfday == 1 || $this->halfday == 2) ? 'morning' : 'afternoon'; + $datas['date_start'] = '
'.$langs->trans('DateDebCP') . ': '. dol_print_date($this->date_debut, 'day') . '  '.$langs->trans($listhalfday[$starthalfday]).''; + $datas['date_end'] = '
'.$langs->trans('DateFinCP') . ': '. dol_print_date($this->date_fin, 'day') . '  '.$langs->trans($listhalfday[$endhalfday]).''; + } + return $datas; } @@ -1339,6 +1357,7 @@ class Holiday extends CommonObject $params = [ 'id' => $this->id, 'objecttype' => $this->element, + 'nofetch' => 1, ]; $classfortooltip = 'classfortooltip'; $dataparams = '';