';
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index ddd38a8484d..87ec1643ef2 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -291,10 +291,21 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if ($usecontact)
{
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset($targetcontact->getFullName($outputlangs,1));
- $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcontact))."\n";
+
+ if (!empty($targetcontact->address)) {
+ $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcontact))."\n";
+ }else {
+ $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcompany))."\n";
+ }
// Country
- if ($targetcontact->country_code && $targetcontact->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code))."\n";
-
+ if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) {
+ $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code))."\n";
+ }
+ else if (empty($targetcontact->country_code) && !empty($targetcompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) {
+ $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code))."\n";
+ }
+
+
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{
// Tel
@@ -311,7 +322,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
{
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcompany))."\n";
// Country
- if ($targetcompany->country_code && $targetcompany->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code))."\n";
+ if (!empty($targetcompany->country_code) && $targetcompany->country_code != $sourcecompany->country_code) $stringaddress.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code))."\n";
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{
diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php
index 3757e424ada..44304f870f9 100644
--- a/htdocs/core/modules/modAdherent.class.php
+++ b/htdocs/core/modules/modAdherent.class.php
@@ -172,9 +172,9 @@ class modAdherent extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='MembersAndSubscriptions';
$this->export_permission[$r]=array(array("adherent","export"));
- $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.country'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
- $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'a.country'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
- $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'a.country'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
+ $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.country'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
+ $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'a.country'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.birth'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
+ $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'a.country'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.birth'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
// Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$resql=$this->db->query($sql);
@@ -207,7 +207,7 @@ class modAdherent extends DolibarrModules
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
$this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields');
$this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id
- $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.country'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
+ $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.country'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$resql=$this->db->query($sql);
@@ -223,7 +223,7 @@ class modAdherent extends DolibarrModules
// End add extra fields
$this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
$this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
- $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.zip'=>'55000','a.town'=>'New York','a.country'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
+ $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.zip'=>'55000','a.town'=>'New York','a.country'=>'1','a.email'=>'jsmith@example.com','a.birth'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
}
diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php
index f850c20d07f..e4debd24e80 100644
--- a/htdocs/exports/class/export.class.php
+++ b/htdocs/exports/class/export.class.php
@@ -227,18 +227,18 @@ class Export
$sql.=$this->array_export_sql_end[$indice];
//construction du filtrage si le parametrage existe
- if (is_array($array_filterValue))
+ if (is_array($array_filterValue) && !empty($array_filterValue))
{
$sqlWhere='';
// pour ne pas a gerer le nombre de condition
foreach ($array_filterValue as $key => $value)
{
- $sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[$indice][$key], $key, $array_filterValue[$key]);
+ if ($value != '') $sqlWhere.=" and ".$this->build_filterQuery($this->array_export_TypeFields[$indice][$key], $key, $array_filterValue[$key]);
}
$sql.=$sqlWhere;
}
$sql.=$this->array_export_sql_order[$indice];
-
+
return $sql;
}
diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
index df178f1ccab..55e8e3af0ce 100755
--- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
+++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
@@ -63,6 +63,7 @@ alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50);
alter table llx_adherent CHANGE COLUMN ville town text;
alter table llx_adherent CHANGE COLUMN cp zip varchar(10);
alter table llx_adherent CHANGE COLUMN pays country varchar(50);
+alter table llx_adherent CHANGE COLUMN naiss birth date;
alter table llx_adherent CHANGE COLUMN fk_departement state_id varchar(50);
alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text;
alter table llx_bank_account CHANGE COLUMN fk_departement state_id varchar(50);
diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql
index 821859228a3..936f04d78a4 100644
--- a/htdocs/install/mysql/tables/llx_adherent.sql
+++ b/htdocs/install/mysql/tables/llx_adherent.sql
@@ -48,7 +48,7 @@ create table llx_adherent
phone varchar(30),
phone_perso varchar(30),
phone_mobile varchar(30),
- naiss date, -- date de naissance
+ birth date, -- birthday
photo varchar(255), -- filename or url of photo
statut smallint NOT NULL DEFAULT 0,
public smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 4daf950fcde..3b13ef6e834 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -289,7 +289,7 @@ GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany done
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.
+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
DoTestServerAvailability=Test server connectivity
@@ -915,7 +915,7 @@ RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be requir
YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user %s or you must add -W option at end of command line to provide %s password.
YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP
DownloadMoreSkins=More skins to download
-SimpleNumRefModelDesc=Return the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is a sequence without hole and with no reset
+SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is a sequence without hole and with no reset
ShowProfIdInAddress=Show professionnal id with addresses on documents
TranslationUncomplete=Partial translation
SomeTranslationAreUncomplete=Some languages may be partially translated or may contains errors. If you detect some, you can fix .lang text files into directory htdocs/langs and submit them on the forum at http://www.dolibarr.org.
@@ -1025,7 +1025,7 @@ WatermarkOnDraftInvoices=Watermark on draft invoices (any if empty)
PropalSetup=Commercial proposals module setup
CreateForm=Create forms
NumberOfProductLines=Number of product lines
-ProposalsNumberingModules=Commercial proposal numbering modules
+ProposalsNumberingModules=Commercial proposal numbering models
ProposalsPDFModules=Commercial proposal documents models
ClassifiedInvoiced=Classified invoiced
HideTreadedPropal=Hide the treated commercial proposals in the list
@@ -1036,7 +1036,7 @@ FreeLegalTextOnProposal=Free text on commercial proposals
WatermarkOnDraftProposal=Watermark on draft commercial proposals (any if empty)
##### Orders #####
OrdersSetup=Order management setup
-OrdersNumberingModules=Orders numbering modules
+OrdersNumberingModules=Orders numbering models
OrdersModelModule=Order documents models
HideTreadedOrders=Hide the treated or canceled orders in the list
ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order
@@ -1050,7 +1050,7 @@ Bookmark4uSetup=Bookmark4u module setup
##### Interventions #####
InterventionsSetup=Interventions module setup
FreeLegalTextOnInterventions=Free text on intervention documents
-FicheinterNumberingModules=Intervention numbering modules
+FicheinterNumberingModules=Intervention numbering models
TemplatePDFInterventions=Intervention card documents models
WatermarkOnDraftInterventionCards=Watermark on intervention card documents (any if empty)
##### Contracts #####
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index d6de1fecf92..d6368514821 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -243,7 +243,7 @@ if ($action == 'add')
$adh->typeid = $_POST["type"];
$adh->note = $_POST["comment"];
$adh->morphy = $_POST["morphy"];
- $adh->naiss = $birthday;
+ $adh->birth = $birthday;
foreach($_POST as $key => $value){
if (preg_match("/^options_/",$key)){
diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php
index a5423468a2e..d250b838386 100644
--- a/htdocs/public/members/public_card.php
+++ b/htdocs/public/members/public_card.php
@@ -95,7 +95,7 @@ if ($id > 0)
print '