diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 1c2a62c8b62..0a5ae5df34c 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2649,7 +2649,7 @@ abstract class CommonObject
if ($conf->global->MARGIN_TYPE == "1")
print '
'.$langs->trans('BuyingPrice').'
';
else
- print '
'.$langs->trans('BuyingCost').'
';
+ print '
'.$langs->trans('CostPrice').'
';
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print '
'.$langs->trans('MarginRate').'
';
if (! empty($conf->global->DISPLAY_MARK_RATES))
@@ -3049,7 +3049,10 @@ abstract class CommonObject
print '
';
print '
'.$langs->trans('Margins').'
';
print '
'.$langs->trans('SellingPrice').'
';
- print '
'.$langs->trans('BuyingPrice').'
';
+ if ($conf->global->MARGIN_TYPE == "1")
+ print '
'.$langs->trans('BuyingPrice').'
';
+ else
+ print '
'.$langs->trans('CostPrice').'
';
print '
'.$langs->trans('Margin').'
';
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print '
'.$langs->trans('MarginRate').'
';
diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php
index 763e8d414c9..679e89429fc 100644
--- a/htdocs/core/tpl/freeproductline_create.tpl.php
+++ b/htdocs/core/tpl/freeproductline_create.tpl.php
@@ -1,148 +1,155 @@
-
- * Copyright (C) 2010-2011 Laurent Destailleur
- * Copyright (C) 2012 Christophe Battarel
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- * Need to have following variables defined:
- * $conf
- * $langs
- * $dateSelector
- * $this (invoice, order, ...)
- * $line defined
- */
-
-$usemargins=0;
-if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
-
-?>
-
-
-
-
-
+
diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php
index 07178b42bb2..7ccf1f63407 100644
--- a/htdocs/core/tpl/predefinedproductline_create.tpl.php
+++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php
@@ -1,200 +1,207 @@
-
- * Copyright (C) 2010-2012 Laurent Destailleur
- * Copyright (C) 2012 Christophe Battarel
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- *
- * Need to have following variables defined:
- * $conf
- * $langs
- * $dateSelector
- * $this (invoice, order, ...)
- * $line defined
- */
-
+
+ * Copyright (C) 2010-2012 Laurent Destailleur
+ * Copyright (C) 2012 Christophe Battarel
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Need to have following variables defined:
+ * $conf
+ * $langs
+ * $dateSelector
+ * $this (invoice, order, ...)
+ * $line defined
+ */
+
$usemargins=0;
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
-
-?>
-
-
-
-