diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 32d934f4835..3a3062d09b7 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -521,7 +521,7 @@ if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POS
$date_end='';
$date_start=dol_mktime(0, 0, 0, $_POST['date_start'.$suffixe.'month'], $_POST['date_start'.$suffixe.'day'], $_POST['date_start'.$suffixe.'year']);
$date_end=dol_mktime(0, 0, 0, $_POST['date_end'.$suffixe.'month'], $_POST['date_end'.$suffixe.'day'], $_POST['date_end'.$suffixe.'year']);
- $description=dol_htmlcleanlastbr($_POST['eldesc']);
+ $description=dol_htmlcleanlastbr($_POST['desc']);
// Define info_bits
$info_bits=0;
@@ -1664,7 +1664,7 @@ else
if (!empty($object->lines))
{
$object->print_title_list();
- $object->printLinesList(0,$mysoc,$soc);
+ $object->printLinesList(1,$mysoc,$soc);
}
$numlines=sizeof($object->lines);
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index e5adb3a9105..adee547db8a 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2655,7 +2655,7 @@ else
if (!empty($object->lines))
{
$object->print_title_list();
- $object->printLinesList(0,$mysoc,$soc);
+ $object->printLinesList(1,$mysoc,$soc);
}
/*
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 0e0029a1a33..c3565de4a9f 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -1383,7 +1383,11 @@ class CommonObject
}
/**
- * Return HTML with object lines list
+ * Return HTML with object lines list.
+ * Array $this->lines must be defined.
+ * @param $dateSelector Show date input fields (if service)
+ * @param $seller Object of seller third party
+ * @param uyer Object of buyer third party
* FIXME This must be moved into a html.class file instead of a business class.
*/
function printLinesList($dateSelector=0,$seller,$buyer)
diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php
index 33029073f01..00fa589a710 100644
--- a/htdocs/core/tpl/freeproductline_create.tpl.php
+++ b/htdocs/core/tpl/freeproductline_create.tpl.php
@@ -17,6 +17,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
+ *
+ * Need to have following variables defined:
+ * $conf
+ * $langs
+ * $dateSelector
+ * $this (invoice, order, ...)
+ * $line defined
*/
?>
diff --git a/htdocs/core/tpl/freeproductline_edit.tpl.php b/htdocs/core/tpl/freeproductline_edit.tpl.php
index c5f2af84aaa..2cf7d0d8bd2 100644
--- a/htdocs/core/tpl/freeproductline_edit.tpl.php
+++ b/htdocs/core/tpl/freeproductline_edit.tpl.php
@@ -18,7 +18,12 @@
*
* $Id$
*
- * Need to have object $this (invoice, order, ...) and $line defined
+ * Need to have following variables defined:
+ * $conf
+ * $langs
+ * $dateSelector
+ * $this (invoice, order, ...)
+ * $line defined
*/
?>
@@ -67,7 +72,7 @@
">
-service->enabled && $dateSelector) { ?>
+service->enabled && $dateSelector && $line->product_type == 1) { ?>