';
- print $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1);
- if (($conf->produit->enabled && $conf->service->enabled)
+ $forceall=1; // For suppliers, we always show all types
+ print $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,0,$forceall);
+ if ($forceall || ($conf->produit->enabled && $conf->service->enabled)
|| (empty($conf->produit->enabled) && empty($conf->service->enabled))) print ' ';
// Editor wysiwyg
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 135b644d705..94b167ec0cd 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -394,15 +394,17 @@ class Form
/**
* \brief Return list of types of lines (product or service)
* \param selected Preselected type
- * \param htmlname Name of field in form
+ * \param htmlname Name of field in html form
* \param showempty Add an empty field
+ * \param hidetext Do not show label before combo box
+ * \param forceall Force to show products and services in combo list, whatever are activated modules
*/
- function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0)
+ function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0)
{
global $db,$langs,$user,$conf;
// If product & services are enabled or both disabled.
- if (($conf->produit->enabled && $conf->service->enabled)
+ if ($forceall || ($conf->produit->enabled && $conf->service->enabled)
|| (empty($conf->produit->enabled) && empty($conf->service->enabled)))
{
if (empty($hidetext)) print $langs->trans("Type").': ';
@@ -425,11 +427,11 @@ class Form
print '';
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
}
- if (empty($conf->produit->enabled) && $conf->service->enabled)
+ if (! $forceall && empty($conf->produit->enabled) && $conf->service->enabled)
{
print '';
}
- if ($conf->produit->enabled && empty($conf->service->enabled))
+ if (! $forceall && $conf->produit->enabled && empty($conf->service->enabled))
{
print '';
}
diff --git a/htdocs/html.formfile.class.php b/htdocs/html.formfile.class.php
index a70fbe6d83b..296bccb3c03 100644
--- a/htdocs/html.formfile.class.php
+++ b/htdocs/html.formfile.class.php
@@ -335,11 +335,18 @@ class FormFile
}
print '
';
}
- // Recupe liste des fichiers
+ // Get list of files
$png = '';
$filter = '';
if ($iconPDF==1)
@@ -359,12 +366,12 @@ class FormFile
print '
';
}
- // Boucle sur chaque ligne trouvee
+ // Loop on each file found
foreach($file_list as $i => $file)
{
$var=!$var;
- // Defini chemin relatif par rapport au module pour lien download
+ // Define relative path for download link (depends on module)
$relativepath=$file["name"]; // Cas general
if ($filename) $relativepath=$filename."/".$file["name"]; // Cas propal, facture...
// Autre cas
@@ -373,7 +380,7 @@ class FormFile
if (!$iconPDF) print "
";
- // Affiche nom fichier avec lien download
+ // Show file name with link to download
if (!$iconPDF) print '