Merge remote-tracking branch 'Dolibarr/10.0' into 10.0

This commit is contained in:
Nicolas ZABOURI 2019-06-17 14:58:43 +02:00
commit 8e9596bdd2
2 changed files with 6 additions and 6 deletions

View File

@ -908,7 +908,7 @@ class FormCompany
$out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">'; $out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">';
if ($typeinput=='form') { if ($typeinput=='form') {
if ($selected == '') $out .= '<option value="-1">&nbsp;</option>'; if ($selected == '' || $selected == '-1') $out .= '<option value="-1">&nbsp;</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
$out .= '<option value="2"'.($selected==2?' selected':'').'>'.$langs->trans('Prospect').'</option>'; $out .= '<option value="2"'.($selected==2?' selected':'').'>'.$langs->trans('Prospect').'</option>';
} }
@ -920,7 +920,7 @@ class FormCompany
} }
$out .= '<option value="0"'.((string) $selected == '0'?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>'; $out .= '<option value="0"'.((string) $selected == '0'?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
} elseif ($typeinput=='list') { } elseif ($typeinput=='list') {
$out .= '<option value="-1"'.($selected==''?' selected':'').'>&nbsp;</option>'; $out .= '<option value="-1"'.(($selected=='' || $selected == '-1')?' selected':'').'>&nbsp;</option>';
if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
$out .= '<option value="1,3"'.($selected=='1,3'?' selected':'').'>'.$langs->trans('Customer').'</option>'; $out .= '<option value="1,3"'.($selected=='1,3'?' selected':'').'>'.$langs->trans('Customer').'</option>';
} }

View File

@ -952,10 +952,10 @@ else
$object->name = GETPOST('name', 'alpha'); $object->name = GETPOST('name', 'alpha');
$object->firstname = GETPOST('firstname', 'alpha'); $object->firstname = GETPOST('firstname', 'alpha');
$object->particulier = $private; $object->particulier = $private;
$object->prefix_comm = GETPOST('prefix_comm'); $object->prefix_comm = GETPOST('prefix_comm', 'alpha');
$object->client = GETPOST('client')?GETPOST('client'):$object->client; $object->client = GETPOST('client', 'int')?GETPOST('client', 'int'):$object->client;
if(empty($duplicate_code_error)) { if (empty($duplicate_code_error)) {
$object->code_client = GETPOST('customer_code', 'alpha'); $object->code_client = GETPOST('customer_code', 'alpha');
$object->fournisseur = GETPOST('fournisseur')?GETPOST('fournisseur'):$object->fournisseur; $object->fournisseur = GETPOST('fournisseur')?GETPOST('fournisseur'):$object->fournisseur;
} }
@ -1187,7 +1187,7 @@ else
// Prospect/Customer // Prospect/Customer
print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).'</td>'; print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).'</td>';
print '<td class="maxwidthonsmartphone">'; print '<td class="maxwidthonsmartphone">';
$selected=GETPOST('client', 'int')!=''?GETPOST('client', 'int'):$object->client; $selected=(GETPOSTISSET('client', 'int')?GETPOST('client', 'int'):$object->client);
print $formcompany->selectProspectCustomerType($selected); print $formcompany->selectProspectCustomerType($selected);
print '</td>'; print '</td>';