2
0
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:
Laurent Destailleur
2014-06-26 23:04:26 +02:00
2 changed files with 18 additions and 13 deletions

View File

@@ -3226,12 +3226,17 @@ abstract class CommonObject
if (! $user->rights->margins->liretous) return; if (! $user->rights->margins->liretous) return;
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
$marginInfo = $this->getMarginInfos($force_price); $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 '<tr class="liste_titre">';
print '<td width="30%">'.$langs->trans('Margins').'</td>'; print '<td width="30%">'.$langs->trans('Margins').'</td>';
print '<td width="20%" align="right">'.$langs->trans('SellingPrice').'</td>'; print '<td width="20%" align="right">'.$langs->trans('SellingPrice').'</td>';

View File

@@ -123,7 +123,7 @@
if (! empty($conf->margin->enabled) && empty($user->societe_id)) { if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT); $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) {?> <?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> <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 <?php