From 557e4268e29091d38bdeb20aaecc5c73cc381caa Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Sun, 10 Jan 2010 22:16:25 +0000
Subject: [PATCH] Restore ability to use supplier on interventions as some
 users (like me) need it.

---
 htdocs/fichinter/fiche.php | 2 +-
 htdocs/html.form.class.php | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php
index 334a90d07c2..5a2f8ef8cc2 100644
--- a/htdocs/fichinter/fiche.php
+++ b/htdocs/fichinter/fiche.php
@@ -492,7 +492,7 @@ if ($_GET["action"] == 'create')
 		print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="GET">';
 		print '<table class="border" width="100%">';
 		print '<tr><td>'.$langs->trans("Company").'</td><td>';
-		$html->select_societes('','socid','s.fournisseur=0',1);
+		$html->select_societes('','socid','',1,1);
 		print '</td></tr>';
 		print '<tr><td colspan="2" align="center">';
 		print '<input type="hidden" name="action" value="create">';
diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 77c0ea30b20..3229cad0b7d 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -553,8 +553,8 @@ class Form
 						if ($showtype)
 						{
 							if ($obj->client || $obj->fournisseur) $label.=' (';
-							if ($obj->client == 1) $label.=$langs->trans("Customer");
-							if ($obj->client == 2) $label.=$langs->trans("Prospect");
+							if ($obj->client == 1 || $obj->client == 3) $label.=$langs->trans("Customer");
+							if ($obj->client == 2 || $obj->client == 3) $label.=($obj->client==3?', ':'').$langs->trans("Prospect");
 							if ($obj->fournisseur) $label.=($obj->client?', ':'').$langs->trans("Supplier");
 							if ($obj->client || $obj->fournisseur) $label.=')';
 						}
-- 
GitLab