diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f136c1200cf54..c69f269f3019c 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -300,74 +300,74 @@ print ''.$langs->trans("CompanyInfo").''.$langs->trans("Value").''."\n"; $var=!$var; - print ''.$langs->trans("CompanyName").''; - print ''."\n"; + print ''; + print ''."\n"; $var=!$var; - print ''.$langs->trans("CompanyAddress").''; - print ''."\n"; + print ''; + print ''."\n"; $var=!$var; - print ''.$langs->trans("CompanyZip").''; - print ''."\n"; + print ''; + print ''."\n"; $var=!$var; - print ''.$langs->trans("CompanyTown").''; - print ''."\n"; + print ''; + print ''."\n"; // Country $var=!$var; - print ''.$langs->trans("Country").''; + print ''; //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation print $form->select_country($mysoc->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''."\n"; $var=!$var; - print ''.$langs->trans("State").''; + print ''; $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id'); print ''."\n"; $var=!$var; - print ''.$langs->trans("CompanyCurrency").''; + print ''; print $form->selectCurrency($conf->currency,"currency"); print ''."\n"; $var=!$var; - print ''.$langs->trans("Phone").''; - print ''; + print ''; + print ''; print ''."\n"; $var=!$var; - print ''.$langs->trans("Fax").''; - print ''; + print ''; + print ''; print ''."\n"; $var=!$var; - print ''.$langs->trans("EMail").''; - print ''; + print ''; + print ''; print ''."\n"; // Web $var=!$var; - print ''.$langs->trans("Web").''; - print ''; + print ''; + print ''; print ''."\n"; // Barcode if (! empty($conf->barcode->enabled)) { $var=!$var; - print ''.$langs->trans("Gencod").''; - print ''; + print ''; + print ''; print ''; } // Logo $var=!$var; - print ''.$langs->trans("Logo").' (png,jpg)'; + print ''; print ''; + print ''; print ''; print '
'; - print ''; + print ''; print ''; if (! empty($mysoc->logo_mini)) { @@ -387,8 +387,8 @@ // Note $var=!$var; - print '
'.$langs->trans("Note").''; - print '
'; + print '
'; @@ -404,17 +404,17 @@ // Managing Director(s) $var=!$var; - print ''.$langs->trans("ManagingDirectors").''; - print ''; + print ''; + print ''; // Capital $var=!$var; - print ''.$langs->trans("Capital").''; - print ''; + print ''; + print ''; // Forme juridique $var=!$var; - print ''.$langs->trans("JuridicalStatus").''; + print ''; if ($mysoc->country_code) { print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$mysoc->country_code); @@ -429,10 +429,10 @@ if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-') { $var=!$var; - print ''.$langs->transcountry("ProfId1",$mysoc->country_code).''; + print ''; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -445,10 +445,10 @@ if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-') { $var=!$var; - print ''.$langs->transcountry("ProfId2",$mysoc->country_code).''; + print ''; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -461,10 +461,10 @@ if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-') { $var=!$var; - print ''.$langs->transcountry("ProfId3",$mysoc->country_code).''; + print ''; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -477,10 +477,10 @@ if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-') { $var=!$var; - print ''.$langs->transcountry("ProfId4",$mysoc->country_code).''; + print ''; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -493,10 +493,10 @@ if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-') { $var=!$var; - print ''.$langs->transcountry("ProfId5",$mysoc->country_code).''; + print ''; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -509,10 +509,10 @@ if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-') { $var=!$var; - print ''.$langs->transcountry("ProfId6",$mysoc->country_code).''; + print ''; if (! empty($mysoc->country_code)) { - print ''; + print ''; } else { @@ -523,8 +523,8 @@ // TVA Intra $var=!$var; - print ''.$langs->trans("VATIntra").''; - print ''; + print ''; + print ''; print ''; print ''; @@ -539,7 +539,7 @@ $var=true; $var=!$var; - print ''.$langs->trans("FiscalMonthStart").''; + print ''; print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',1) . ''; print ""; @@ -555,19 +555,19 @@ $var=true; $var=!$var; - print ""; + print ""; print ''; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "\n"; $var=!$var; - print ""; + print ""; print ''; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "\n"; @@ -589,20 +589,20 @@ $var=true; $var=!$var; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; + print "global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).""; print ''; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); if(! isOnlyOneLocalTax(1)) { - print ''; - print ''; @@ -610,10 +610,10 @@ print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
'.$langs->trans("LTRate").': '; + print '
: '; $formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1"); } print '
'.$langs->trans("CalcLocaltax").': '; + print '
'.$langs->trans("CalcLocaltax").': '; $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1); print '
global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."
"; @@ -633,19 +633,19 @@ $var=!$var; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print "
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); - print ''; } - print ''; @@ -653,10 +653,10 @@ print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '\n"; $var=!$var; - print ""; + print ""; print '\n"; @@ -994,10 +994,10 @@ $var=true; $var=!$var; - print ""; + print ""; print '
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
'.$langs->transcountry("LTRate").': '; + print '
: '; if(! isOnlyOneLocalTax(2)) { $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2"); print '
'.$langs->trans("CalcLocaltax").': '; + print '
: '; $opcions=array($langs->transcountry("CalcLocaltax1",$mysoc->country_code),$langs->transcountry("CalcLocaltax2",$mysoc->country_code),$langs->transcountry("CalcLocaltax3",$mysoc->country_code)); print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2); print '
global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."
"; @@ -959,19 +959,19 @@ $var=true; $var=!$var; - print "
global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."
"; print "
global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."'; print ""; - print ""; + print ""; print "\n"; print "
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("VATIsNotUsedDesc")."
".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."
"; print "
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsUsedExample"?"\n":""); if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0) @@ -1022,10 +1022,10 @@ print "\n"; $var=!$var; - print ""; + print ""; print '"; + print ""; print '
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax1IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."
"; @@ -1045,10 +1045,10 @@ $var=true; $var=!$var; - print "
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsUsedExample"?"\n":""); if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0) @@ -1074,10 +1074,10 @@ print "\n"; $var=!$var; - print ""; + print ""; print '
".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; - print ""; + print ""; $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code); print ($example!="LocalTax2IsNotUsedExample"?"\n":""); print "
".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."
".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."
"; diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 0d8a26cf81fe1..4f793fe853811 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -439,42 +439,45 @@ print ''; // Name - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { if ($socid > 0) { - print ''; + print ''; print ''; - print ''; + print ''; print ''; } else { - print ''; } } // Civility - print ''; - print ''; + print ''; + print ''; $colspan=3; if ($conf->use_javascript_ajax && $socid > 0) $colspan=2; // Address if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party - print ''; + print ''; + print ''; if ($conf->use_javascript_ajax && $socid > 0) { @@ -490,13 +493,13 @@ // Zip / Town if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party - print ''; // Country - print ''; @@ -504,7 +507,7 @@ // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // EMail if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { - print ''; + print ''; + print ''; } else { @@ -539,16 +548,18 @@ print ''; // Instant message and no email - print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; @@ -570,7 +581,7 @@ print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'.$langs->trans("Firstname").'firstname).'">
lastname).'" autofocus="autofocus">firstname).'">
'.$langs->trans("Company").'
'; print $objsoc->getNomUrl(1); print '
'.$langs->trans("Company").''; + print '
'; print $form->select_company($socid,'socid','',1); print '
'.$langs->trans("UserTitle").''; + print '
'; print $formcompany->select_civility(GETPOST("civility_id",'alpha')?GETPOST("civility_id",'alpha'):$object->civility_id); print '
'.$langs->trans("PostOrFunction").'poste).'">
poste).'">
'.$langs->trans("Address"); - print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print '
/ '; print $formcompany->select_ziptown((GETPOST("zipcode")?GETPOST("zipcode"):$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; print $formcompany->select_ziptown((GETPOST("town")?GETPOST("town"):$object->town),'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans("Country").''; + print '
'; print $form->select_country((GETPOST("country_id",'alpha')?GETPOST("country_id",'alpha'):$object->country_id),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; if ($object->country_id) { print $formcompany->select_state(GETPOST("state_id",'alpha')?GETPOST("state_id",'alpha'):$object->state_id,$object->country_code,'state_id'); @@ -518,19 +521,25 @@ // Phone / Fax if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party - print '
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
phone_pro).'">phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
phone_mobile).'">fax).'">
'.$langs->trans("Email").'email).'">
email).'">'.$langs->trans("No_Email").''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).''.$form->selectyesno('no_email',(GETPOST("no_email",'alpha')?GETPOST("no_email",'alpha'):$object->no_email), 1).'
'.$langs->trans("IM").'jabberid).'">
jabberid).'">
'.$langs->trans("Skype").'skype).'">
skype).'">
'.$langs->trans("ContactVisibility").''; + print '
'; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('priv',$selectarray,(GETPOST("priv",'alpha')?GETPOST("priv",'alpha'):$object->priv),0); print '
'; // Date To Birth - print ''; - print ''; + print ''; } else { - print ''; + print ''; } print ''; @@ -664,13 +675,15 @@ print ''; // Lastname - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; + print ''; print ''; @@ -678,15 +691,16 @@ } // Civility - print ''; - print ''; + print ''; + print ''; // Address - print ''; + print ''; + print ''; $rowspan=3; if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; @@ -696,13 +710,13 @@ print ''; // Zip / Town - print ''; // Country - print ''; @@ -710,20 +724,25 @@ // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // Phone - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // EMail - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); @@ -737,10 +756,12 @@ print ''; // Jabberid - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { - print ''; + print ''; + print ''; } else { @@ -751,23 +772,24 @@ // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; // Note Public - print ''; // Note Private - print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d1b338176a41f..8dfe80368e976 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3306,7 +3306,7 @@ function selectCurrency($selected='',$htmlname='currency_id') if ($selected=='euro' || $selected=='euros') $selected='EUR'; // Pour compatibilite - $out.= ''; foreach ($langs->cache_currencies as $code_iso => $currency) { if ($selected && $selected == $code_iso) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 7728080c01b7d..fd7db5fa94fce 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -374,7 +374,7 @@ function select_civility($selected='',$htmlname='civility_id') $resql=$this->db->query($sql); if ($resql) { - $out.= ''; $out.= ''; $num = $this->db->num_rows($resql); $i = 0; @@ -453,7 +453,7 @@ function select_juridicalstatus($selected='', $country_codeid=0, $filter='') if ($resql) { $out.= '
'; - $out.= ''; if ($country_codeid) $out.= ''; $num = $this->db->num_rows($resql); @@ -772,7 +772,7 @@ function get_input_id_prof($idprof,$htmlname,$preselected,$country_code) $maxlength=$formlength; if (empty($formlength)) { $formlength=24; $maxlength=128; } - $out = ''; + $out = ''; return $out; } @@ -782,7 +782,7 @@ function get_input_id_prof($idprof,$htmlname,$preselected,$country_code) * * @param int $local LocalTax * @param int $selected Preselected value - * @param varchar $htmlname HTML select name + * @param string $htmlname HTML select name * @return void */ function select_localtax($local, $selected, $htmlname) @@ -798,7 +798,7 @@ function select_localtax($local, $selected, $htmlname) if (count($valors) > 1) { //montar select - print ''; while ($i <= (count($valors))-1) { if ($selected == $valors[$i]) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index f51cf060af898..ab924d482a742 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -760,7 +760,7 @@ function select_month($selected='',$htmlname='monthid',$useempty=0) $montharray = monthArray($langs); // Get array - $select_month = ''; if ($useempty) { $select_month .= ''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index a0eec6ffbc8fd..7ca032cf422e0 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -772,11 +772,15 @@ print '
'; print $langs->trans("ThirdPartyType").':     '; print '
'; - print ' '.$langs->trans("Company/Fundation"); + print ''; + print ''; print '     '; - print ' '.$langs->trans("Individual"); + print ''; + print ' '; + print $langs->trans("Individual"); print ' ('.$langs->trans("ToCreateContactWithSameName").')'; print '
'; print "
\n"; @@ -798,36 +802,37 @@ print '
'.$langs->trans("DateToBirth").''; + print '
'; $form=new Form($db); if ($object->birthday) { @@ -582,14 +593,14 @@ } print ''.$langs->trans("Alert").': '; + print ': '; if ($object->birthday_alert) { - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'.$langs->trans("Firstname").'firstname).'">
lastname).'" autofocus="autofocus">firstname).'">
'.$langs->trans("Company").'
'; print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):($object->socid?$object->socid:-1),'socid','',1); print '
'.$langs->trans("UserTitle").''; + print '
'; print $formcompany->select_civility(isset($_POST["civility_id"])?$_POST["civility_id"]:$object->civility_id); print '
'.$langs->trans("PostOrFunction").'poste).'">
poste).'">
'.$langs->trans("Address"); - print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print '
/ '; print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectcountry_id','state_id'),6).' '; print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans("Country").''; + print '
'; print $form->select_country(isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; print $formcompany->select_state($object->state_id,isset($_POST["country_id"])?$_POST["country_id"]:$object->country_id,'state_id'); print '
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
phone_pro).'">phone_perso).'">
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
phone_mobile).'">fax).'">
'.$langs->trans("EMail").'email).'">
email).'">
'.$langs->trans("Jabberid").'jabberid).'">
jabberid).'">'.$langs->trans("No_Email").''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).''.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'
'.$langs->trans("Skype").'skype).'">
skype).'">
'.$langs->trans("ContactVisibility").''; + print '
'; $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); print $form->selectarray('priv',$selectarray,$object->priv,0); print '
'.$langs->trans("NotePublic").''; + print '
'; $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print '
'.$langs->trans("NotePrivate").''; + print '
'; $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, 70); print $doleditor->Create(1); print '
'; // Name, firstname + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print ''; - } - print ''; + print ''; } else { - print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print ''; - } - print ''; + print ''; } + print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; + print ''; + if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field + { + print ''; + } + print ''; + // If javascript on, we show option individual if ($conf->use_javascript_ajax) { - print ''; + print ''; + print ''; print ''; - print ''; print ''; } // Prospect/Customer - print ''; + print ''; - print '
'; if ($object->particulier || $private) { - print '
'.$langs->trans('LastName').''.$langs->trans('Prefix').'
'.$langs->trans('ThirdPartyName').''.$langs->trans('Prefix').'
'.$langs->trans('Prefix').'
'.$langs->trans('FirstName').'
 
'.$langs->trans("UserTitle").''; + print '
'; print $formcompany->select_civility($object->civility_id).' 
'.$langs->trans('ProspectCustomer').'
'.$langs->trans('CustomerCode').''; + print ''; print ''; - print ''; - print '
'; $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; print ''; $s=$modCodeClient->getToolTip($langs,$object,0); print $form->textwithpicto('',$s,1); @@ -850,14 +855,14 @@ { // Supplier print '
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; // Barcode if (! empty($conf->barcode->enabled)) { - print ''; + print ''; } // Address - print ''; // Zip / Town - print ''; // Country - print ''; // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // Email web - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -925,16 +937,17 @@ $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { + $key='idprof'.$i; + if (($j % 2) == 0) print ''; $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; if(empty($conf->global->$idprof_mandatory)) - print ''; if (($j % 2) == 1) print ''; $j++; @@ -944,13 +957,13 @@ if ($j % 2 == 1) print ''; // Assujeti TVA - print ''; + print ''; print ''; - print ''; + print ''; print ''; // Type - Size - print ''; - print ''; // Legal Form - print ''; + print ''; print ''; // Capital - print ''; + print ''; // Local Taxes @@ -1037,7 +1051,7 @@ */ if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1047,7 +1061,7 @@ { // Assign a Name print ''; - print ''; + print ''; print ''; @@ -1063,7 +1077,7 @@ // Ajout du logo print ''; - print ''; + print ''; print ''; @@ -1257,12 +1271,13 @@ print '
'; $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; print ''; $s=$modCodeFournisseur->getToolTip($langs,$object,1); print $form->textwithpicto('',$s,1); @@ -866,57 +871,64 @@ } // Status - print '
'.$langs->trans('Status').''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1); print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans('Address').'
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; - print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); + print '
'; + print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; - if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code,'state_id'); + print '
'; + if ($object->country_id) print $formcompany->select_state($object->state_id,$object->country_code); else print $countrynotdefined; print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'.$idprof.''; + print ''; else - print ''.$idprof.''; + print ''; - $key='idprof'.$i; - print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code); + print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code); print '
'.$langs->trans('VATIsUsed').'
'; print $form->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation print ''.$langs->trans('VATIntra').''; - $s = ''; + $s = ''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -978,17 +991,17 @@ print '
'.$langs->trans("ThirdPartyType").''."\n"; + print '
'."\n"; print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''.$langs->trans("Staff").''; + print ''; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('JuridicalStatus').'
'; if ($object->country_id) { @@ -1001,7 +1014,8 @@ print '
'.$langs->trans('Capital').' '; + print '
'; print ''.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language(($object->default_lang?$object->default_lang:$conf->global->MAIN_LANG_DEFAULT),'default_lang',0,0,1); print '
'.$langs->trans("AllocateCommercial").''; $form->select_users((! empty($object->commercial_id)?$object->commercial_id:$user->id),'commercial_id',1); // Add current user by default print '
'.$langs->trans("Logo").''; print ''; print '
'; // Name - print ''; + print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print ''; } // Prospect/Customer - print ''; + print ''; - print '
'.$langs->trans('ThirdPartyName').'
'.$langs->trans("Prefix").''; + print '
'; // It does not change the prefix mode using the auto numbering prefix if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm) { @@ -1271,30 +1286,31 @@ } else { - print ''; + print ''; } print '
'.$langs->trans('ProspectCustomer').'
'.$langs->trans('CustomerCode').''; + print ''; print ''; - print ''; - print '
'; if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) { $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); - print ''; + print ''; } else if ($object->codeclient_modifiable()) { - print ''; + print ''; } else { @@ -1312,21 +1328,21 @@ if (! empty($conf->fournisseur->enabled) && ! empty($user->rights->fournisseur->lire)) { print '
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",$object->fournisseur,1); print ''.$langs->trans('SupplierCode').''; + print ''; print ''; + print ''; } // Status - print ''; // Address - print ''; // Zip / Town - print ''; // Country - print ''; @@ -1374,24 +1392,29 @@ // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; } // EMail / Web - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Phone / Fax - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Prof ids $i=1; $j=0; @@ -1400,16 +1423,17 @@ $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { - if (($j % 2) == 0) print ''; + $key='idprof'.$i; + + if (($j % 2) == 0) print ''; - $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; - if(empty($conf->global->$idprof_mandatory)) - print ''; if (($j % 2) == 1) print ''; $j++; @@ -1419,14 +1443,14 @@ if ($j % 2 == 1) print ''; // VAT payers - print ''; // VAT Code - print ''; + print ''; print ''; - print ''; - print ''; // Capital - print ''; + print ''; + print ''; // Default language if (! empty($conf->global->MAIN_MULTILANGS)) { - print ''; print ''; @@ -1539,7 +1564,7 @@ // Logo print ''; - print ''; + print ''; print '
'; if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { $tmpcode=$object->code_fournisseur; if (empty($tmpcode) && ! empty($modCodeFournisseur->code_auto)) $tmpcode=$modCodeFournisseur->getNextValue($object,1); - print ''; + print ''; } else if ($object->codefournisseur_modifiable()) { - print ''; + print ''; } else { @@ -1344,29 +1360,31 @@ // Barcode if (! empty($conf->barcode->enabled)) { - print '
'.$langs->trans('Gencod').''; + print '
'; print '
'.$langs->trans("Status").''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$object->status); print '
'.$langs->trans('Address').'
'.$langs->trans('Zip').''; + print '
'; print $formcompany->select_ziptown($object->zip,'zipcode',array('town','selectcountry_id','state_id'),6); - print ''.$langs->trans('Town').''; + print ''; print $formcompany->select_ziptown($object->town,'town',array('zipcode','selectcountry_id','state_id')); print '
'.$langs->trans('Country').''; + print '
'; print $form->select_country((GETPOST('country_id')!=''?GETPOST('country_id'):$object->country_id),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('State').''; + print '
'; print $formcompany->select_state($object->state_id,$object->country_code); print '
'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'
'.$langs->trans('Web').'
'.$langs->trans('Skype').'
'.$langs->trans('Phone').''.$langs->trans('Fax').'
'.$idprof.''; - else - print ''.$idprof.''; + $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; + if(empty($conf->global->$idprof_mandatory)) + print ''; + else + print ''; - $key='idprof'.$i; - print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code); + print $formcompany->get_input_id_prof($i,$key,$object->$key,$object->country_code); print '
'.$langs->trans('VATIsUsed').''; + print '
'; print $form->selectyesno('assujtva_value',$object->tva_assuj,1); print ''.$langs->trans('VATIntra').''; - $s =''; + $s =''; if (empty($conf->global->MAIN_DISABLEVATCHECK)) { @@ -1457,7 +1481,7 @@ //TODO: Place into a function to control showing by country or study better option if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { - print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { @@ -1466,7 +1490,7 @@ print ''; } - print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print ''; print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if (! isOnlyOneLocalTax(2)) { @@ -1479,7 +1503,7 @@ } elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { - print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { @@ -1492,7 +1516,7 @@ } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { - print '
'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if(! isOnlyOneLocalTax(2)) { @@ -1504,26 +1528,27 @@ } // Type - Size - print '
'.$langs->trans("ThirdPartyType").''; + print '
'; print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print ''.$langs->trans("Staff").''; + print ''; print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'.$langs->trans('JuridicalStatus').''; + print '
'; print $formcompany->select_juridicalstatus($object->forme_juridique_code,$object->country_code); print '
'.$langs->trans("Capital").' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("DefaultLang").''."\n"; + print '
'."\n"; print $formadmin->select_language($object->default_lang,'default_lang',0,0,1); print '
'.$langs->trans("Logo").''; if ($object->logo) print $form->showphoto('societe',$object,50); $caneditfield=1;