Currency is on title only.

This commit is contained in:
Laurent Destailleur 2015-10-24 21:13:28 +02:00
parent b88a28b660
commit 461771d488
3 changed files with 11 additions and 10 deletions

View File

@ -952,7 +952,7 @@ if ($id > 0 || ! empty($ref))
if ($sep > 0) print ' '; // If we had at least one line in future
else print $langs->trans("CurrentBalance");
print ' '.$object->currency_code.'</td>';
print '<td align="right" class="nowrap"><b>'.price($total, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
print '<td align="right" class="nowrap"><b>'.price($total).'</b></td>';
print '<td>&nbsp;</td>';
print '</tr>';
} else {
@ -961,9 +961,9 @@ if ($id > 0 || ! empty($ref))
if ($sep > 0) print '&nbsp;'; // If we had at least one line in future
else print $langs->trans("Total");
print ' '.$object->currency_code.'</td>';
print '<td align="right" class="nowrap"><b>'.price($total_deb*-1, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
print '<td align="right" class="nowrap"><b>'.price($total_cred, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
print '<td align="right" class="nowrap"><b>'.price($total_cred-($total_deb*-1), 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
print '<td align="right" class="nowrap"><b>'.price($total_deb*-1).'</b></td>';
print '<td align="right" class="nowrap"><b>'.price($total_cred).'</b></td>';
print '<td align="right" class="nowrap"><b>'.price($total_cred-($total_deb*-1)).'</b></td>';
print '<td>&nbsp;</td>';
print '</tr>';
}

View File

@ -5255,9 +5255,10 @@ class Form
* @param int $caneditfield Add edit fields
* @param string $cssclass CSS name to use on img for photo
* @param int $genericifundef Use a generic image if no image avaiable
* @param int $addlinktofullsize Add link to fullsize image
* @return string HTML code to output photo
*/
static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0)
static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0,$addlinktofullsize=1)
{
global $conf,$langs;
@ -5303,15 +5304,15 @@ class Form
$cache='0';
if ($file && file_exists($dir."/".$file))
{
$ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
if ($addlinktofullsize) $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
$ret.='<img alt="Photo" id="photologo'.(preg_replace('/[^a-z]/i','_',$file)).'" class="'.$cssclass.'" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
$ret.='</a>';
if ($addlinktofullsize) $ret.='</a>';
}
else if ($altfile && file_exists($dir."/".$altfile))
{
$ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
if ($addlinktofullsize) $ret.='<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($file).'&cache='.$cache.'">';
$ret.='<img alt="Photo alt" id="photologo'.(preg_replace('/[^a-z]/i','_',$file)).'" class="'.$cssclass.'" '.($width?' width="'.$width.'"':'').($height?' height="'.$height.'"':'').' src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($altfile).'&cache='.$cache.'">';
$ret.='</a>';
if ($addlinktofullsize) $ret.='</a>';
}
else
{

View File

@ -1922,7 +1922,7 @@ class User extends CommonObject
$paddafterimage='';
if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"';
if ($withpictoimg > 0) $picto='<div class="inline-block valignmiddle'.($morecss?' userimg'.$morecss:'').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"')).'</div>';
else $picto='<div class="inline-block valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto').'</div>';
else $picto='<div class="inline-block valignmiddle'.($morecss?' userimg'.$morecss:'').'"'.($paddafterimage?' '.$paddafterimage:'').'>'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto',0,0).'</div>';
$result.=$picto;
}
if (abs($withpictoimg) != 2)