diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 180f95e2d4e..1f31ae67d19 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -58,7 +58,7 @@ if (!empty($conf->variants->enabled)) { } // Load translation files required by the page -$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings')); +$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings', 'other')); if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); if (! empty($conf->margin->enabled)) $langs->load('margins'); diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index ee34654f2f2..12505a92a7e 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -138,22 +138,20 @@ if ($nolinesbefore) { print ''; } if (! empty($usemargins)) - { - if (!empty($user->rights->margins->creer)) { - ?> - - rights->margins->creer)) { + $colspan++; + } + else { + print ''; + if ($conf->global->MARGIN_TYPE == "1") + echo $langs->trans('BuyingPrice'); + else + echo $langs->trans('CostPrice'); + echo ''; + if (! empty($conf->global->DISPLAY_MARGIN_RATES)) echo ''.$langs->trans('MarginRate').''; + if (! empty($conf->global->DISPLAY_MARK_RATES)) echo ''.$langs->trans('MarkRate').''; } - else $colspan++; - - if ($conf->global->MARGIN_TYPE == "1") - echo $langs->trans('BuyingPrice'); - else - echo $langs->trans('CostPrice'); - echo ''; - if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARGIN_RATES)) echo ''.$langs->trans('MarginRate').''; - if ($user->rights->margins->creer && ! empty($conf->global->DISPLAY_MARK_RATES)) echo ''.$langs->trans('MarkRate').''; } ?>   @@ -439,20 +437,16 @@ if ($nolinesbefore) { { if (!empty($user->rights->margins->creer)) { $coldisplay++; - ?> - - - product->enabled) || ! empty($conf->service->enabled)) { ?> - - - - "> - - rights->margins->creer) - { + ?> + + + product->enabled) || ! empty($conf->service->enabled)) { ?> + + + + "> + + global->DISPLAY_MARGIN_RATES)) { echo '%'; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 82eb44c3b9b..c14e5c20cf7 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -218,10 +218,10 @@ $coldisplay=0; product->enabled) || ! empty($conf->service->enabled)) { ?> - + - + subprice < 0) echo ''.$margin_rate.'%'; else - echo '%'; + echo '%'; $coldisplay++; } elseif (! empty($conf->global->DISPLAY_MARK_RATES)) @@ -243,7 +243,7 @@ $coldisplay=0; if ($line->subprice < 0) echo ''.$mark_rate.'%'; else - echo '%'; + echo '%'; $coldisplay++; } } diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 84681f049c4..4c1e1b3adbf 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -42,7 +42,7 @@ if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propa if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; // Load translation files required by the page -$langs->loadLangs(array('orders',"companies","bills",'propal','deliveries','stocks',"productbatch",'incoterm')); +$langs->loadLangs(array('orders',"companies","bills",'propal','deliveries','stocks',"productbatch",'incoterm','other')); $id = GETPOST('id', 'int'); // id of order $ref = GETPOST('ref', 'alpha');