Skip to content
Snippets Groups Projects
Commit 338ad5ad authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch 'defrance69-patch-11' into develop

parents d5e0bcfa 29dfb71b
No related branches found
No related tags found
No related merge requests found
......@@ -3230,8 +3230,13 @@ abstract class CommonObject
$marginInfo = $this->getMarginInfos($force_price);
print '<table class="nobordernopadding" width="100%">';
if (! empty($conf->global->MARGININFO_HIDE_SHOW))
{
print "<img onclick=\"$('.margininfos').toggle();\" src='".img_picto($langs->trans("Hide")."/".$langs->trans("Show"),'object_margin.png','','',1)."'>";
if ($conf->global->MARGININFO_HIDE_SHOW == 2) print '<script>$(document).ready(function() {$(".margininfos").hide();});</script>'; // hide by default
}
print '<table class="nobordernopadding margintable" width="100%">';
print '<tr class="liste_titre">';
print '<td width="30%">'.$langs->trans('Margins').'</td>';
print '<td width="20%" align="right">'.$langs->trans('SellingPrice').'</td>';
......
......@@ -123,7 +123,7 @@
if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
?>
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->pa_ht); ?></td>
<td align="right" class="nowrap"><?php $coldisplay++; ?><div class="margininfos"><?php echo price($line->pa_ht); ?></div></td>
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) {?>
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
<?php
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment