';
$disabled=0;
$langs->load("companies");
if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice
-$form->select_societes(GETPOST('socid')?GETPOST('socid'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',!$disabled,$disabled,1);
+print $form->select_company(GETPOST('socid')?GETPOST('socid'):$conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',!$disabled,$disabled,1);
//print '';
print '
';
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8962f7add5d..09f352c7ec0 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -609,28 +609,13 @@ class Form
/**
* Output html form to select a third party
*
- * @param string $selected Preselected type
- * @param string $htmlname Name of field in form
- * @param string $filter Optionnal filters criteras
+ * @param string $selected Preselected type
+ * @param string $htmlname Name of field in form
+ * @param string $filter Optionnal filters criteras
* @param int $showempty Add an empty field
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
* @param int $forcecombo Force to use combo box
- * @return void
- */
- function select_societes($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0)
- {
- print $this->select_company($selected,$htmlname,$filter,$showempty,$showtype,$forcecombo);
- }
-
- /**
- * Output html form to select a third party
- *
- * @param selected Preselected type
- * @param htmlname Name of field in form
- * @param filter Optionnal filters criteras
- * @param showempty Add an empty field
- * @param showtype Show third party type in combolist (customer, prospect or supplier)
- * @param forcecombo Force to use combo box
+ * @return string HTML string with
*/
function select_company($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0)
{
@@ -647,7 +632,7 @@ class Form
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$sql.= " ORDER BY nom ASC";
- dol_syslog("Form::select_societes sql=".$sql);
+ dol_syslog(get_class($this)."::select_company sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
{
@@ -2649,11 +2634,11 @@ class Form
}
/**
- * Affiche formulaire de selection des tiers
+ * Output html select to select thirdparty
*
- * @param page Page
- * @param selected Id contact pre-selectionne
- * @param htmlname Nom du formulaire select
+ * @param string $page Page
+ * @param string $selected Id preselected
+ * @param string $htmlname Name of HTML select
* @return void
*/
function form_thirdparty($page, $selected='', $htmlname='socid')
@@ -2667,7 +2652,7 @@ class Form
print '';
print '