diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 71e772c938e..d1ee6e4722a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1539,11 +1539,12 @@ class Adherent extends CommonObject */ function getCivilityLabel() { - global $langs; - $langs->load("dict"); - - $code=$this->civilite_id; - return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code); + global $langs; + $langs->load("dict"); + + $code=(! empty($this->civilite_id)?$this->civilite_id:(! empty($this->civility_id)?$this->civility_id:'')); + if (empty($code)) return ''; + return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code); } /** diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index 573d0987b4c..9d84058fa87 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -170,6 +170,7 @@ class MailingTargets // This can't be abstract as it is used for some method $sql .= "'".$this->db->escape($targetarray['other'])."',"; $sql .= "'".$this->db->escape($targetarray['source_url'])."',"; $sql .= "'".$this->db->escape($targetarray['source_id'])."',"; + $sql .= (empty($targetarray['source_id']) ? 'null' : "'".$this->db->escape($targetarray['source_id'])."'").","; if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) { $sql .= "'".$this->db->escape(md5($targetarray['email'].';'.$targetarray['name'].';'.$mailing_id.';'.$conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY))."',"; } diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index de316c289dd..1a6829f5711 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -263,7 +263,7 @@ class modSociete extends DolibarrModules $this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Number",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.code_compta'=>"Text",'s.code_compta_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code','d.nom'=>'Text'); $this->export_entities_array[$r]=array(); // We define here only fields that use another picto // Add extra fields - $sql="SELECT name, label, type FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; + $sql="SELECT name, label, type FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe'"; $resql=$this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) { diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index b1a48fb9b5a..ad52a60d02b 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=Qualsevol altre caràcter a la màscara es quedarà sense canv GenericMaskCodes4a=Exemple a la 99ª %s del tercer L'Empresa realitzada el 31/03/2007:
GenericMaskCodes4b=Exemple sobre un tercer creat el 31/03/2007:
GenericMaskCodes4c=Exemple en un producte/servei creat el 31/03/2007:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} donarà ABC0703-000099
{0000+100}-XXX/{dd}/YYY donarà 0199-XXX/31/YYY +GenericMaskCodes5=ABC{yy}{mm}-{000000} donarà ABC0703-000099
{0000+100@1}-XXX/{dd}/YYY donarà 0199-XXX/31/YYY GenericNumRefModelDesc=Retorna un nombre creat d'acord amb una màscara definida. ServerAvailableOnIPOrPort=Servidor disponible a l'adreça %s al port %s ServerNotAvailableOnIPOrPort=Servidor no disponible en l'adreça %s al port %s diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 3975ae9a43e..6dbe3919e29 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -285,16 +285,6 @@ DownloadPackageFromWebSite=Μεταφόρτωση πακέτου. # CurrentVersion=Dolibarr current version # CallUpdatePage=Go to the page that updates the database structure and datas: %s. LastStableVersion=Τελευταία σταθερή έκδοση -GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:
{000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask.
{000000+000} same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s.
{000000@x} same as previous but the counter is reset to zero when month x is reached (x between 1 and 12). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required.
{dd} day (01 to 31).
{mm} month (01 to 12).
{yy}, {yyyy} or {y} year over 2, 4 or 1 numbers.
-GenericMaskCodes2={cccc} the client code
{cccc000} the client code on n characters is followed by a client's ref counter without offset and zeroized with the global counter.
{tttt} The code of company type on n characters (see dictionnary-company types).
-GenericMaskCodes3=All other characters in the mask will remain intact.
Spaces are not allowed.
-GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany done 2007-01-31:
-GenericMaskCodes4b=Example on third party created on 2007-03-01:
-# GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
{0000+100}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX -GenericNumRefModelDesc=Return a customizable number according to a defined mask. -ServerAvailableOnIPOrPort=Server is available at address %s on port %s -ServerNotAvailableOnIPOrPort=Server is not available at address %s on port %s DoTestServerAvailability=Έλεγχος διασύνδεσης server DoTestSend=Δοκιμή Αποστολής # DoTestSendHTML=Test sending HTML diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 90c7489089e..d9ed728f87b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -290,7 +290,7 @@ GenericMaskCodes3=All other characters in the mask will remain intact.
Spaces GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany done 2007-01-31:
GenericMaskCodes4b=Example on third party created on 2007-03-01:
GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
{0000+100}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX +GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
{0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX GenericNumRefModelDesc=Returns a customizable number according to a defined mask. ServerAvailableOnIPOrPort=Server is available at address %s on port %s ServerNotAvailableOnIPOrPort=Server is not available at address %s on port %s diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index eca9d9062ac..53e2e89cf0b 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=Cualquier otro carácter en la máscara se quedará sin cambio GenericMaskCodes4a=Ejemplo en la 99 ª %s del tercero La Empresa realizada el 31/03/2007:
GenericMaskCodes4b=Ejemplo sobre un tercero creado el 31/03/2007:
GenericMaskCodes4c=Ejemplo en un producto/servicio creado el 31/03/2007:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} dará ABC0703-000099
{0000+100}-XXX/{dd}/YYY daráa 0199-XXX/31/YYY +GenericMaskCodes5=ABC{yy}{mm}-{000000} dará ABC0703-000099
{0000+100@1}-XXX/{dd}/YYY daráa 0199-XXX/31/YYY GenericNumRefModelDesc=Devuelve un número creado acorde a una máscara definida. ServerAvailableOnIPOrPort=Servidor disponible en la dirección %s en el puerto %s ServerNotAvailableOnIPOrPort=Servidor no disponible en la dirección %s en el puerto %s diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index f3b134eec83..b97aa7b3c81 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=Tout autre caractère dans le masque sera laissé inchangé.Exemple sur la 99eme %s du tiers LaCompanie faite le 31/03/2007 :
GenericMaskCodes4b=Exemple sur un tiers créé le 31/03/2007 :
GenericMaskCodes4c=Exemple sur un produit/service créé le 31/03/2007 :
-GenericMaskCodes5=ABC{yy}{mm}-{000000} donnera ABC0703-000099
{0000+100}-XXX-{dd}-YYY donnera 0199-XXX-31-YYY +GenericMaskCodes5=ABC{yy}{mm}-{000000} donnera ABC0703-000099
{0000+100@1}-XXX-{dd}-YYY donnera 0199-XXX-31-YYY GenericNumRefModelDesc=Renvoie un numéro personnalisable selon un masque à définir. ServerAvailableOnIPOrPort=Serveur disponible à l'adresse %s sur le port %s ServerNotAvailableOnIPOrPort=Serveur non disponible à l'adresse %s sur le port %s diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index c3117dcf7d7..361eac602d7 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -566,7 +566,7 @@ TotalWoman=Totale TotalMan=Total NeverReceived=Jamais reçu Canceled=Annulé -YouCanChangeValuesForThisListFromDictionnarySetup=Vous pouvez changer ces valeurs depuis le menu accueil - configuration - dictionnaires +YouCanChangeValuesForThisListFromDictionnarySetup=Vous pouvez changer les valeurs de cette liste depuis le menu accueil - configuration - dictionnaires Color=Couleur Documents=Fichiers joints DocumentsNb=Fichiers joints (%s) diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index 1801334a007..8b9c1df6771 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=Tutti gli altri caratteri nello schema rimarranno inalterati. GenericMaskCodes4a=Esempio sulla novantanovesima %s del terzo TheCompany fatta il 31/01/2007:
GenericMaskCodes4b=Esempio : il 99esimo cliente/fornitore viene creato 31/01/2007:
# GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5= ABC{yy}{mm}-{000000} darà ABC0701-000099
{0000+100}-ZZZ/{dd}/XXX darà 0199-ZZZ/31/XXX +GenericMaskCodes5= ABC{yy}{mm}-{000000} darà ABC0701-000099
{0000+100@1}-ZZZ/{dd}/XXX darà 0199-ZZZ/31/XXX GenericNumRefModelDesc=Restituisce un numero personalizzabile in base allo schema definito dalla maschera. ServerAvailableOnIPOrPort=Il server è disponibile all'indirizzo %s sulla porta %s ServerNotAvailableOnIPOrPort=Il server non è disponibile all'indirizzo %s sulla porta %s diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index 0a8b774e5b1..28734293c10 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -291,7 +291,6 @@ GenericMaskCodes3=Alle andre tegn i masken vil være intakt.
Mellomrom er i GenericMaskCodes4a=Eksempel på 99nde %s av tredje part TheCompany gjort 2007-01-31:
GenericMaskCodes4b=Eksempel på tredjeparts opprettet på 2007-03-01:
# GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC (åå) (mm) - (000000) vil gi ABC0701-000099
(0000)-ZZZ 100 / dd () / XXX vil gi 0199-ZZZ/31/XXX GenericNumRefModelDesc=Gir et egendefinert nummer etter en definert mal. ServerAvailableOnIPOrPort=Serveren er tilgjengelig på adressen %s på port %s ServerNotAvailableOnIPOrPort=Serveren er ikke tilgjengelig på adressen %s på port %s diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index bfb1655bf02..6dd1e940d3d 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=Alle andere karakters in het masker zullen intact blijven.
GenericMaskCodes4a=Voorbeeld van de 99e %s van de Klant 'HetBedrijf' gedaan op 2007-01-31:
GenericMaskCodes4b=Voorbeeld van een Klant gecreëerd op 2007-03-01:
# GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC{jj}{mm}-{000000} zal ABC0701-000099 geven
{0000+100}-ZZZ/{dd}/XXX zal 0199-ZZZ/31/XXX geven +GenericMaskCodes5=ABC{jj}{mm}-{000000} zal ABC0701-000099 geven
{0000+100@1}-ZZZ/{dd}/XXX zal 0199-ZZZ/31/XXX geven GenericNumRefModelDesc=Geeft een aanpasbaar nummer volgens een gedefinieerd masker. ServerAvailableOnIPOrPort=Server is beschikbaar op het IP-adres %s met poort %s ServerNotAvailableOnIPOrPort=Server is niet beschikbaar op het IP-adres %s met poort %s diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index 42179f8d85c..4e94e0389e4 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -380,7 +380,6 @@ LinkToTest=Link clicável gerado por usuário %s (clique no nú KeepEmptyToUseDefault=Mantenha vazio para usar o valor default DefaultLink=link padrão ValueOverwrittenByUserSetup=Atenção, este valor pode ser substituído por configuração específica do usuário (cada usuário pode definir sua própria url clicktodial) - # Modules Module0Name=Usuários e Grupos Module0Desc=Usuários e gestão de grupos diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index 7e387bceae2..715a745047f 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=Qualquer outro caractere na máscara fica sem alterações. < GenericMaskCodes4a=Exemplo em 99 ª %s o Terceiro a Empresa realizada em 31/03/2007:
GenericMaskCodes4b=Exemplo sobre um Terceiro criado em 31/03/2007:
# GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} dará ABC0703-000099
{0000+100}-XXX/{dd}/YYY dará 0199-XXX/31/YYY +GenericMaskCodes5=ABC{yy}{mm}-{000000} dará ABC0703-000099
{0000+100@1}-XXX/{dd}/YYY dará 0199-XXX/31/YYY GenericNumRefModelDesc=Devolve um número criado na linha numa máscara definida. ServerAvailableOnIPOrPort=Servidor disponivel no endereço %s na porta %s ServerNotAvailableOnIPOrPort=Servidor não disponivel no endereço %s na Porta %s diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index dbf7642002a..01b95667259 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=Vsi ostali znaki v maski bodo ostali nedotaknjeni.
Presledk GenericMaskCodes4a=Primer 99-ega %s partnerja podjetja narejen 2007-01-31:
GenericMaskCodes4b=Primer partnerja 99, kreiranega 2007-03-01:
# GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} bo dal rezultat ABC0701-000099
{0000+100}-ZZZ/{dd}/XXX bo dal rezultat 0199-ZZZ/31/XXX +GenericMaskCodes5=ABC{yy}{mm}-{000000} bo dal rezultat ABC0701-000099
{0000+100@1}-ZZZ/{dd}/XXX bo dal rezultat 0199-ZZZ/31/XXX GenericNumRefModelDesc=Predlaga prilagodljivo številko glede na definirano masko. ServerAvailableOnIPOrPort=Strežnik je na voljo na naslovu %s na vratih %s ServerNotAvailableOnIPOrPort=Strežnik ni na voljo na naslovu %s na vratih %s diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index 93dcdfaacb7..33e61b9e73d 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -290,7 +290,7 @@ GenericMaskCodes3=Maskede diğer tüm karakterler olduğu gibi kalır.
Boşlu GenericMaskCodes4a=Üçüncü partinin 99 uncu %s örneği Firma 2007/01/31 de yapıldı:
GenericMaskCodes4b=2007/03/01 tarihinde oluşturulan üçüncü parti örneği:
GenericMaskCodes4c=2007-03-01 de oluşturulan ürün için örnek:
-GenericMaskCodes5=ABC{yy}{mm}-{000000} ABC0701-000099 verecektir
{0000+100}-ZZZ/{dd}/XXX 0199-ZZZ/31/XXX verecektir +GenericMaskCodes5=ABC{yy}{mm}-{000000} ABC0701-000099 verecektir
{0000+100@1}-ZZZ/{dd}/XXX 0199-ZZZ/31/XXX verecektir GenericNumRefModelDesc=Tanımlı bir maskeye göre özelleştirilebilir bir sayı verir. ServerAvailableOnIPOrPort=Sunucu %s portundaki %s adresinde bulunur. ServerNotAvailableOnIPOrPort=Sunucu %s portundaki %s adresinde yoktur. diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index 76bf1192ea6..219f13d66c3 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -291,7 +291,7 @@ GenericMaskCodes3=非遮罩字元的則該字元維持不變,也就是 A 就 GenericMaskCodes4a=例如: 第99筆 %s 資訊於 2007-01-31 建立完成:
GenericMaskCodes4b=例如: 於 2007-01-31 建立的客戶/供應商資訊:
# GenericMaskCodes4c=Example on product created on 2007-03-01:
-GenericMaskCodes5=參數:ABC{yy}{mm}-{000000} 編碼為 ABC0701-000099
參數:{0000+100}-ZZZ/{dd}/XXX 編碼為 0199-ZZZ/31/XXX +GenericMaskCodes5=參數:ABC{yy}{mm}-{000000} 編碼為 ABC0701-000099
參數:{0000+100@1}-ZZZ/{dd}/XXX 編碼為 0199-ZZZ/31/XXX GenericNumRefModelDesc=根據事先定義的遮罩值,回傳一個客制化的編號,詳細可參照說明。 ServerAvailableOnIPOrPort=服務器可在地址%s%s的連接埠上 ServerNotAvailableOnIPOrPort=服務器而不是可在地址港口%s