diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 7641cecf9fb..1e88c25a92f 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -822,8 +822,7 @@ else
print '
';
if ($conf->produit->enabled && $fac->lignes[$i]->fk_product)
{
- print '';
- $product_static=new ProductFournisseur($db);
+ print '';
$product_static->fetch($fac->lignes[$i]->fk_product);
$text=$product_static->getNomUrl(1);
$text.= ' - '.$product_static->libelle;
@@ -832,8 +831,8 @@ else
}
else
{
- // TODO Select type (service or product)
-
+ print $html->select_type_of_lines($fac->lignes[$i]->product_type,'type',1);
+ if ($conf->produit->enabled && $conf->service->enabled) print ' ';
}
// Description - Editor wysiwyg
@@ -873,12 +872,20 @@ else
print ' | ';
if ($fac->lignes[$i]->fk_product)
{
+ print ''; // ancre pour retourner sur la ligne
+
$product_static=new ProductFournisseur($db);
$product_static->fetch($fac->lignes[$i]->fk_product);
$text=$product_static->getNomUrl(1);
$text.= ' - '.$product_static->libelle;
- print $text;
- print ' ';
+ $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($fac->lignes[$i]->description));
+ print $html->textwithtooltip($text,$description,3,'','',$i);
+
+ // Show range
+ print_date_range($objp->date_start,$objp->date_end);
+
+ // Add description in form
+ if ($conf->global->PRODUIT_DESC_IN_FORM) print ($objp->description && $objp->description!=$objp->product)?' '.dol_htmlentitiesbr($objp->description):'';
}
// Description - Editor wysiwyg
diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php
index 846e7118fd3..5fea1a9b6ac 100644
--- a/htdocs/fourn/fournisseur.facture.class.php
+++ b/htdocs/fourn/fournisseur.facture.class.php
@@ -153,7 +153,8 @@ class FactureFournisseur extends Facture
$this->lignes[$i]->qty,
$this->lignes[$i]->fk_product,
'HT',
- $this->lignes[$i]->info_bits
+ $this->lignes[$i]->info_bits,
+ $this->lignes[$i]->product_type
);
}
}
@@ -240,9 +241,7 @@ class FactureFournisseur extends Facture
$this->db->free($resql);
- /*
- * Lignes
- */
+ // Lines
$result=$this->fetch_lines();
if ($result < 0)
{
@@ -328,8 +327,7 @@ class FactureFournisseur extends Facture
/**
- * \brief Recup�re l'objet fournisseur li� � la facture
- *
+ * \brief Load supplier
*/
function fetch_fournisseur()
{
|