diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 3c56cfcae3d..0f3e097bddd 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -270,7 +270,7 @@ function pdf_getPDFFontSize($outputlangs) function pdf_getHeightForLogo($logo, $url = false) { global $conf; - $height=(empty($conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT)?22:$conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT); + $height=(empty($conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT)?22:$conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT); $maxwidth=130; include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $tmp=dol_getImageSize($logo, $url); @@ -1602,6 +1602,24 @@ function pdf_getLinkedObjects($object,$outputlangs) $linkedobjects[$objecttype]['date_value'] = dol_print_date($objects[$i]->date_contrat,'day','',$outputlangs); } } + else if ($objecttype == 'shipping') + { + $outputlangs->load('orders'); + $outputlangs->load('sendings'); + $num=count($objects); + for ($i=0;$i<$num;$i++) + { + $objects[$i]->fetchObjectLinked(); + $order = $objects[$i]->linkedObjects['commande'][0]; + + $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder") . ' / ' . $outputlangs->transnoentities("RefSending"); + $linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($order->ref) . ($order->ref_client ? ' ('.$order->ref_client.')' : ''); + $linkedobjects[$objecttype]['ref_value'].= ' / ' . $outputlangs->transnoentities($objects[$i]->ref); + $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("OrderDate") . ' / ' . $outputlangs->transnoentities("DateSending"); + $linkedobjects[$objecttype]['date_value'] = dol_print_date($order->date,'day','',$outputlangs); + $linkedobjects[$objecttype]['date_value'].= ' / ' . dol_print_date($objects[$i]->date_delivery,'day','',$outputlangs); + } + } } // For add external linked objects diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index d5c5d71e328..ffe6336bc41 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -942,7 +942,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print ''; print "\n"; - if ($conf->salaries->enabled) + if ($conf->salaries->enabled && ! empty($user->rights->salaries->read)) { $langs->load("salaries"); @@ -1268,7 +1268,7 @@ else print ''; print "\n"; - if ($conf->salaries->enabled) + if ($conf->salaries->enabled && ! empty($user->rights->salaries->read)) { $langs->load("salaries"); @@ -1957,11 +1957,11 @@ else print ''; print "\n"; - $langs->load("salaries"); - - if ($conf->salaries->enabled) + if ($conf->salaries->enabled && ! empty($user->rights->salaries->read)) { - // THM + $langs->load("salaries"); + + // THM print '