diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 0d8a26cf81f..4f793fe8538 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -439,42 +439,45 @@ else 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 @@ else // 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 @@ else // 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 @@ else print ''; // Instant message and no email - print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; @@ -570,7 +581,7 @@ else 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 @@ else // 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 @@ else print ''; // Lastname - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; + print ''; print ''; @@ -678,15 +691,16 @@ else } // Civility - print ''; - print ''; + print ''; + print ''; // Address - print ''; + print ''; + print ''; $rowspan=3; if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; @@ -696,13 +710,13 @@ else print ''; // Zip / Town - print ''; // Country - print ''; @@ -710,20 +724,25 @@ else // 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 @@ else print ''; // Jabberid - print ''; + print ''; + print ''; if (! empty($conf->mailing->enabled)) { - print ''; + print ''; + print ''; } else { @@ -751,23 +772,24 @@ else // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; + print ''; } // Visibility - print ''; // Note Public - print ''; // Note Private - print ''; diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 6f868dd81c8..183f713aa96 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -374,7 +374,7 @@ class FormCompany $resql=$this->db->query($sql); if ($resql) { - $out.= ''; $out.= ''; $num = $this->db->num_rows($resql); $i = 0; @@ -772,7 +772,7 @@ class FormCompany $maxlength=$formlength; if (empty($formlength)) { $formlength=24; $maxlength=128; } - $out = ''; + $out = ''; return $out; } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index f5c1237ef05..7ca032cf422 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -805,14 +805,14 @@ else print 'global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>'; - print ''; + print ''; if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print ''; @@ -831,7 +831,8 @@ else } // Prospect/Customer - print ''; + print ''; - print ''; print ''; @@ -883,7 +884,8 @@ else } // Address - print ''; @@ -912,7 +914,8 @@ else // Email web print ''; print ''; - print ''; + print ''; + print ''; // Skype if (! empty($conf->skype->enabled)) @@ -934,16 +937,17 @@ else $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++; @@ -953,7 +957,7 @@ else if ($j % 2 == 1) print ''; // Assujeti TVA - print ''; + print ''; print ''; @@ -987,11 +991,11 @@ else print ''; // Type - Size - print ''; - print ''; @@ -1268,7 +1272,7 @@ else // Name print ''; - print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field @@ -1288,7 +1292,8 @@ else } // Prospect/Customer - print ''; + print ''; - print ''; print ''; // Address - print ''; @@ -1417,16 +1423,17 @@ else $idprof=$langs->transcountry('ProfId'.$i,$object->country_code); if ($idprof!='-') { - if (($j % 2) == 0) print ''; + $key='idprof'.$i; - $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; - if(empty($conf->global->$idprof_mandatory)) - print ''; - $key='idprof'.$i; - print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code); + $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_MANDATORY'; + if(empty($conf->global->$idprof_mandatory)) + print ''; if (($j % 2) == 1) print ''; $j++; @@ -1436,7 +1443,7 @@ else if ($j % 2 == 1) print ''; // VAT payers - print ''; @@ -1474,7 +1481,7 @@ else //TODO: Place into a function to control showing by country or study better option if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { - print ''; - print '';
'.$langs->trans("DateToBirth").''; + print '
'; $form=new Form($db); if ($object->birthday) { @@ -582,14 +593,14 @@ else } 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 '
'; if ($object->particulier || $private) { - print ''; + print ''; } else { - print ''; + print ''; } print ''.$langs->trans('Prefix').'
'.$langs->trans('ProspectCustomer').'
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",(isset($_POST['fournisseur'])?GETPOST('fournisseur'):$object->fournisseur),1); print ''; @@ -870,7 +871,7 @@ else } // Status - print '
'.$langs->trans('Status').''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),1); print '
'.$langs->trans('Address').'
'.$langs->trans('Web').'
'.$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("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('ProspectCustomer').'
'.$langs->trans('Supplier').''; + print ''; print $form->selectyesno("fournisseur",$object->fournisseur,1); print ''; @@ -1361,12 +1366,13 @@ else } // Status - print '
'.$langs->trans("Status").''; + print '
'; print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$object->status); print '
'.$langs->trans('Address').'
'.$idprof.''; - else - print ''.$idprof.''; + if (($j % 2) == 0) print '
'; + else + print ''; + + 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->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'; print $form->selectyesno('localtax1assuj_value',$object->localtax1_assuj,1); if(! isOnlyOneLocalTax(1)) { @@ -1483,7 +1490,7 @@ else print ''; } - print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print ''; print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); if (! isOnlyOneLocalTax(2)) { @@ -1496,7 +1503,7 @@ else } 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)) { @@ -1509,7 +1516,7 @@ else } 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)) { @@ -1521,11 +1528,11 @@ else } // 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 '