diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 58c9950898c..d28b867dc93 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -888,4 +888,44 @@ class FormCompany
}
}
}
+
+ function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname='customerprospect', $typeinput='form',$morecss = '') {
+
+ global $conf,$langs;
+
+ $out = '';
+
+ return $out;
+ }
}
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index d92a0b47bcc..99b92e67074 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1854,4 +1854,5 @@ OnMobileOnly=On small screen (smartphone) only
DisableProspectCustomerType=Disable the "Prospect + Customer" third party type (so third party must be Prospect or Customer but can't be both)
MAIN_OPTIMIZEFORTEXTBROWSER=Simplify interface for blind person
MAIN_OPTIMIZEFORTEXTBROWSERDesc=Enable this option if you are a blind person, or if you use the application from a text browser like Lynx or Links.
-ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s'
\ No newline at end of file
+ThisValueCanOverwrittenOnUserLevel=This value can be overwritten by each user from its user page - tab '%s'
+DefaultCustomerType=Default thirdparty type for "New customer" creation form
\ No newline at end of file
diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php
index 6f808b8307a..e283d3220b2 100644
--- a/htdocs/societe/admin/societe.php
+++ b/htdocs/societe/admin/societe.php
@@ -28,6 +28,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
$langs->loadLangs(array("admin", "companies", "other"));
@@ -36,6 +37,8 @@ $value=GETPOST('value', 'alpha');
if (!$user->admin) accessforbidden();
+$formcompany = new FormCompany($db);
+
/*
@@ -101,6 +104,21 @@ if ($action == 'updateoptions')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
+
+ if (GETPOST('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT'))
+ {
+ $customertypedefault = GETPOST('defaultcustomertype', 'int');
+ $res = dolibarr_set_const($db, "THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault, 'chaine', 0, '', $conf->entity);
+ if (! $res > 0) $error++;
+ if (! $error)
+ {
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
+ }
+ else
+ {
+ setEventMessages($langs->trans("Error"), null, 'errors');
+ }
+ }
}
// Activate a document generator module
@@ -306,7 +324,6 @@ if($action=='setonsearchandlistgooncustomerorsuppliercard'){
}
}
-
/*
* View
*/
@@ -861,44 +878,16 @@ else
print '';
print '';
-/*print '