forked from Wavyzz/dolibarr
Merge branch 'patch-11' of github.com:defrance69/dolibarr into
defrance69-patch-11 Conflicts: htdocs/core/class/commonobject.class.php
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user