Skip to content

Commit

Permalink
Add lost PR
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 14, 2014
1 parent 20bec86 commit 4e21891
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
20 changes: 19 additions & 1 deletion htdocs/core/lib/pdf.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions htdocs/user/fiche.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@
print '</td>';
print "</tr>\n";

if ($conf->salaries->enabled)
if ($conf->salaries->enabled && ! empty($user->rights->salaries->read))
{
$langs->load("salaries");

Expand Down Expand Up @@ -1268,7 +1268,7 @@
print '</td>';
print "</tr>\n";

if ($conf->salaries->enabled)
if ($conf->salaries->enabled && ! empty($user->rights->salaries->read))
{
$langs->load("salaries");

Expand Down Expand Up @@ -1957,11 +1957,11 @@
print '</td>';
print "</tr>\n";

$langs->load("salaries");

if ($conf->salaries->enabled)
if ($conf->salaries->enabled && ! empty($user->rights->salaries->read))
{
// THM
$langs->load("salaries");

// THM
print '<tr><td valign="top">'.$langs->trans("THM").'</td>';
print '<td>';
print '<input size="8" type="text" name="thm" value="'.price2num(GETPOST('thm')?GETPOST('thm'):$object->thm).'">';
Expand Down

0 comments on commit 4e21891

Please sign in to comment.