From 0af5c434af774d243b6ec1346b455ddc3b64dfd1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 09:29:34 +0100 Subject: [PATCH 01/23] english standardization --- htdocs/admin/company.php | 6 +++--- htdocs/comm/propal/class/propal.class.php | 1 - htdocs/compta/bank/class/account.class.php | 10 +++++----- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 28336d2966a..cf57029ad5f 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -65,7 +65,7 @@ if ( ($action == 'update' && empty($_POST["cancel"])) } dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity); @@ -276,7 +276,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; print ''.$langs->trans("CompanyAddress").''; - print ''."\n"; + print ''."\n"; $var=!$var; print ''.$langs->trans("CompanyZip").''; @@ -646,7 +646,7 @@ else print ''; $var=!$var; - print ''.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADRESSE)?'':$conf->global->MAIN_INFO_SOCIETE_ADRESSE) . ''; + print ''.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . ''; $var=!$var; print ''.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP) . ''; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 230e696bf10..c80007c8947 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1049,7 +1049,6 @@ class Propal extends CommonObject $this->demand_reason_id = $obj->fk_input_reason; $this->demand_reason_code = $obj->demand_reason_code; $this->demand_reason = $obj->demand_reason; - //$this->fk_delivery_address = $obj->fk_adresse_livraison; // TODO obsolete $this->fk_address = $obj->fk_delivery_address; $this->mode_reglement_id = $obj->fk_mode_reglement; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 6db6656c726..9d4f3573b6c 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -60,7 +60,7 @@ class Account extends CommonObject //! IBAN number (International Bank Account Number) var $iban_prefix; var $proprio; - var $adresse_proprio; + var $owner_address; var $fk_departement; // deprecated @@ -570,7 +570,7 @@ class Account extends CommonObject $sql.= ",iban_prefix = '".$this->iban."'"; $sql.= ",domiciliation='".$this->db->escape($this->domiciliation)."'"; $sql.= ",proprio = '".$this->db->escape($this->proprio)."'"; - $sql.= ",adresse_proprio = '".$this->db->escape($this->adresse_proprio)."'"; + $sql.= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql.= ",fk_departement = ".($this->state_id>0?"'".$this->state_id."'":"null"); $sql.= ",fk_pays = ".$this->country_id; $sql.= " WHERE rowid = ".$this->id; @@ -611,7 +611,7 @@ class Account extends CommonObject $sql = "SELECT ba.rowid, ba.ref, ba.label, ba.bank, ba.number, ba.courant, ba.clos, ba.rappro, ba.url,"; $sql.= " ba.code_banque, ba.code_guichet, ba.cle_rib, ba.bic, ba.iban_prefix as iban,"; - $sql.= " ba.domiciliation, ba.proprio, ba.adresse_proprio, ba.fk_departement, ba.fk_pays as country_id,"; + $sql.= " ba.domiciliation, ba.proprio, ba.owner_address, ba.fk_departement, ba.fk_pays as country_id,"; $sql.= " ba.account_number, ba.currency_code,"; $sql.= " ba.min_allowed, ba.min_desired, ba.comment,"; $sql.= ' p.code as country_code, p.libelle as country,'; @@ -651,7 +651,7 @@ class Account extends CommonObject $this->iban_prefix = $obj->iban; // deprecated $this->domiciliation = $obj->domiciliation; $this->proprio = $obj->proprio; - $this->adresse_proprio = $obj->adresse_proprio; + $this->owner_address = $obj->owner_address; $this->fk_departement = $obj->fk_departement; // deprecated $this->departement_code= $obj->state_code; // deprecated @@ -1026,7 +1026,7 @@ class Account extends CommonObject $this->iban_prefix = 'FR'; // deprecated $this->domiciliation = 'The bank addresse'; $this->proprio = 'Owner'; - $this->adresse_proprio = 'Owner address'; + $this->owner_address = 'Owner address'; $this->country_id = 1; } 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 00d50ad51d7..53947627544 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 @@ -45,6 +45,7 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; +alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (6,'COLKIALA','KIALA','Relais Kiala',0); From 303577a7fa26e2599961e5681ac80e1c811062d6 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 09:36:01 +0100 Subject: [PATCH 02/23] english standardization --- htdocs/compta/bank/bankid_fr.php | 8 ++++---- htdocs/compta/bank/fiche.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php index d14da565e0c..6e4dbbeba0c 100644 --- a/htdocs/compta/bank/bankid_fr.php +++ b/htdocs/compta/bank/bankid_fr.php @@ -64,7 +64,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $account->iban_prefix = trim($_POST["iban_prefix"]); // deprecated $account->domiciliation = trim($_POST["domiciliation"]); $account->proprio = trim($_POST["proprio"]); - $account->adresse_proprio = trim($_POST["adresse_proprio"]); + $account->owner_address = trim($_POST["owner_address"]); $account->fk_departement = trim($_POST["fk_departement"]); //$account->fk_pays = trim($_POST["fk_pays"]); // We do not change this. @@ -223,7 +223,7 @@ if (($_GET["id"] || $_GET["ref"]) && $action != 'edit') print "\n"; print ''.$langs->trans("BankAccountOwnerAddress").''; - print nl2br($account->adresse_proprio); + print nl2br($account->owner_address); print "\n"; } @@ -368,8 +368,8 @@ if ($_GET["id"] && $action == 'edit' && $user->rights->banque->configurer) print ''; print ''.$langs->trans("BankAccountOwnerAddress").''; - print ""; } diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php index 00164b99352..fe251cae5cb 100644 --- a/htdocs/compta/bank/fiche.php +++ b/htdocs/compta/bank/fiche.php @@ -134,7 +134,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $account->domiciliation = trim($_POST["domiciliation"]); $account->proprio = trim($_POST["proprio"]); - $account->adresse_proprio = trim($_POST["adresse_proprio"]); + $account->owner_address = trim($_POST["owner_address"]); $account->account_number = trim($_POST["account_number"]); From d229d3a594c38fb7f3cad46c551b72cfa3013f02 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 09:41:56 +0100 Subject: [PATCH 03/23] english standardization --- htdocs/contact/class/contact.class.php | 1 - htdocs/core/boxes/box_comptes.php | 2 +- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 2 +- htdocs/core/modules/dons/html_cerfafr.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php | 2 +- 8 files changed, 7 insertions(+), 8 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 411de5d5fcd..b835879b6cc 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -520,7 +520,6 @@ class Contact extends CommonObject $this->prenom = $obj->firstname; // TODO deprecated $this->address = $obj->address; - //$this->adresse = $obj->address; // TODO deprecated $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; $this->ville = $obj->town; // TODO deprecated diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index 4d9ec0e600c..817fec968da 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -76,7 +76,7 @@ class box_comptes extends ModeleBoxes { $sql = "SELECT rowid, ref, label, bank, number, courant, clos, rappro, url,"; $sql.= " code_banque, code_guichet, cle_rib, bic, iban_prefix,"; - $sql.= " domiciliation, proprio, adresse_proprio,"; + $sql.= " domiciliation, proprio, owner_address,"; $sql.= " account_number, currency_code,"; $sql.= " min_allowed, min_desired, comment"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 8eed22b7249..386179fe16d 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -623,7 +623,7 @@ class pdf_einstein extends ModelePDFCommandes { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } } diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 664bf54d965..441bbe677fb 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -65,7 +65,7 @@ __Name__ :
__MAIN_INFO_SOCIETE_NOM__
__Address__ :
- __MAIN_INFO_SOCIETE_ADRESSE__
+ __MAIN_INFO_SOCIETE_ADDRESS__
__Zip__ : __MAIN_INFO_SOCIETE_CP__
__Town__ : __MAIN_INFO_SOCIETE_VILLE__
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index cf71f536593..bc24b760edd 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -140,7 +140,7 @@ class html_cerfafr extends ModeleDon $form = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$conf->currency),$form); $form = str_replace('__CURRENCYCODE__',$conf->currency,$form); $form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form); - $form = str_replace('__MAIN_INFO_SOCIETE_ADRESSE__',$mysoc->address,$form); + $form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form); $form = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->zip,$form); $form = str_replace('__MAIN_INFO_SOCIETE_VILLE__',$mysoc->town,$form); $form = str_replace('__DONATOR_NAME__',$don->nom,$form); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index ca247b5ab99..f4df428518a 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -750,7 +750,7 @@ class pdf_crabe extends ModelePDFFactures { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } } diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 365bf46f586..41a1068721d 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -651,7 +651,7 @@ class pdf_azur extends ModelePDFPropales { $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } } diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index aacddd4f21f..882c2610775 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -570,7 +570,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posy=$pdf->GetY()+1; $pdf->SetXY($this->marge_gauche, $posy); $pdf->SetFont('','', $default_font_size - 3); - $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0); + $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $posy=$pdf->GetY()+2; } if ($conf->global->FACTURE_CHQ_NUMBER == -1) From d255dc5114060a7106d367704c1b252c3f1e8c42 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 10:24:24 +0100 Subject: [PATCH 04/23] english standardization --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 1 file changed, 1 insertion(+) 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 53947627544..975ec7376f0 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 @@ -30,6 +30,7 @@ UPDATE llx_const set value='auguria_menu.php' where value='auguria_backoffice.ph UPDATE llx_const set value='auguria_menu.php' where value='auguria_frontoffice.php'; UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_backoffice.php'; UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_frontoffice.php'; +UPDATE llx_const set value='MAIN_INFO_SOCIETE_ADDRESS' where value='MAIN_INFO_SOCIETE_ADRESSE'; ALTER TABLE llx_user add COLUMN fk_user integer; From 19201a1015df2ca54c74ea0d018c142741869a9e Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 11:32:19 +0100 Subject: [PATCH 05/23] english standardization --- .../canvas/default/tpl/adherentcard_view.tpl.php | 2 +- htdocs/adherents/cartes/carte.php | 4 ++-- htdocs/adherents/class/adherent.class.php | 14 +++++++------- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index 4518bb535e8..84cb06e2093 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -66,7 +66,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] trans("Zip").' / '.$langs->trans("Town"); ?> - control->tpl['zip'].$this->control->tpl['ville']; ?> + control->tpl['zip'].$this->control->tpl['town']; ?> diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 27fde653695..c069c02be0c 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -62,7 +62,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg // requete en prenant que les adherents a jour de cotisation $sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe as company, d.datefin,"; - $sql.= " d.address, d.cp as zip, d.ville as town, d.naiss, d.email, d.photo,"; + $sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,"; $sql.= " t.libelle as type,"; $sql.= " p.code as country_code, p.libelle as country"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d"; @@ -114,7 +114,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%SOCIETE%'=>$objp->company, '%ADDRESS%'=>$objp->address, '%CP%'=>$objp->zip, - '%VILLE%'=>$objp->town, + '%TOWN%'=>$objp->town, '%PAYS%'=>$objp->country, '%ANNEE%'=>$year, '%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c59d54d1508..9f813f774ad 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -54,7 +54,7 @@ class Adherent extends CommonObject var $address; var $cp; var $zip; - var $ville; + //var $ville; // deprecated var $town; var $state_id; // Id of department @@ -234,7 +234,7 @@ class Adherent extends CommonObject '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, '%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, - '%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, + '%TOWN%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, ); @@ -405,7 +405,7 @@ class Adherent extends CommonObject $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom); $this->address=($this->address?$this->address:$this->address); $this->zip=($this->zip?$this->zip:$this->cp); - $this->town=($this->town?$this->town:$this->ville); + $this->town=($this->town?$this->town:$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname)); @@ -430,7 +430,7 @@ class Adherent extends CommonObject $sql.= ", fk_soc=" .($this->fk_soc > 0?"'".$this->fk_soc."'":"null"); $sql.= ", address=" .($this->address?"'".$this->db->escape($this->address)."'":"null"); $sql.= ", cp=" .($this->zip?"'".$this->db->escape($this->zip)."'":"null"); - $sql.= ", ville=" .($this->town?"'".$this->db->escape($this->town)."'":"null"); + $sql.= ", town=" .($this->town?"'".$this->db->escape($this->town)."'":"null"); $sql.= ", pays=" .($this->country_id>0?"'".$this->country_id."'":"null"); $sql.= ", fk_departement=".($this->state_id>0?"'".$this->state_id."'":"null"); $sql.= ", email='".$this->email."'"; @@ -1018,7 +1018,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.ville as town, d.note,"; + $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1067,7 +1067,7 @@ class Adherent extends CommonObject $this->address = $obj->address; $this->cp = $obj->zip; // deprecated $this->zip = $obj->zip; - $this->ville = $obj->town; // deprecated + //$this->ville = $obj->town; // deprecated $this->town = $obj->town; $this->state_id = $obj->fk_departement; @@ -1824,7 +1824,7 @@ class Adherent extends CommonObject if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste; if ($this->address && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->address; if ($this->cp && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp; - if ($this->ville && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville; + if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town; if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code; if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email; if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone; 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 975ec7376f0..5798e278a66 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 @@ -46,6 +46,7 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; +alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); From 960c9ccbaf8d1371dd51013fb671ce80dbb469ba Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 11:39:47 +0100 Subject: [PATCH 06/23] english standardization --- htdocs/adherents/fiche.php | 4 ++-- htdocs/adherents/liste.php | 2 +- htdocs/adherents/stats/geo.php | 4 ++-- htdocs/adherents/type.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index b0bb18511e9..b2e4bf612d0 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -262,7 +262,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->address = trim($_POST["address"]); $object->cp = trim($_POST["zipcode"]); // deprecated $object->zip = trim($_POST["zipcode"]); - $object->ville = trim($_POST["town"]); // deprecated + //$object->ville = trim($_POST["town"]); // deprecated $object->town = trim($_POST["town"]); $object->state_id = $_POST["departement_id"]; $object->country_id = $_POST["country_id"]; @@ -442,7 +442,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->address = $address; $object->cp = $zip; // deprecated $object->zip = $zip; - $object->ville = $town; // deprecated + //$object->ville = $town; // deprecated $object->town = $town; $object->fk_departement = $state_id; $object->state_id = $state_id; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index b19fcae8d85..afbee9d9ffb 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -105,7 +105,7 @@ if ($sall) if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; $sql.=" d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; - $sql.=" OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; + $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($type > 0) { diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 3ea61e50e35..fcb421e14fe 100755 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -100,12 +100,12 @@ if ($mode) $tab='statstown'; $data = array(); - $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.ville as label2"; + $sql.="SELECT COUNT(d.rowid) as nb, MAX(d.datevalid) as lastdate, p.code, p.libelle as label, d.town as label2"; $sql.=" FROM ".MAIN_DB_PREFIX."adherent as d"; $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p on d.pays = p.rowid"; $sql.=" WHERE d.entity IN (".getEntity().")"; $sql.=" AND d.statut = 1"; - $sql.=" GROUP BY p.libelle, p.code, d.ville"; + $sql.=" GROUP BY p.libelle, p.code, d.town"; //print $sql; } diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index eaddb4866c4..b44e5b3fde2 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -417,7 +417,7 @@ if ($rowid > 0) { $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; - $sql.= " OR d.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; + $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($status != '') { From fc4ad12a725d25c6c2ce98b48bdf566133076586 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 15:57:30 +0100 Subject: [PATCH 07/23] english standardization --- htdocs/admin/company.php | 6 +++--- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index cf57029ad5f..eb7cb1f9d56 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -66,7 +66,7 @@ if ( ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS",$_POST["address"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_VILLE",$_POST["ville"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN",$_POST["town"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_CP",$_POST["cp"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_DEPARTEMENT",$_POST["departement_id"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MONNAIE",$_POST["currency"],'chaine',0,'',$conf->entity); @@ -284,7 +284,7 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; print ''.$langs->trans("CompanyTown").''; - print ''."\n"; + print ''."\n"; // Country $var=!$var; @@ -652,7 +652,7 @@ else print ''.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP) . ''; $var=!$var; - print ''.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_VILLE)?'':$conf->global->MAIN_INFO_SOCIETE_VILLE) . ''; + print ''.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . ''; $var=!$var; print ''.$langs->trans("CompanyCountry").''; 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 5798e278a66..5a40d9796b7 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 @@ -31,6 +31,7 @@ UPDATE llx_const set value='auguria_menu.php' where value='auguria_frontoffice.p UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_backoffice.php'; UPDATE llx_const set value='smartphone_menu.php' where value='smartphone_frontoffice.php'; UPDATE llx_const set value='MAIN_INFO_SOCIETE_ADDRESS' where value='MAIN_INFO_SOCIETE_ADRESSE'; +UPDATE llx_const set value='MAIN_INFO_SOCIETE_TOWN' where value='MAIN_INFO_SOCIETE_VILLE'; ALTER TABLE llx_user add COLUMN fk_user integer; From a582fd3f157191c82550e5868d53543359378e1e Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:14:52 +0100 Subject: [PATCH 08/23] english standardization --- htdocs/admin/ldap_contacts.php | 6 +++--- htdocs/admin/ldap_members.php | 6 +++--- htdocs/categories/categorie.php | 2 +- htdocs/comm/prospect/list.php | 14 +++++++------- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 4fd4e512483..96382bdaa59 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -230,7 +230,7 @@ print ''.$langs->trans("LDAPFieldAddressExample").''; print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ADDRESS?' checked="checked"':'').">"; print ''; -// CP +// ZIP $var=!$var; print ''.$langs->trans("LDAPFieldZip").''; print ''; @@ -238,7 +238,7 @@ print ''.$langs->trans("LDAPFieldZipExample").''; print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_ZIP?' checked="checked"':'').">"; print ''; -// Ville +// TOWN $var=!$var; print ''.$langs->trans("LDAPFieldTown").''; print ''; @@ -246,7 +246,7 @@ print ''.$langs->trans("LDAPFieldTownExample").''; print 'global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_TOWN?' checked="checked"':'').">"; print ''; -// Pays +// COUNTRY $var=!$var; print ''.$langs->trans("LDAPFieldCountry").''; print ''; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index a6207c6b2c4..b8245f2aa34 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -271,7 +271,7 @@ print ''.$langs->trans("LDAPFieldAddressExample").''; print ' '; print ''; -// CP +// ZIP $var=!$var; print ''.$langs->trans("LDAPFieldZip").''; print ''; @@ -279,7 +279,7 @@ print ''.$langs->trans("LDAPFieldZipExample").''; print ' '; print ''; -// Ville +// TOWN $var=!$var; print ''.$langs->trans("LDAPFieldTown").''; print ''; @@ -287,7 +287,7 @@ print ''.$langs->trans("LDAPFieldTownExample").''; print ' '; print ''; -// Pays +// COUNTRY $var=!$var; print ''.$langs->trans("LDAPFieldCountry").''; print ''; diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index d3a06304e46..95755a3e59a 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -244,7 +244,7 @@ if ($socid) // Zip / Town print ''.$langs->trans('Zip').''.$soc->cp.""; - print ''.$langs->trans('Town').''.$soc->ville.""; + print ''.$langs->trans('Town').''.$soc->town.""; // Country if ($soc->pays) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 302c47e2d1e..9e0d61f5e2b 100755 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -41,7 +41,7 @@ $socname = GETPOST("socname",'alpha'); $stcomm = GETPOST("stcomm",'int'); $search_nom = GETPOST("search_nom"); $search_zipcode = GETPOST("search_zipcode"); -$search_ville = GETPOST("search_ville"); +$search_town = GETPOST("search_town"); $search_departement = GETPOST("search_departement"); $search_datec = GETPOST("search_datec"); $search_categ = GETPOST("search_categ",'int'); @@ -172,7 +172,7 @@ if ($action == 'cstc') $formother=new FormOther($db); -$sql = "SELECT s.rowid, s.nom, s.cp as zip, s.ville, s.datec, s.datea, s.status as status,"; +$sql = "SELECT s.rowid, s.nom, s.cp as zip, s.town, s.datec, s.datea, s.status as status,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,"; $sql.= " d.nom as departement"; // Updated by Matelli @@ -194,7 +194,7 @@ if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape(strtolower($search_nom))."%'"; if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape(strtolower($search_zipcode))."%'"; -if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape(strtolower($search_ville))."%'"; +if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape(strtolower($search_town))."%'"; if ($search_departement) $sql .= " AND d.nom LIKE '%".$db->escape(strtolower($search_departement))."%'"; if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; // Insert levels filters @@ -242,7 +242,7 @@ if ($resql) llxHeader('',$langs->trans("ThirdParty"),$help_url); } - $param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_code).'&search_ville='.urlencode($search_ville); + $param='&stcomm='.$stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_code).'&search_town='.urlencode($search_town); // Added by Matelli // Store the status filter in the URL if (isSet($search_cstc)) @@ -294,7 +294,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("State"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ProspectLevelShort"),$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); @@ -315,7 +315,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -393,7 +393,7 @@ if ($resql) print $prospectstatic->getNomUrl(1,'prospect'); print ''; print "".$obj->zip." "; - print "".$obj->ville." "; + print "".$obj->town." "; print ''.$obj->departement.''; // Creation date print ''.dol_print_date($db->jdate($obj->datec)).''; 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 5a40d9796b7..1c10ca0e730 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 @@ -48,6 +48,7 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; +alter table llx_societe CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); From 38480f5962f68c537eaac7556f16e1403cdaff83 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:19:16 +0100 Subject: [PATCH 09/23] english standardization --- htdocs/comm/list.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index fd7ea79f345..e585733805c 100755 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -48,7 +48,7 @@ if (! $sortfield) $sortfield="s.nom"; $search_nom=GETPOST("search_nom"); $search_zipcode=GETPOST("search_zipcode"); -$search_ville=GETPOST("search_ville"); +$search_town=GETPOST("search_town"); $search_code=GETPOST("search_code"); $search_compta=GETPOST("search_compta"); @@ -77,7 +77,7 @@ if (GETPOST("button_removefilter_x")) $socname=""; $search_nom=""; $search_zipcode=""; - $search_ville=""; + $search_town=""; $search_idprof1=''; $search_idprof2=''; $search_idprof3=''; @@ -96,7 +96,7 @@ $thirdpartystatic=new Societe($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); -$sql = "SELECT s.rowid, s.nom as name, s.client, s.cp as zip, s.ville, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; +$sql = "SELECT s.rowid, s.nom as name, s.client, s.cp as zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; $sql.= " s.datec, s.datea, s.canvas"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; @@ -117,7 +117,7 @@ if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_nom) $sql.= " AND s.nom LIKE '%".$db->escape($search_nom)."%'"; if ($search_zipcode) $sql.= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'"; -if ($search_ville) $sql.= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_town) $sql.= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_code) $sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'"; if ($search_compta) $sql.= " AND s.code_compta LIKE '%".$db->escape($search_compta)."%'"; // Insert sale filter @@ -142,7 +142,7 @@ if ($result) { $num = $db->num_rows($result); - $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_ville=".$search_ville; + $param = "&search_nom=".$search_nom."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_town=".$search_town; if ($search_categ != '') $param.='&search_categ='.$search_categ; if ($search_sale != '') $param.='&search_sale='.$search_sale; @@ -178,7 +178,7 @@ if ($result) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder); @@ -200,7 +200,7 @@ if ($result) print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -241,7 +241,7 @@ if ($result) print $thirdpartystatic->getNomUrl(1); print ''; print ''.$obj->zip.''; - print ''.$obj->ville.''; + print ''.$obj->town.''; print ''.$obj->code_client.''; print ''.$obj->code_compta.''; print ''.dol_print_date($db->jdate($obj->datec),'day').''; From aa28e17953afadf4447820dc0aebe5061f38877f Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:21:30 +0100 Subject: [PATCH 10/23] english standardization --- htdocs/commande/customer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 8b9cba89b41..bc04697f93f 100755 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -67,7 +67,7 @@ $thirdpartystatic=new Societe($db); * Mode List */ -$sql = "SELECT s.rowid, s.nom, s.client, s.ville, s.datec, s.datea"; +$sql = "SELECT s.rowid, s.nom, s.client, s.town, s.datec, s.datea"; $sql.= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta "; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st, ".MAIN_DB_PREFIX."commande as c"; @@ -119,7 +119,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'valign="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","","",'valign="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","","",'valign="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec",$addu,"",'align="right"',$sortfield,$sortorder); @@ -167,7 +167,7 @@ if ($resql) print $result; print ''; - print ''.$obj->ville.' '; + print ''.$obj->town.' '; print ''.$obj->code_client.' '; print ''.$obj->code_compta.' '; print ''.dol_print_date($db->jdate($obj->datec)).''; From 890b9ca44a911f09808971ceb35a11ee2d84e630 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:27:58 +0100 Subject: [PATCH 11/23] english standardization --- htdocs/compta/dons/class/don.class.php | 20 +++++++++---------- .../install/mysql/migration/3.3.0-3.4.0.sql | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index 4942c8f3f7e..f2c3a6f0704 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -44,7 +44,7 @@ class Don extends CommonObject var $societe; var $address; var $cp; - var $ville; + var $town; var $pays; var $email; var $public; @@ -190,7 +190,7 @@ class Don extends CommonObject $this->societe = 'The Company'; $this->address = 'Twist road'; $this->cp = '99999'; - $this->ville = 'Town'; + $this->town = 'Town'; $this->note_public='SPECIMEN'; $this->email='email@email.com'; $this->note=''; @@ -229,7 +229,7 @@ class Don extends CommonObject $err++; } - if (dol_strlen(trim($this->ville)) == 0) + if (dol_strlen(trim($this->town)) == 0) { $error_string[$err] = "La ville saisie est invalide"; $err++; @@ -299,7 +299,7 @@ class Don extends CommonObject // Clean parameters $this->address=($this->address>0?$this->address:$this->address); $this->zip=($this->zip>0?$this->zip:$this->cp); - $this->town=($this->town>0?$this->town:$this->ville); + $this->town=($this->town>0?$this->town:$this->town); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); $this->country=($this->country?$this->country:$this->pays); @@ -315,7 +315,7 @@ class Don extends CommonObject $sql.= ", societe"; $sql.= ", address"; $sql.= ", cp"; - $sql.= ", ville"; + $sql.= ", town"; $sql.= ", pays"; $sql.= ", public"; $sql.= ", fk_don_projet"; @@ -384,7 +384,7 @@ class Don extends CommonObject // Clean parameters $this->address=($this->address>0?$this->address:$this->address); $this->zip=($this->zip>0?$this->zip:$this->cp); - $this->town=($this->town>0?$this->town:$this->ville); + $this->town=($this->town>0?$this->town:$this->town); $this->country_id=($this->country_id>0?$this->country_id:$this->fk_pays); $this->country=($this->country?$this->country:$this->pays); @@ -396,7 +396,7 @@ class Don extends CommonObject $sql .= ",societe='".$this->db->escape($this->societe)."'"; $sql .= ",address='".$this->db->escape($this->address)."'"; $sql .= ",cp='".$this->db->escape($this->zip)."'"; - $sql .= ",ville='".$this->db->escape($this->town)."'"; + $sql .= ",town='".$this->db->escape($this->town)."'"; $sql .= ",pays='".$this->db->escape($this->country)."'"; // TODO use country_id $sql .= ",public=".$this->public; $sql .= ",fk_don_projet=".($this->fk_project>0?$this->fk_project:'null'); @@ -463,7 +463,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,"; - $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; + $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; $sql.= " p.title as project_label"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet"; @@ -489,9 +489,9 @@ class Don extends CommonObject $this->statut = $obj->fk_statut; $this->address = $obj->address; $this->cp = $obj->cp; - $this->ville = $obj->ville; + $this->town = $obj->town; $this->zip = $obj->cp; - $this->town = $obj->ville; + $this->town = $obj->town; $this->email = $obj->email; $this->phone = $obj->phone; $this->phone_mobile = $obj->phone_mobile; 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 1c10ca0e730..ad5f77a422f 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 @@ -46,6 +46,7 @@ alter table llx_extrafields add column param text after pos; alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; +alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; From 9a431bb8e3e92516b996e44026d8a9c95da62e83 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:33:48 +0100 Subject: [PATCH 12/23] english standardization --- htdocs/compta/clients.php | 6 +++--- htdocs/compta/dons/fiche.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index a866b4cac79..e1a6f02d49f 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -93,7 +93,7 @@ if ($mode == 'search') { * Mode List */ -$sql = "SELECT s.rowid, s.nom, s.client, s.ville, s.datec, s.datea"; +$sql = "SELECT s.rowid, s.nom, s.client, s.town, s.datec, s.datea"; $sql.= ", st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta "; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."c_stcomm as st"; @@ -148,7 +148,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","",'valign="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","","",'valign="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","","",'valign="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec",$addu,"",'align="right"',$sortfield,$sortorder); @@ -190,7 +190,7 @@ if ($resql) $thirdpartystatic->client=$obj->client; print $thirdpartystatic->getNomUrl(1,'compta'); print ''; - print ''.$obj->ville.' '; + print ''.$obj->town.' '; print ''.$obj->code_client.' '; print ''.$obj->code_compta.' '; print ''.dol_print_date($db->jdate($obj->datec)).''; diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 5ea563fbf14..9f5d08cdf60 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -91,7 +91,7 @@ if ($action == 'update') $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); $don->cp = $_POST["zipcode"]; - $don->ville = $_POST["town"]; + $don->town = $_POST["town"]; $don->zip = $_POST["zipcode"]; $don->town = $_POST["town"]; $don->email = $_POST["email"]; @@ -143,7 +143,7 @@ if ($action == 'add') $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); $don->cp = $_POST["zipcode"]; - $don->ville = $_POST["town"]; + $don->town = $_POST["town"]; $don->zip = $_POST["zipcode"]; $don->town = $_POST["town"]; $don->email = $_POST["email"]; @@ -488,7 +488,7 @@ if (! empty($id) && $action != 'edit') print "".''.$langs->trans("Address").''.dol_nl2br($don->address).''; // Zip / Town - print "".''.$langs->trans("Zip").' / '.$langs->trans("Town").''.$don->cp.($don->cp && $don->ville?' / ':'').$don->ville.''; + print "".''.$langs->trans("Zip").' / '.$langs->trans("Town").''.$don->cp.($don->cp && $don->town?' / ':'').$don->town.''; // Country print "".''.$langs->trans("Country").''.$don->pays.''; From fb54bceafb4bd439faac95b58c390954b53febe8 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 16:53:50 +0100 Subject: [PATCH 13/23] english standardization --- .../canvas/default/tpl/contactcard_view.tpl.php | 2 +- htdocs/contact/class/contact.class.php | 12 +++++------- htdocs/contact/fiche.php | 2 +- htdocs/contact/vcard.php | 6 +++--- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index 971388d62c8..d0ad081e92e 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -65,7 +65,7 @@ dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors'] trans("Zip").' / '.$langs->trans("Town"); ?> - control->tpl['zip'].$this->control->tpl['ville']; ?> + control->tpl['zip'].$this->control->tpl['town']; ?> diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b835879b6cc..17e646b5a8d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -46,7 +46,6 @@ class Contact extends CommonObject var $address; var $cp; // TODO deprecated var $zip; - var $ville; // TODO deprecated var $town; var $fk_departement; // deprecated @@ -225,7 +224,7 @@ class Contact extends CommonObject $this->phone_mobile=trim($this->phone_mobile); $this->fax=trim($this->fax); $this->zip=($this->zip?$this->zip:$this->cp); - $this->town=($this->town?$this->town:$this->ville); + $this->town=($this->town?$this->town:$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->fk_pays); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); @@ -239,7 +238,7 @@ class Contact extends CommonObject $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; $sql .= ", address='".$this->db->escape($this->address)."'"; $sql .= ", cp='".$this->db->escape($this->zip)."'"; - $sql .= ", ville='".$this->db->escape($this->town)."'"; + $sql .= ", town='".$this->db->escape($this->town)."'"; $sql .= ", fk_pays=".($this->country_id>0?$this->country_id:'NULL'); $sql .= ", fk_departement=".($this->state_id>0?$this->state_id:'NULL'); $sql .= ", poste='".$this->db->escape($this->poste)."'"; @@ -367,7 +366,7 @@ class Contact extends CommonObject } if ($this->address && ! empty($conf->global->LDAP_CONTACT_FIELD_ADDRESS)) $info[$conf->global->LDAP_CONTACT_FIELD_ADDRESS] = $this->address; if ($this->cp && ! empty($conf->global->LDAP_CONTACT_FIELD_ZIP)) $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->cp; - if ($this->ville && ! empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->ville; + if ($this->town && ! empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->town; if ($this->country_code && ! empty($conf->global->LDAP_CONTACT_FIELD_COUNTRY)) $info[$conf->global->LDAP_CONTACT_FIELD_COUNTRY] = $this->country_code; if ($this->phone_pro && ! empty($conf->global->LDAP_CONTACT_FIELD_PHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_PHONE] = $this->phone_pro; if ($this->phone_perso && ! empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso; @@ -484,7 +483,7 @@ class Contact extends CommonObject $langs->load("companies"); $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.name as lastname, c.firstname,"; - $sql.= " c.address, c.cp as zip, c.ville as town,"; + $sql.= " c.address, c.cp as zip, c.town as town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; $sql.= " c.birthday,"; @@ -494,7 +493,7 @@ class Contact extends CommonObject $sql.= " p.libelle as country, p.code as country_code,"; $sql.= " d.nom as state, d.code_departement as state_code,"; $sql.= " u.rowid as user_id, u.login as user_login,"; - $sql.= " s.nom as socname, s.address as socaddress, s.cp as soccp, s.ville as soccity, s.default_lang as socdefault_lang"; + $sql.= " s.nom as socname, s.address as socaddress, s.cp as soccp, s.town as soccity, s.default_lang as socdefault_lang"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON c.fk_pays = p.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d ON c.fk_departement = d.rowid"; @@ -522,7 +521,6 @@ class Contact extends CommonObject $this->address = $obj->address; $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; - $this->ville = $obj->town; // TODO deprecated $this->town = $obj->town; $this->fk_departement = $obj->fk_departement; // deprecated diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 2926ec75b75..4151a2f078b 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -885,7 +885,7 @@ else print ''.$langs->trans("Zip").' / '.$langs->trans("Town").''; print $object->cp; if ($object->cp) print ' '; - print $object->ville.''; + print $object->town.''; // Country print ''.$langs->trans("Country").''; diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 0448bb519e0..9638c5ff188 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -54,8 +54,8 @@ $v->setPhoneNumber($contact->phone_pro, "PREF;WORK;VOICE"); $v->setPhoneNumber($contact->phone_mobile, "CELL;VOICE"); $v->setPhoneNumber($contact->fax, "WORK;FAX"); -$v->setAddress("", "", $contact->address, $contact->ville, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK;POSTAL"); -$v->setLabel("", "", $contact->address, $contact->ville, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK"); +$v->setAddress("", "", $contact->address, $contact->town, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK;POSTAL"); +$v->setLabel("", "", $contact->address, $contact->town, "", $contact->cp, ($contact->pays_code?$contact->pays:''), "WORK"); $v->setEmail($contact->email,'internet,pref'); $v->setNote($contact->note); @@ -67,7 +67,7 @@ if ($company->id) $v->setURL($company->url, "WORK"); if (! $contact->phone_pro) $v->setPhoneNumber($company->tel, "WORK;VOICE"); if (! $contact->fax) $v->setPhoneNumber($company->fax, "WORK;FAX"); - if (! $contact->cp) $v->setAddress("", "", $company->address, $company->ville, "", $company->cp, $company->pays_code, "WORK;POSTAL"); + if (! $contact->cp) $v->setAddress("", "", $company->address, $company->town, "", $company->cp, $company->pays_code, "WORK;POSTAL"); if ($company->email != $contact->email) $v->setEmail($company->email,'internet'); // Si contact lie a un tiers non de type "particulier" if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->nom); 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 ad5f77a422f..a085eed35f1 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 @@ -50,6 +50,7 @@ alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; +alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,active) VALUES (5,'COLUPS','UPS','United Parcel Service',0); From 844433d0a27cecdda737557489304711163ef6e5 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:11:53 +0100 Subject: [PATCH 14/23] english standardization --- htdocs/core/ajax/ziptown.php | 6 +++--- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/files.lib.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 2 +- .../modules/dons/html_cerfafr.modules.php | 4 ++-- htdocs/core/modules/modAdherent.class.php | 10 +++++----- htdocs/core/modules/modCategorie.class.php | 12 +++++------ htdocs/core/modules/modCommande.class.php | 8 ++++---- htdocs/core/modules/modExpedition.class.php | 8 ++++---- htdocs/core/modules/modFacture.class.php | 16 +++++++-------- htdocs/core/modules/modFicheinter.class.php | 8 ++++---- htdocs/core/modules/modFournisseur.class.php | 20 +++++++++---------- htdocs/core/modules/modGravatar.class.php | 4 ++-- htdocs/core/modules/modHoliday.class.php | 6 +++--- htdocs/core/modules/modPaybox.class.php | 4 ++-- htdocs/core/modules/modPaypal.class.php | 4 ++-- htdocs/core/modules/modProjet.class.php | 8 ++++---- htdocs/core/modules/modPropale.class.php | 8 ++++---- htdocs/core/modules/modSociete.class.php | 16 +++++++-------- 19 files changed, 74 insertions(+), 74 deletions(-) diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index e7dc07f99da..90ece7f36e4 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -77,7 +77,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) } else // Use table of third parties { - $sql = "SELECT DISTINCT s.cp as zip, s.ville as town, s.fk_departement as fk_county, s.fk_pays as fk_country"; + $sql = "SELECT DISTINCT s.cp as zip, s.town, s.fk_departement as fk_county, s.fk_pays as fk_country"; $sql.= ", p.code as country_code, p.libelle as country"; $sql.= ", d.code_departement as county_code , d.nom as county"; $sql.= " FROM ".MAIN_DB_PREFIX.'societe as s'; @@ -85,8 +85,8 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON fk_pays = p.rowid'; $sql.= " WHERE"; if ($zipcode) $sql.= " s.cp LIKE '".$db->escape($zipcode)."%'"; - if ($town) $sql.= " s.ville LIKE '%" . $db->escape($town) . "%'"; - $sql.= " ORDER BY s.fk_pays, s.cp, s.ville"; + if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'"; + $sql.= " ORDER BY s.fk_pays, s.cp, s.town"; $sql.= $db->plimit(50); // Avoid pb with bad criteria } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index afd9522801a..95827872bb7 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1161,7 +1161,7 @@ function show_subsidiaries($conf,$langs,$db,$object) $i=-1; - $sql = "SELECT s.rowid, s.nom as name, s.address, s.cp as zip, s.ville as town, s.code_client, s.canvas"; + $sql = "SELECT s.rowid, s.nom as name, s.address, s.cp as zip, s.town, s.code_client, s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE s.parent = ".$object->id; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index b3ce04157d0..b2360bb15bb 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -909,7 +909,7 @@ function dol_meta_create($object) if (is_dir($dir)) { $nblignes = count($object->lines); - $client = $object->client->nom . " " . $object->client->address . " " . $object->client->cp . " " . $object->client->ville; + $client = $object->client->nom . " " . $object->client->address . " " . $object->client->cp . " " . $object->client->town; $meta = "REFERENCE=\"" . $object->ref . "\" DATE=\"" . dol_print_date($object->date,'') . "\" NB_ITEMS=\"" . $nblignes . "\" diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 441bbe677fb..2a1d1cb16d7 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -67,7 +67,7 @@ __Address__ :
__MAIN_INFO_SOCIETE_ADDRESS__
__Zip__ : __MAIN_INFO_SOCIETE_CP__
- __Town__ : __MAIN_INFO_SOCIETE_VILLE__
+ __Town__ : __MAIN_INFO_SOCIETE_TOWN__
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index bc24b760edd..71ef2364056 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -142,11 +142,11 @@ class html_cerfafr extends ModeleDon $form = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->name,$form); $form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form); $form = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->zip,$form); - $form = str_replace('__MAIN_INFO_SOCIETE_VILLE__',$mysoc->town,$form); + $form = str_replace('__MAIN_INFO_SOCIETE_TOWN__',$mysoc->town,$form); $form = str_replace('__DONATOR_NAME__',$don->nom,$form); $form = str_replace('__DONATOR_ADDRESS__',$don->address,$form); $form = str_replace('__DONATOR_ZIP__',$don->cp,$form); - $form = str_replace('__DONATOR_TOWN__',$don->ville,$form); + $form = str_replace('__DONATOR_TOWN__',$don->town,$form); $form = str_replace('__PAYMENTMODE_LIB__ ', $paymentmode,$form); $form = str_replace('__NOW__',dol_print_date($now,'',false,$outputlangs),$form); $form = str_replace('__DonationRef__',$outputlangs->trans("DonationRef"),$form); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 4dea8571657..d6122188d4a 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.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"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.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.ville'=>"Text",'a.pays'=>"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.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.ville'=>"member",'a.pays'=>"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.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"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.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"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.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"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'); // 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.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.ville'=>"Town",'a.pays'=>"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.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"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'); // 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.prenom'=>'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.cp'=>'55000','a.ville'=>'New York','a.pays'=>'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.prenom'=>'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.cp'=>'55000','a.town'=>'New York','a.pays'=>'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')); } diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 841517904a8..976a5d97a5d 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -109,9 +109,9 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->fournisseur->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("fournisseur","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note"); - $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text"); - $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company"); // We define here only fields that use another picto + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note"); + $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text"); + $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company"); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_fournisseur as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; $this->export_sql_end[$r] .=' WHERE u.rowid = cf.fk_categorie AND cf.fk_societe = s.rowid'; @@ -124,9 +124,9 @@ class modCategorie extends DolibarrModules $this->export_icon[$r]='category'; $this->export_enabled[$r]='$conf->societe->enabled'; $this->export_permission[$r]=array(array("categorie","lire"),array("societe","lire")); - $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); - $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code'); - $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'s.fk_prospectlevel'=>'company','s.fk_stcomm'=>'company'); // We define here only fields that use another picto + $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'s.rowid'=>'IdThirdParty','s.nom'=>'Name','s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus'); + $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'s.rowid'=>'List:societe:nom','s.nom'=>'Text','s.prefix_comm'=>"Text",'s.client'=>"Text",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Numeric",'s.note'=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','s.fk_stcomm'=>'List:c_stcomm:libelle:code'); + $this->export_entities_array[$r]=array('s.rowid'=>'company','s.nom'=>'company','s.prefix_comm'=>"company",'s.client'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.town'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'s.fk_prospectlevel'=>'company','s.fk_stcomm'=>'company'); // We define here only fields that use another picto $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_societe as cf, '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'c_effectif as ce ON s.fk_effectif = ce.id LEFT JOIN '.MAIN_DB_PREFIX.'c_forme_juridique as cfj ON s.fk_forme_juridique = cfj.code'; $this->export_sql_end[$r] .=' WHERE u.rowid = cf.fk_categorie AND cf.fk_societe = s.rowid'; diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index c0eba504153..fbf3242dfec 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -173,10 +173,10 @@ class modCommande extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("commande","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"OrderDate",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"Billed",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Number",'cd.qty'=>"Number",'cd.total_ht'=>"Number",'cd.total_tva'=>"Number",'cd.total_ttc'=>"Number",'p.rowid'=>'List:Product:ref','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>"order",'c.note'=>"order",'c.date_livraison'=>"order",'cd.rowid'=>'order_line','cd.label'=>"order_line",'cd.description'=>"order_line",'cd.product_type'=>'order_line','cd.tva_tx'=>"order_line",'cd.qty'=>"order_line",'cd.total_ht'=>"order_line",'cd.total_tva'=>"order_line",'cd.total_ttc'=>"order_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 090fccecc0c..1bf908b7738 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -200,10 +200,10 @@ class modExpedition extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='Shipments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("expedition","shipment","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('shipment_line'=>'ed.rowid','product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 5abfb38522f..bdef1b5e6b9 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -174,10 +174,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -194,10 +194,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFicheinter.class.php b/htdocs/core/modules/modFicheinter.class.php index 2dbce31d675..a46347ee895 100644 --- a/htdocs/core/modules/modFicheinter.class.php +++ b/htdocs/core/modules/modFicheinter.class.php @@ -138,10 +138,10 @@ class modFicheinter extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("ficheinter","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); $this->export_dependencies_array[$r]=array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index e484b41dabf..b6f0866d996 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -242,10 +242,10 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et lignes de facture'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -261,10 +261,10 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Factures fournisseurs et reglements'; $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; @@ -281,9 +281,9 @@ class modFournisseur extends DolibarrModules $this->export_label[$r]='Commandes fournisseurs et lignes de commandes'; $this->export_icon[$r]='order'; $this->export_permission[$r]=array(array("fournisseur","commande","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); //$this->export_TypeFields_array[$r]=array(); // TODO add fields type - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','c.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modGravatar.class.php b/htdocs/core/modules/modGravatar.class.php index 13aef872a05..219e9f3e562 100644 --- a/htdocs/core/modules/modGravatar.class.php +++ b/htdocs/core/modules/modGravatar.class.php @@ -168,8 +168,8 @@ class modGravatar extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modHoliday.class.php b/htdocs/core/modules/modHoliday.class.php index d9095f05711..b1582c632f0 100644 --- a/htdocs/core/modules/modHoliday.class.php +++ b/htdocs/core/modules/modHoliday.class.php @@ -265,9 +265,9 @@ class modHoliday extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); - // $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.town'=>'soc_town','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.price'=>"lineprice",'fd.total_ht'=>"linetotalht",'fd.total_tva'=>"linetotaltva",'fd.total_ttc'=>"linetotalttc",'fd.tva_tx'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend",'fd.fk_product'=>'productid','p.ref'=>'productref'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modPaybox.class.php b/htdocs/core/modules/modPaybox.class.php index 61b94756890..01747274e66 100644 --- a/htdocs/core/modules/modPaybox.class.php +++ b/htdocs/core/modules/modPaybox.class.php @@ -164,8 +164,8 @@ class modPayBox extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modPaypal.class.php b/htdocs/core/modules/modPaypal.class.php index b5bc49c7092..a62034f3a50 100644 --- a/htdocs/core/modules/modPaypal.class.php +++ b/htdocs/core/modules/modPaypal.class.php @@ -156,8 +156,8 @@ class modPaypal extends DolibarrModules // $this->export_code[$r]=$this->rights_class.'_'.$r; // $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found) // $this->export_permission[$r]=array(array("facture","facture","export")); - // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); - // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); + // $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef'); + // $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product'); // $this->export_sql_start[$r]='SELECT DISTINCT '; // $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)'; // $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)'; diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index e2aa17d9cb8..b4644c9b1c0 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -147,18 +147,18 @@ class modProjet extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("projet","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country', + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country', 's.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode', 'p.rowid'=>"ProjectId",'p.ref'=>"ProjectRef",'p.datec'=>"DateCreation",'p.dateo'=>"DateDebutProjet",'p.datee'=>"DateFinProjet",'p.fk_statut'=>'ProjectStatus','p.description'=>"projectNote", 'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateo",'pt.datee'=>"TaskDatee",'pt.duration_effective'=>"DurationEffective",'pt.duration_planned'=>"DurationPlanned",'pt.progress'=>"Progress",'pt.description'=>"TaskDesc"); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle', - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.fk_pays'=>'List:c_pays:libelle', + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle', 's.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text', 'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text", 'pt.dateo'=>"Date",'pt.datee'=>"Date",'pt.duration_effective'=>"Duree",'pt.duration_planned'=>"Duree",'pt.progress'=>"Number",'pt.description'=>"Text"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company', + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','s.fk_pays'=>'company', 's.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company', 'f.rowid'=>"project",'f.ref'=>"project",'f.datec'=>"project",'f.duree'=>"project",'f.fk_statut'=>"project",'f.description'=>"project", 'pt.rowid'=>'task','pt.dateo'=>"task",'pt.datee'=>"task",'pt.duration_effective'=>"task",'pt.duration_planned'=>"task",'pt.progress'=>"task",'pt.description'=>"task"); diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index 1ec8a26c29b..82966ac8b18 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -167,10 +167,10 @@ class modPropale extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]='ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("propale","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.town'=>'Town','cp.code'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.datec'=>"DateCreation",'c.datep'=>"DatePropal",'c.fin_validite'=>"DateEndPropal",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total'=>"TotalTTC",'c.fk_statut'=>'Status','c.note'=>"Note",'c.date_livraison'=>'DeliveryDate','cd.rowid'=>'LineId','cd.label'=>"Label",'cd.description'=>"LineDescription",'cd.product_type'=>'TypeOfLineServiceOrProduct','cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty",'cd.total_ht'=>"LineTotalHT",'cd.total_tva'=>"LineTotalVAT",'cd.total_ttc'=>"LineTotalTTC",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.town'=>'Text','cp.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.datec'=>"Date",'c.datep'=>"Date",'c.fin_validite'=>"Date",'c.remise_percent'=>"Numeric",'c.total_ht'=>"Numeric",'c.total'=>"Numeric",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','cd.description'=>"Text",'cd.product_type'=>'Boolean','cd.tva_tx'=>"Numeric",'cd.qty'=>"Numeric",'cd.total_ht'=>"Numeric",'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.ref'=>'Text','p.label'=>'Text'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.town'=>'company','cp.code'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"propal",'c.ref'=>"propal",'c.ref_client'=>"propal",'c.fk_soc'=>"propal",'c.datec'=>"propal",'c.datep'=>"propal",'c.fin_validite'=>"propal",'c.remise_percent'=>"propal",'c.total_ht'=>"propal",'c.total'=>"propal",'c.fk_statut'=>"propal",'c.note'=>"propal",'c.date_livraison'=>"propal",'cd.rowid'=>'propal_line','cd.label'=>"propal_line",'cd.description'=>"propal_line",'cd.product_type'=>'propal_line','cd.tva_tx'=>"propal_line",'cd.qty'=>"propal_line",'cd.total_ht'=>"propal_line",'cd.total_tva'=>"propal_line",'cd.total_ttc'=>"propal_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); $this->export_dependencies_array[$r]=array('propal_line'=>'cd.rowid','product'=>'cd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 5581b5720b3..1f4af151555 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -248,10 +248,10 @@ class modSociete extends DolibarrModules $this->export_label[$r]='ExportDataset_company_1'; $this->export_icon[$r]='company'; $this->export_permission[$r]=array(array("societe","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); + $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.status'=>"Status",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.default_lang'=>"DefaultLang",'s.siren'=>"ProfId1",'s.siret'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.idprof5'=>"ProfId5",'s.idprof6'=>"ProfId6",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType",'ce.code'=>"Staff","cfj.libelle"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','d.nom'=>'State'); if (! empty($conf->global->SOCIETE_USEPREFIX)) $this->export_fields_array[$r]['s.prefix']='Prefix'; - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"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'=>"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'=>'List:c_departements:nom:rowid'); - $this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.ville'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"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'=>"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_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"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'=>"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'=>'List:c_departements:nom:rowid'); + $this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Text",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.address'=>"Text",'s.cp'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:rowid",'p.code'=>"Text",'s.tel'=>"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'=>"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 FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; @@ -283,7 +283,7 @@ class modSociete extends DolibarrModules $this->export_label[$r]='ExportDataset_company_2'; $this->export_icon[$r]='contact'; $this->export_permission[$r]=array(array("societe","contact","export")); - $this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.ville'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); + $this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.town'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company"); // We define here only fields that use another picto if (empty($conf->fournisseur->enabled)) { @@ -322,7 +322,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='company'; $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('s'=>MAIN_DB_PREFIX.'societe','extra'=>MAIN_DB_PREFIX.'societe_extrafields'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.nom'=>"Name*",'s.status'=>"Status",'s.client'=>"Customer*",'s.fournisseur'=>"Supplier*",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.code_compta'=>"CustomerAccountancyCode",'s.code_compta_fournisseur'=>"SupplierAccountancyCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"ProfId1",'s.siren'=>"ProfId2",'s.ape'=>"ProfId3",'s.idprof4'=>"ProfId4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'s.fk_typent'=>"ThirdPartyType",'s.fk_effectif'=>"Staff","s.fk_forme_juridique"=>"JuridicalStatus",'s.fk_prospectlevel'=>'ProspectLevel','s.fk_stcomm'=>'ProspectStatus','s.default_lang'=>'DefaultLanguage','s.barcode'=>'BarCode','s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'company'"; $resql=$this->db->query($sql); @@ -348,7 +348,7 @@ class modSociete extends DolibarrModules ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.ville'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); + $this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.cp'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.tel'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note'=>"This is an example of note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789'); // Import list of contact and attributes $r++; @@ -357,7 +357,7 @@ class modSociete extends DolibarrModules $this->import_icon[$r]='contact'; $this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); + $this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.name'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.cp'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note'=>"Note",'s.datec'=>"DateCreation"); // Add extra fields $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'contact'"; $resql=$this->db->query($sql); @@ -378,7 +378,7 @@ class modSociete extends DolibarrModules ); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); $this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - $this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.cp'=>'75000','s.ville'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments"); + $this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.cp'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments"); // Import Bank Accounts $r++; From a0df6764d8da1073cfee1993113cf1161e5d72a8 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:13:11 +0100 Subject: [PATCH 15/23] english standardization --- htdocs/core/modules/modStock.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 6375db4da5e..8b18e5d0c1c 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -122,9 +122,9 @@ class modStock extends DolibarrModules $this->export_code[$r]=$this->rights_class.'_'.$r; $this->export_label[$r]="WarehousesAndProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("stock","lire")); - $this->export_fields_array[$r]=array('e.rowid'=>'IdWarehouse','e.label'=>'LocationSummary','e.description'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.ville'=>'Town','p.rowid'=>"ProductId",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'Stock'); - $this->export_TypeFields_array[$r]=array('e.rowid'=>'List:entrepot:LabelWareHouse','e.label'=>'Text','e.label'=>'Text','e.lieu'=>'Text','e.address'=>'Text','e.cp'=>'Text','e.ville'=>'Text','p.rowid'=>"List:produit:label",'p.ref'=>"Text",'p.fk_product_type'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.note'=>"Text",'p.price'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date','ps.reel'=>'Number'); - $this->export_entities_array[$r]=array('e.rowid'=>'warehouse','e.label'=>'warehouse','e.description'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.ville'=>'warehouse','p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.tosell'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock'); + $this->export_fields_array[$r]=array('e.rowid'=>'IdWarehouse','e.label'=>'LocationSummary','e.description'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.town'=>'Town','p.rowid'=>"ProductId",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'Stock'); + $this->export_TypeFields_array[$r]=array('e.rowid'=>'List:entrepot:LabelWareHouse','e.label'=>'Text','e.label'=>'Text','e.lieu'=>'Text','e.address'=>'Text','e.cp'=>'Text','e.town'=>'Text','p.rowid'=>"List:produit:label",'p.ref'=>"Text",'p.fk_product_type'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.note'=>"Text",'p.price'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date','ps.reel'=>'Number'); + $this->export_entities_array[$r]=array('e.rowid'=>'warehouse','e.label'=>'warehouse','e.description'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.town'=>'warehouse','p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.tosell'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock'); $this->export_aggregate_array[$r]=array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r]=array('stock'=>array('p.rowid','e.rowid')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them From 57a75d9882ff7b653ac519d3447636253d19455e Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:15:49 +0100 Subject: [PATCH 16/23] english standardization --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + 1 file changed, 1 insertion(+) 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 a085eed35f1..75d303b4da8 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 @@ -49,6 +49,7 @@ alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN ville town text; +alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; From c88f2bcb45d0e853d36069c6298dc51155f2a210 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Fri, 22 Feb 2013 17:43:33 +0100 Subject: [PATCH 17/23] english standardization --- htdocs/fourn/index.php | 2 +- htdocs/fourn/liste.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 51fda73d8df..c03004cf7b5 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -228,7 +228,7 @@ print ''; * List last modified supliers */ $max=10; -$sql = "SELECT s.rowid as socid, s.nom, s.ville, s.datec, s.datea, s.tms, s.prefix_comm, s.code_fournisseur, s.code_compta_fournisseur"; +$sql = "SELECT s.rowid as socid, s.nom, s.town, s.datec, s.datea, s.tms, s.prefix_comm, s.code_fournisseur, s.code_compta_fournisseur"; $sql.= ", st.libelle as stcomm"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st"; diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index 13361f10eb2..74913f4e548 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -34,7 +34,7 @@ $langs->load("companies"); $socname = GETPOST("socname"); $search_nom = GETPOST("search_nom"); $search_zipcode = GETPOST("search_zipcode"); -$search_ville = GETPOST("search_ville"); +$search_town = GETPOST("search_town"); $search_code_fournisseur = GETPOST("search_code_fournisseur"); $search_compta_fournisseur = GETPOST("search_compta_fournisseur"); $search_datec = GETPOST("search_datec"); @@ -77,7 +77,7 @@ $thirdpartystatic=new Societe($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); -$sql = "SELECT s.rowid as socid, s.nom, s.cp as zip, s.ville, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, "; +$sql = "SELECT s.rowid as socid, s.nom, s.cp as zip, s.town, s.datec, s.datea, st.libelle as stcomm, s.prefix_comm, s.status as status, "; $sql.= "code_fournisseur, code_compta_fournisseur"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -96,7 +96,7 @@ if ($socname) } if ($search_nom) $sql .= " AND s.nom LIKE '%".$db->escape($search_nom)."%'"; if ($search_zipcode) $sql .= " AND s.cp LIKE '".$db->escape($search_zipcode)."%'"; -if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_code_fournisseur) $sql .= " AND s.code_fournisseur LIKE '%".$db->escape($search_code_fournisseur)."%'"; if ($search_compta_fournisseur) $sql .= " AND s.code_compta_fournisseur LIKE '%".$db->escape($search_compta_fournisseur)."%'"; if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; @@ -120,7 +120,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $param = "&search_nom=".$search_nom."&search_code_fournisseur=".$search_code_fournisseur."&search_zipcode=".$search_zipcode."&search_ville=".$search_ville; + $param = "&search_nom=".$search_nom."&search_code_fournisseur=".$search_code_fournisseur."&search_zipcode=".$search_zipcode."&search_town=".$search_town; if ($search_categ != '') $param.='&search_categ='.$search_categ; print_barre_liste($langs->trans("ListOfSuppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); @@ -147,7 +147,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.cp","",$param,'valign="middle"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$param,'valign="middle"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,'valign="middle"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SupplierCode"),$_SERVER["PHP_SELF"],"s.code_fournisseur","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta_fournisseur","",$param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="right"',$sortfield,$sortorder); @@ -164,7 +164,7 @@ if ($resql) print ''; - print ''; + print ''; print ''; print ''; @@ -201,7 +201,7 @@ if ($resql) print $thirdpartystatic->getNomUrl(1,'supplier'); print "\n"; print ''.$obj->zip.''."\n"; - print ''.$obj->ville.''."\n"; + print ''.$obj->town.''."\n"; print ''.$obj->code_fournisseur.' '; print ''.$obj->code_compta_fournisseur.' '; print ''; From 88458ca466fd90e69023db3599d7af8944f6c277 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 10:18:05 +0100 Subject: [PATCH 18/23] english standardization --- htdocs/product/stock/class/entrepot.class.php | 6 ++---- htdocs/product/stock/fiche-valo.php | 2 +- htdocs/product/stock/fiche.php | 6 ++---- htdocs/product/stock/liste.php | 4 ++-- htdocs/product/stock/valo.php | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index f3f84b42262..3f597aae505 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -44,7 +44,6 @@ class Entrepot extends CommonObject var $address; //! Code Postal var $cp; // deprecated - var $ville; // deprecated var $zip; var $town; @@ -155,7 +154,7 @@ class Entrepot extends CommonObject $sql .= ", lieu = '" . $this->db->escape($this->lieu) ."'"; $sql .= ", address = '" . $this->db->escape($this->address) ."'"; $sql .= ", cp = '" . $this->db->escape($this->zip) ."'"; - $sql .= ", ville = '" . $this->db->escape($this->town) ."'"; + $sql .= ", town = '" . $this->db->escape($this->town) ."'"; $sql .= ", fk_pays = " . $this->country_id; $sql .= " WHERE rowid = " . $id; @@ -247,7 +246,7 @@ class Entrepot extends CommonObject { global $conf; - $sql = "SELECT rowid, label, description, statut, lieu, address, cp as zip, ville as town, fk_pays as country_id"; + $sql = "SELECT rowid, label, description, statut, lieu, address, cp as zip, town, fk_pays as country_id"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot"; if ($id) @@ -277,7 +276,6 @@ class Entrepot extends CommonObject $this->lieu = $obj->lieu; $this->address = $obj->address; $this->cp = $obj->zip; // deprecated - $this->ville = $obj->town; // deprecated $this->pays_id = $obj->country_id; // deprecated $this->zip = $obj->zip; $this->town = $obj->town; diff --git a/htdocs/product/stock/fiche-valo.php b/htdocs/product/stock/fiche-valo.php index 05d1053a0a5..b8da31aa889 100644 --- a/htdocs/product/stock/fiche-valo.php +++ b/htdocs/product/stock/fiche-valo.php @@ -78,7 +78,7 @@ if ($_GET["id"]) print ''; print ''.$langs->trans('Zip').''.$entrepot->cp.''; - print ''.$langs->trans('Town').''.$entrepot->ville.''; + print ''.$langs->trans('Town').''.$entrepot->town.''; print ''.$langs->trans('Country').''; print $entrepot->pays; diff --git a/htdocs/product/stock/fiche.php b/htdocs/product/stock/fiche.php index 5737bd04e62..07b01bb7d34 100644 --- a/htdocs/product/stock/fiche.php +++ b/htdocs/product/stock/fiche.php @@ -65,7 +65,6 @@ if ($action == 'add' && $user->rights->stock->creer) $object->lieu = $_POST["lieu"]; $object->address = $_POST["address"]; $object->cp = $_POST["zipcode"]; - $object->ville = $_POST["town"]; $object->pays_id = $_POST["country_id"]; $object->zip = $_POST["zipcode"]; $object->town = $_POST["town"]; @@ -118,7 +117,6 @@ if ($action == 'update' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->lieu = $_POST["lieu"]; $object->address = $_POST["address"]; $object->cp = $_POST["zipcode"]; - $object->ville = $_POST["town"]; $object->pays_id = $_POST["country_id"]; $object->zip = $_POST["zipcode"]; $object->town = $_POST["town"]; @@ -270,7 +268,7 @@ else print $object->address; print ''; - // Ville + // Town print ''.$langs->trans('Zip').''.$object->zip.''; print ''.$langs->trans('Town').''.$object->town.''; @@ -281,7 +279,7 @@ else print $object->country; print ''; - // Statut + // Status print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; $calcproducts=$object->nb_products(); diff --git a/htdocs/product/stock/liste.php b/htdocs/product/stock/liste.php index a17cc1891c5..e9ab3819d33 100644 --- a/htdocs/product/stock/liste.php +++ b/htdocs/product/stock/liste.php @@ -45,7 +45,7 @@ $limit = $conf->liste_limit; $offset = $limit * $page; -$sql = "SELECT e.rowid, e.label as ref, e.statut, e.lieu, e.address, e.cp, e.ville, e.fk_pays"; +$sql = "SELECT e.rowid, e.label as ref, e.statut, e.lieu, e.address, e.cp, e.town, e.fk_pays"; $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql.= " WHERE e.entity = ".$conf->entity; if ($sref) @@ -54,7 +54,7 @@ if ($sref) } if ($sall) { - $sql.= " AND (e.description like '%".$sall."%' OR e.lieu like '%".$sall."%' OR e.address like '%".$sall."%' OR e.ville like '%".$sall."%')"; + $sql.= " AND (e.description like '%".$sall."%' OR e.lieu like '%".$sall."%' OR e.address like '%".$sall."%' OR e.town like '%".$sall."%')"; } $sql.= " ORDER BY $sortfield $sortorder"; $sql.= $db->plimit($limit+1, $offset); diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 1c3ef982667..842c2163202 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -68,7 +68,7 @@ if ($sall) $sql.= " OR e.description LIKE '%".$db->escape($sall)."%'"; $sql.= " OR e.lieu LIKE '%".$db->escape($sall)."%'"; $sql.= " OR e.address LIKE '%".$db->escape($sall)."%'"; - $sql.= " OR e.ville LIKE '%".$db->escape($sall)."%')"; + $sql.= " OR e.town LIKE '%".$db->escape($sall)."%')"; } $sql.= " GROUP BY e.rowid, e.label, e.statut, e.lieu"; $sql.= $db->order($sortfield,$sortorder); From 9400d9897a9a26c56998c8cc23583d629608ffcc Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 10:35:46 +0100 Subject: [PATCH 19/23] english standardization --- htdocs/public/members/public_list.php | 6 ++--- htdocs/societe/agenda.php | 2 +- .../canvas/individual/tpl/card_create.tpl.php | 2 +- .../canvas/individual/tpl/card_view.tpl.php | 2 +- htdocs/societe/class/address.class.php | 7 ++--- htdocs/societe/class/societe.class.php | 26 ++++++------------- 6 files changed, 16 insertions(+), 29 deletions(-) diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index e49bab35a4d..13fced8eda2 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -101,14 +101,14 @@ if (! $sortfield) { $sortfield="nom"; } llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers")); -$sql = "SELECT rowid, prenom, nom, societe, cp as zip, ville as town, email, naiss, photo"; +$sql = "SELECT rowid, prenom, nom, societe, cp as zip, town, email, naiss, photo"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent"; $sql.= " WHERE entity = ".$entity; $sql.= " AND statut = 1"; $sql.= " AND public = 1"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -//$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, ville, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; +//$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; //$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; //$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); @@ -130,7 +130,7 @@ if ($result) //print_liste_field_titre($langs->trans("DateToBirth"),"public_list.php","naiss",'',$param,$sortfield,$sortorder); // est-ce nĂ©cessaire ?? print_liste_field_titre($langs->trans("EMail"),"public_list.php","email",'',$param,$sortfield,$sortorder); print_liste_field_titre($langs->trans("Zip"),"public_list.php","cp","",$param,$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),"public_list.php","ville","",$param,$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),"public_list.php","town","",$param,$sortfield,$sortorder); print "".$langs->trans("Photo")."\n"; print "\n"; diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index bc9b11b3149..abe85206fca 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -120,7 +120,7 @@ if ($socid) // Zip / Town print ''.$langs->trans('Zip').''.$soc->cp.""; - print ''.$langs->trans('Town').''.$soc->ville.""; + print ''.$langs->trans('Town').''.$soc->town.""; // Country if ($soc->pays) { diff --git a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php index b4ae5c5547c..d889db81ab9 100644 --- a/htdocs/societe/canvas/individual/tpl/card_create.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_create.tpl.php @@ -122,7 +122,7 @@ trans('Zip'); ?> control->tpl['autofilltownfromzip']; ?> trans('Town'); ?> - + diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php index 75179a3a04a..30794b2a604 100644 --- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php +++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php @@ -84,7 +84,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company'); trans('Zip'); ?> control->tpl['cp']; ?> trans('Town'); ?> - control->tpl['ville']; ?> + control->tpl['town']; ?> diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 07830e7bb0b..7a8ba22dd41 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -40,7 +40,6 @@ class Address var $address; var $cp; // deprecated var $zip; - var $ville; // deprecated var $town; var $pays_id; // deprecated var $country_id; @@ -271,7 +270,7 @@ class Address { $sql = 'SELECT a.rowid as id, a.label, a.name, a.address, a.datec as dc'; $sql .= ', a.tms as date_update, a.fk_soc'; - $sql .= ', a.cp as zip, a.ville as town, a.note, a.fk_pays as country_id, a.tel, a.fax'; + $sql .= ', a.cp as zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; $sql .= ', p.code as country_code, p.libelle as country'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; @@ -305,7 +304,6 @@ class Address // deprecated $line->cp = $line->zip; - $line->ville = $line->town; $line->pays_id = $line->country_id; $line->pays_code = $line->country_code; $line->pays = $line->country; @@ -350,7 +348,7 @@ class Address $sql = 'SELECT a.rowid, a.fk_soc, a.label, a.name, a.address, a.datec as date_creation'; $sql .= ', a.tms as date_update'; - $sql .= ', a.cp as zip, a.ville as town, a.note, a.fk_pays as country_id, a.tel, a.fax'; + $sql .= ', a.cp as zip, a.town, a.note, a.fk_pays as country_id, a.tel, a.fax'; $sql .= ', p.code as country_code, p.libelle as country'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_address as a'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid'; @@ -384,7 +382,6 @@ class Address // deprecated $this->cp = $this->zip; - $this->ville = $this->town; $this->pays_id = $this->country_id; $this->pays_code = $this->country_code; $this->pays = $this->country; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 4d45d8d01f9..b73902851db 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -48,10 +48,8 @@ class Societe extends CommonObject var $particulier; var $civility_id; var $address; - var $adresse; // TODO obsolete var $cp; // TODO obsolete var $zip; - var $ville; // TODO obsolete var $town; var $status; // 0=activity ceased, 1= in activity @@ -394,12 +392,10 @@ class Societe extends CommonObject $this->name = $this->name?trim($this->name):trim($this->nom); $this->nom = trim($this->nom); // TODO obsolete $this->ref_ext = trim($this->ref_ext); - $this->address = $this->address?trim($this->address):trim($this->adresse); - $this->adresse = $this->address; // TODO obsolete + $this->address = $this->address?trim($this->address):trim($this->address); $this->zip = $this->zip?trim($this->zip):trim($this->cp); $this->cp = $this->zip; // TODO obsolete - $this->town = $this->town?trim($this->town):trim($this->ville); - $this->ville = $this->town; // TODO obsolete + $this->town = $this->town?trim($this->town):trim($this->town); $this->state_id = trim($this->state_id); $this->country_id = ($this->country_id > 0)?$this->country_id:$this->pays_id; $this->pays_id = $this->country_id; // TODO obsolete @@ -501,7 +497,7 @@ class Societe extends CommonObject $sql .= ",address = '" . $this->db->escape($this->address) ."'"; $sql .= ",cp = ".(! empty($this->zip)?"'".$this->zip."'":"null"); - $sql .= ",ville = ".(! empty($this->town)?"'".$this->db->escape($this->town)."'":"null"); + $sql .= ",town = ".(! empty($this->town)?"'".$this->db->escape($this->town)."'":"null"); $sql .= ",fk_departement = '" . (! empty($this->state_id)?$this->state_id:'0') ."'"; $sql .= ",fk_pays = '" . (! empty($this->country_id)?$this->country_id:'0') ."'"; @@ -699,7 +695,7 @@ class Societe extends CommonObject $sql .= ', s.status'; $sql .= ', s.price_level'; $sql .= ', s.tms as date_update'; - $sql .= ', s.tel as phone, s.fax, s.email, s.url, s.cp as zip, s.ville as town, s.note, s.client, s.fournisseur'; + $sql .= ', s.tel as phone, s.fax, s.email, s.url, s.cp as zip, s.town, s.note, s.client, s.fournisseur'; $sql .= ', s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6'; $sql .= ', s.capital, s.tva_intra'; $sql .= ', s.fk_typent as typent_id'; @@ -760,11 +756,9 @@ class Societe extends CommonObject $this->date_update = $this->db->jdate($obj->date_update); $this->address = $obj->address; - $this->adresse = $obj->address; // TODO obsolete $this->zip = $obj->zip; $this->cp = $obj->zip; // TODO obsolete $this->town = $obj->town; - $this->ville = $obj->town; // TODO obsolete $this->pays_id = $obj->country_id; // TODO obsolete $this->country_id = $obj->country_id; @@ -2442,12 +2436,10 @@ class Societe extends CommonObject // Positionne parametres $this->nom=$name; // TODO obsolete $this->name=$name; - $this->adresse=$member->adresse; // TODO obsolete - $this->address=$member->adresse; + $this->address=$member->address; $this->cp=$member->cp; // TODO obsolete $this->zip=$member->cp; - $this->ville=$member->ville; // TODO obsolete - $this->town=$member->ville; + $this->town=$member->town; $this->pays_code=$member->country_code; // TODO obsolete $this->country_code=$member->country_code; $this->pays_id=$member->country_id; // TODO obsolete @@ -2508,16 +2500,14 @@ class Societe extends CommonObject $this->id=0; $this->name=empty($conf->global->MAIN_INFO_SOCIETE_NOM)?'':$conf->global->MAIN_INFO_SOCIETE_NOM; - $this->address=empty($conf->global->MAIN_INFO_SOCIETE_ADRESSE)?'':$conf->global->MAIN_INFO_SOCIETE_ADRESSE; + $this->address=empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS; $this->zip=empty($conf->global->MAIN_INFO_SOCIETE_CP)?'':$conf->global->MAIN_INFO_SOCIETE_CP; - $this->town=empty($conf->global->MAIN_INFO_SOCIETE_VILLE)?'':$conf->global->MAIN_INFO_SOCIETE_VILLE; + $this->town=empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN; $this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT; $this->note=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE; $this->nom=$this->name; // deprecated - $this->adresse=$this->address; // deprecated $this->cp=$this->zip; // deprecated - $this->ville=$this->town; // deprecated // We define country_id, country_code and country $country_id=$country_code=$country_label=''; From 529b8ae38e915e0ddf91fb1ff00dccfff0cf0b80 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 10:43:16 +0100 Subject: [PATCH 20/23] english standardization --- htdocs/societe/commerciaux.php | 2 +- htdocs/societe/lien.php | 6 +++--- htdocs/societe/societe.php | 16 ++++++++-------- scripts/members/sync_members_ldap2dolibarr.php | 2 -- test/phpunit/AdherentTest.php | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 8305e973adf..a5c8ec4a8b4 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -126,7 +126,7 @@ if ($_GET["socid"]) print "".$langs->trans('Address')."".nl2br($soc->address).""; print ''.$langs->trans('Zip').''.$soc->cp.""; - print ''.$langs->trans('Town').''.$soc->ville.""; + print ''.$langs->trans('Town').''.$soc->town.""; print ''.$langs->trans('Country').''.$soc->pays.''; diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index dbc2bb8a45d..cbb5aed7300 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -193,7 +193,7 @@ if ($socid) $socm = new Societe($db); $socm->fetch($soc->parent); print ''.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.''.($socm->code_client?" (".$socm->code_client.")":""); - print ($socm->ville?' - '.$socm->ville:''); + print ($socm->town?' - '.$socm->town:''); print ' '; print img_delete(); print '
'; @@ -233,7 +233,7 @@ if ($socid) $title=$langs->trans("CompanyList"); - $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,"; + $sql = "SELECT s.rowid as socid, s.nom, s.town, s.prefix_comm, s.client, s.fournisseur,"; $sql.= " te.code, te.libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."c_typent as te"; @@ -284,7 +284,7 @@ if ($socid) $var=!$var; print ""; print $obj->nom."\n"; - print "".$obj->ville." \n"; + print "".$obj->town." \n"; print "".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."\n"; print ''; if ($obj->client==1) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 6e370ea2220..9147d550242 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -40,7 +40,7 @@ $result = restrictedArea($user,'societe',$socid,''); $search_nom=trim(GETPOST("search_nom")); $search_nom_only=trim(GETPOST("search_nom_only")); $search_all=trim(GETPOST("search_all")); -$search_ville=trim(GETPOST("search_ville")); +$search_town=trim(GETPOST("search_town")); $socname=trim(GETPOST("socname")); $search_idprof1=trim(GETPOST('search_idprof1')); $search_idprof2=trim(GETPOST('search_idprof2')); @@ -150,7 +150,7 @@ if (GETPOST("button_removefilter_x")) $search_sale=''; $socname=""; $search_nom=""; - $search_ville=""; + $search_town=""; $search_idprof1=''; $search_idprof2=''; $search_idprof3=''; @@ -177,7 +177,7 @@ if ($socname) */ $title=$langs->trans("ListOfThirdParties"); -$sql = "SELECT s.rowid, s.nom as name, s.ville, s.datec, s.datea,"; +$sql = "SELECT s.rowid, s.nom as name, s.town, s.datec, s.datea,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; $sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) @@ -229,7 +229,7 @@ if ($search_nom) $sql.= " OR s.url LIKE '%".$db->escape($search_nom)."%'"; $sql.= ")"; } -if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_idprof1) $sql .= " AND s.siren LIKE '%".$db->escape($search_idprof1)."%'"; if ($search_idprof2) $sql .= " AND s.siret LIKE '%".$db->escape($search_idprof2)."%'"; if ($search_idprof3) $sql .= " AND s.ape LIKE '%".$db->escape($search_idprof3)."%'"; @@ -259,7 +259,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $params = "&socname=".$socname."&search_nom=".$search_nom."&search_ville=".$search_ville; + $params = "&socname=".$socname."&search_nom=".$search_nom."&search_town=".$search_town; $params.= '&search_idprof1='.$search_idprof1; $params.= '&search_idprof2='.$search_idprof2; $params.= '&search_idprof3='.$search_idprof3; @@ -318,7 +318,7 @@ if ($resql) // Lines of titles print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$params,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$params,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$params,'',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$params,'nowrap="nowrap"',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$params,'nowrap="nowrap"',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$params,'nowrap="nowrap"',$sortfield,$sortorder); @@ -335,7 +335,7 @@ if ($resql) if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only; print ''; print ''; - print ''; + print ''; print ''; // IdProf1 print ''; @@ -385,7 +385,7 @@ if ($resql) $companystatic->status=$obj->status; print $companystatic->getNomUrl(1,'',24); print "\n"; - print "".$obj->ville."\n"; + print "".$obj->town."\n"; print "".$obj->idprof1."\n"; print "".$obj->idprof2."\n"; print "".$obj->idprof3."\n"; diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index bbe3f9ab100..d2e26aa2527 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -193,11 +193,9 @@ if ($result >= 0) $member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD]; //$member->societe; - $member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // deprecated $member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; $member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; // deprecated $member->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; - $member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; // deprecated $member->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; $member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // deprecated $member->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 75a95cb4df0..07c7703605a 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -282,7 +282,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase $template = '%DOL_MAIN_URL_ROOT%,%ID%,%CIVILITE%,%FIRSTNAME%,%LASTNAME%,%FULLNAME%,%COMPANY%,'. '%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%,%EMAIL%,%NAISS%,%PHOTO%,%LOGIN%,%PASSWORD%,%PRENOM%,'. - '%NOM%,%SOCIETE%,%ADRESSE%,%CP%,%VILLE%,%PAYS%'; + '%NOM%,%SOCIETE%,%ADDRESS%,%CP%,%TOWN%,%PAYS%'; $expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',0,New firstname,New name,New firstname New name,'. 'New company,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->naiss,'day').',,'. From 250a94109689ff1900f2cafb0a20c2121fc57bde Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 11:11:33 +0100 Subject: [PATCH 21/23] english standardization --- .../actions_adherentcard_common.class.php | 2 +- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/adherents/cartes/carte.php | 4 ++-- htdocs/adherents/class/adherent.class.php | 15 +++++--------- htdocs/adherents/cotisations.php | 6 +++--- htdocs/adherents/document.php | 2 +- htdocs/adherents/fiche.php | 14 +++++-------- htdocs/adherents/index.php | 6 +++--- htdocs/adherents/liste.php | 18 ++++++++--------- htdocs/adherents/type.php | 20 +++++++++---------- .../install/mysql/migration/3.3.0-3.4.0.sql | 1 + 11 files changed, 41 insertions(+), 49 deletions(-) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 9fc872f6e2f..c0777275201 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -367,7 +367,7 @@ abstract class ActionsAdherentCardCommon // Full firstname and name separated with a dot : firstname.name include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $login=dol_buildlogin($this->object->nom, $this->object->prenom); + $login=dol_buildlogin($this->object->lastname, $this->object->prenom); $generated_password=getRandomPassword(''); $password=$generated_password; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 9d408af9ed6..7e124e37e8a 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -654,7 +654,7 @@ if ($rowid) */ if ($action != 'addsubscription' && $action != 'create_thirdparty') { - $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe,"; + $sql = "SELECT d.rowid, d.prenom, d.lastname, d.societe,"; $sql.= " c.rowid as crowid, c.cotisation,"; $sql.= " c.dateadh,"; $sql.= " c.datef,"; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index c069c02be0c..490dddbb268 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -61,7 +61,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg $arrayofmembers=array(); // requete en prenant que les adherents a jour de cotisation - $sql = "SELECT d.rowid, d.prenom as firstname, d.nom as lastname, d.login, d.societe as company, d.datefin,"; + $sql = "SELECT d.rowid, d.prenom as firstname, d.lastname, d.login, d.societe as company, d.datefin,"; $sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,"; $sql.= " t.libelle as type,"; $sql.= " p.code as country_code, p.libelle as country"; @@ -110,7 +110,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated // For backward compatibility '%PRENOM%'=>$objp->firstname, - '%NOM%'=>$objp->lastname, + '%LASTNAME%'=>$objp->lastname, '%SOCIETE%'=>$objp->company, '%ADDRESS%'=>$objp->address, '%CP%'=>$objp->zip, diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 9f813f774ad..3b348f027a5 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -47,14 +47,12 @@ class Adherent extends CommonObject var $firstname; var $prenom; // deprecated var $lastname; - var $nom; // deprecated var $login; var $pass; var $societe; var $address; var $cp; var $zip; - //var $ville; // deprecated var $town; var $state_id; // Id of department @@ -230,7 +228,7 @@ class Adherent extends CommonObject // For backward compatibility '%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos, '%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, - '%NOM%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, + '%LASTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, '%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, @@ -401,7 +399,7 @@ class Adherent extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncuser=".$nosyncuser.", nosyncuserpass=".$nosyncuserpass.", email=".$this->email); // Clean parameters - $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->nom); + $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom); $this->address=($this->address?$this->address:$this->address); $this->zip=($this->zip?$this->zip:$this->cp); @@ -424,7 +422,7 @@ class Adherent extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; $sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null"); $sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null"); - $sql.= ", nom=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null"); + $sql.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null"); $sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null"); $sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"null"); $sql.= ", fk_soc=" .($this->fk_soc > 0?"'".$this->fk_soc."'":"null"); @@ -526,7 +524,6 @@ class Adherent extends CommonObject $luser->firstname=$this->firstname; $luser->lastname=$this->lastname; $luser->prenom=$this->firstname; // deprecated - $luser->nom=$this->lastname; // deprecated $luser->login=$this->user_login; $luser->pass=$this->pass; $luser->societe_id=$this->societe; @@ -1018,7 +1015,7 @@ class Adherent extends CommonObject { global $langs; - $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.nom as lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; + $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,"; $sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.datec as datec,"; @@ -1058,7 +1055,6 @@ class Adherent extends CommonObject $this->civilite_id = $obj->civilite; $this->prenom = $obj->firstname; // deprecated $this->firstname = $obj->firstname; - $this->nom = $obj->lastname; // deprecated $this->lastname = $obj->lastname; $this->login = $obj->login; $this->pass = $obj->pass; @@ -1067,7 +1063,6 @@ class Adherent extends CommonObject $this->address = $obj->address; $this->cp = $obj->zip; // deprecated $this->zip = $obj->zip; - //$this->ville = $obj->town; // deprecated $this->town = $obj->town; $this->state_id = $obj->fk_departement; @@ -1817,7 +1812,7 @@ class Adherent extends CommonObject // Member if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname; - if ($this->nom && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom; + if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname; if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom; if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login; if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 1361a5f9123..b9a02903a15 100644 --- a/htdocs/adherents/cotisations.php +++ b/htdocs/adherents/cotisations.php @@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu if ($msg) print $msg.'
'; // Liste des cotisations -$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe,"; +$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe,"; $sql.= " c.rowid as crowid, c.cotisation,"; $sql.= " c.dateadh,"; $sql.= " c.datef,"; @@ -96,7 +96,7 @@ if ($result) print ''; print_liste_field_titre($langs->trans("Ref"),"cotisations.php","c.rowid",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder); if (! empty($conf->banque->enabled)) @@ -141,7 +141,7 @@ if ($result) // Ref print ''.$cotisation->getNomUrl(1).''; - // Nom + // Lastname print ''.$adherent->getNomUrl(1).''; // Login diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 720d1a8a17f..589b946a52c 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -159,7 +159,7 @@ if ($id > 0) print ''.$langs->trans("UserTitle").''.$member->getCivilityLabel().' '; print ''; - // Nom + // Lastname print ''.$langs->trans("Lastname").''.$member->lastname.' '; print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index b2e4bf612d0..3b1102fe31d 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -252,7 +252,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) // Change values $object->civilite_id = trim($_POST["civilite_id"]); $object->prenom = trim($_POST["prenom"]); // deprecated - $object->nom = trim($_POST["nom"]); // deprecated $object->firstname = trim($_POST["prenom"]); $object->lastname = trim($_POST["nom"]); $object->login = trim($_POST["login"]); @@ -262,7 +261,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->address = trim($_POST["address"]); $object->cp = trim($_POST["zipcode"]); // deprecated $object->zip = trim($_POST["zipcode"]); - //$object->ville = trim($_POST["town"]); // deprecated $object->town = trim($_POST["town"]); $object->state_id = $_POST["departement_id"]; $object->country_id = $_POST["country_id"]; @@ -409,7 +407,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $typeid=$_POST["typeid"]; $civilite_id=$_POST["civilite_id"]; - $nom=$_POST["nom"]; + $lastname=$_POST["lastname"]; $prenom=$_POST["prenom"]; $societe=$_POST["societe"]; $address=$_POST["address"]; @@ -435,14 +433,12 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->civilite_id = $civilite_id; $object->prenom = $prenom; // deprecated - $object->nom = $nom; // deprecated $object->firstname = $prenom; $object->lastname = $nom; $object->societe = $societe; $object->address = $address; $object->cp = $zip; // deprecated $object->zip = $zip; - //$object->ville = $town; // deprecated $object->town = $town; $object->fk_departement = $state_id; $object->state_id = $state_id; @@ -501,7 +497,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Password"))."
\n"; } } - if (empty($nom)) { + if (empty($lastname)) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; @@ -821,7 +817,7 @@ else print ''; // Lastname - print ''.$langs->trans("Lastname").''; + print ''.$langs->trans("Lastname").''; print ''; // Firstname @@ -1077,8 +1073,8 @@ else print ''; print ''; - // Name - print ''.$langs->trans("Lastname").'lastname).'">'; + // Lastname + print ''.$langs->trans("Lastname").'lastname).'">'; print ''; // Firstname diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 03048a443bf..263e25fc4ec 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -140,7 +140,7 @@ print $langs->trans("Ref").':'; print ""; print ''; -print $langs->trans("Name").':'; +print $langs->trans("Name").':'; print ''; print ""; print ''; @@ -205,7 +205,7 @@ $var=true; */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; $sql.= " a.tms as datem, datefin as date_end_subscription,"; $sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; @@ -265,7 +265,7 @@ else */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; $sql.= " datefin as date_end_subscription,"; $sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c"; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index afbee9d9ffb..3332e4f8334 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -39,7 +39,7 @@ $filter=GETPOST("filter"); $statut=GETPOST("statut"); $search=GETPOST("search"); $search_ref=GETPOST("search_ref"); -$search_nom=GETPOST("search_nom"); +$search_lastname=GETPOST("search_lastname"); $search_prenom=GETPOST("search_prenom"); $search_login=GETPOST("search_login"); $type=GETPOST("type"); @@ -56,13 +56,13 @@ $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); } -if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.nom"); } +if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } if (GETPOST("button_removefilter")) { $search=""; $search_ref=""; - $search_nom=""; + $search_lastname=""; $search_prenom=""; $search_login=""; $type=""; @@ -86,7 +86,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé $now=dol_now(); -$sql = "SELECT d.rowid, d.login, d.nom as lastname, d.prenom as firstname, d.societe as company, d.fk_soc,"; +$sql = "SELECT d.rowid, d.login, d.lastname, d.prenom as firstname, d.societe as company, d.fk_soc,"; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -103,7 +103,7 @@ if ($sall) { $sql.=" AND ("; if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; - $sql.=" d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.=" d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -120,9 +120,9 @@ if ($search_ref) if (is_numeric($search_ref)) $sql.= " AND (d.rowid = ".$search_ref.")"; else $sql.=" AND 1 = 2"; // Always wrong } -if ($search_nom) +if ($search_lastname) { - $sql.= " AND (d.prenom LIKE '%".$search_nom."%' OR d.nom LIKE '%".$search_nom."%')"; + $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if ($search_login) { @@ -216,7 +216,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"t.libelle",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder); @@ -233,7 +233,7 @@ if ($resql) print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b44e5b3fde2..4734679131e 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -35,7 +35,7 @@ $langs->load("members"); $rowid = GETPOST('rowid','int'); $action = GETPOST('action','alpha'); -$search_lastname = GETPOST('search_nom','alpha'); +$search_lastname = GETPOST('search_lastname','alpha'); $search_login = GETPOST('search_login','alpha'); $search_email = GETPOST('search_email','alpha'); $type = GETPOST('type','alpha'); @@ -49,7 +49,7 @@ $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) { $sortorder="DESC"; } -if (! $sortfield) { $sortfield="d.nom"; } +if (! $sortfield) { $sortfield="d.lastname"; } // Security check $result=restrictedArea($user,'adherent',$rowid,'adherent_type'); @@ -405,7 +405,7 @@ if ($rowid > 0) $now=dol_now(); - $sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.nom as lastname, d.societe, "; + $sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe, "; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -415,7 +415,7 @@ if ($rowid > 0) $sql.= " AND t.rowid = ".$adht->id; if ($sall) { - $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.nom LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -427,12 +427,12 @@ if ($rowid > 0) { if (isset($_POST['search']) && $_POST['search'] != '') { - $sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.nom LIKE '%".$_POST['search']."%')"; + $sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')"; } } if (! empty($search_lastname)) { - $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.nom LIKE '%".$search_lastname."%')"; + $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if (! empty($search_login)) { @@ -492,7 +492,7 @@ if ($rowid > 0) $param="&rowid=".$rowid; if (! empty($status)) $param.="&status=".$status; - if (! empty($search_lastname)) $param.="&search_nom=".$search_lastname; + if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname; if (! empty($search_firstname)) $param.="&search_prenom=".$search_firstname; if (! empty($search_login)) $param.="&search_login=".$search_login; if (! empty($search_email)) $param.="&search_email=".$search_email; @@ -508,7 +508,7 @@ if ($rowid > 0) print ''; print ''; - print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.nom",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Login"),$_SERVER["PHP_SELF"],"d.login",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"d.morphy",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"d.email",$param,"","",$sortfield,$sortorder); @@ -524,7 +524,7 @@ if ($rowid > 0) print ''; print ''; + print ''; print ''; @@ -556,7 +556,7 @@ if ($rowid > 0) $adh->lastname=$objp->lastname; $adh->firstname=$objp->firstname; - // Nom + // Lastname $var=!$var; print ''; if ($objp->societe != '') 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 75d303b4da8..8b3b1dc43e2 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 @@ -48,6 +48,7 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; +alter table llx_adherent CHANGE COLUMN nom lastname text; alter table llx_adherent CHANGE COLUMN ville town text; alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; From 869a014d320ff738def8b02e91a126425aba93f7 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 11:42:12 +0100 Subject: [PATCH 22/23] english standardization --- htdocs/user/class/user.class.php | 10 ++-------- htdocs/user/fiche.php | 28 ++++++++++++++-------------- htdocs/user/ldap.php | 4 ++-- htdocs/user/note.php | 4 ++-- htdocs/user/param_ihm.php | 4 ++-- htdocs/user/perms.php | 2 +- 6 files changed, 23 insertions(+), 29 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 5569f1b6784..bf3437dd4b0 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -46,7 +46,6 @@ class User extends CommonObject var $ref_ext; var $ldap_sid; var $search_sid; - var $nom; // TODO deprecated var $prenom; // TODO deprecated var $lastname; var $firstname; @@ -190,7 +189,6 @@ class User extends CommonObject $this->ref_ext = $obj->ref_ext; $this->ldap_sid = $obj->ldap_sid; - $this->nom = $obj->name; // TODO deprecated $this->lastname = $obj->name; $this->prenom = $obj->firstname; // TODO deprecated $this->firstname = $obj->firstname; @@ -910,7 +908,6 @@ class User extends CommonObject // Positionne parametres $this->admin = 0; - $this->nom = $contact->nom; // TODO deprecated $this->prenom = $contact->prenom; // TODO deprecated $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; @@ -1090,7 +1087,6 @@ class User extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); // Clean parameters - $this->nom = trim($this->nom); // deprecated $this->prenom = trim($this->prenom); // deprecated $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); @@ -1189,7 +1185,6 @@ class User extends CommonObject if ($result >= 0) { $adh->prenom=$this->firstname; // deprecated - $adh->nom=$this->lastname; // deprecated $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; $adh->login=$this->login; @@ -1728,7 +1723,7 @@ class User extends CommonObject /** * Return a link to the user card (with optionnaly the picto) - * Use this->id,this->nom, this->prenom + * Use this->id,this->lastname, this->prenom * * @param int $withpicto Include picto in link (0=No picto, 1=Inclut le picto dans le lien, 2=Picto seul) * @param string $option On what the link point to @@ -1887,7 +1882,7 @@ class User extends CommonObject $soc = new Societe($this->db); $soc->fetch($this->societe_id); - $info["o"] = $soc->nom; + $info["o"] = $soc->lastname; if ($soc->client == 1) $info["businessCategory"] = "Customers"; if ($soc->client == 2) $info["businessCategory"] = "Prospects"; if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers"; @@ -1946,7 +1941,6 @@ class User extends CommonObject $this->ref = 'SPECIMEN'; $this->specimen=1; - $this->nom='DOLIBARR'; // deprecated $this->prenom='SPECIMEN'; // deprecated $this->lastname='DOLIBARR'; $this->firstname='SPECIMEN'; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 4c1f40049a0..38751435534 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -151,7 +151,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) // Action ajout user if ($action == 'add' && $canadduser) { - if (! $_POST["nom"]) + if (! $_POST["lastname"]) { $message='
'.$langs->trans("NameNotDefined").'
'; $action="create"; // Go back to create page @@ -174,7 +174,7 @@ if ($action == 'add' && $canadduser) if (! $message) { - $object->lastname = $_POST["nom"]; + $object->lastname = $_POST["lastname"]; $object->firstname = $_POST["prenom"]; $object->login = $_POST["login"]; $object->admin = $_POST["admin"]; @@ -277,7 +277,7 @@ if ($action == 'update' && ! $_POST["cancel"]) { $error=0; - if (! $_POST["nom"]) + if (! $_POST["lastname"]) { $message='
'.$langs->trans("NameNotDefined").'
'; $action="edit"; // Go back to create page @@ -315,7 +315,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->oldcopy=dol_clone($object); - $object->lastname = GETPOST("nom"); + $object->lastname = GETPOST("lastname"); $object->firstname = GETPOST("prenom"); $object->login = GETPOST("login"); $object->pass = GETPOST("password"); @@ -546,7 +546,7 @@ if ($action == 'adduserldap') { foreach ($ldapusers as $key => $attribute) { - $ldap_nom = $attribute[$conf->global->LDAP_FIELD_NAME]; + $ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME]; $ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; $ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN]; $ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA]; @@ -682,7 +682,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print '
'; } - print dol_set_focus('#nom'); + print dol_set_focus('#lastname'); print '
'; print ''; @@ -694,17 +694,17 @@ if (($action == 'create') || ($action == 'adduserldap')) print '
'; - // Nom + // Lastname print ''; print ''; @@ -1558,12 +1558,12 @@ else print ''; // Photo diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index a04674720f6..837684334b2 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -100,9 +100,9 @@ print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user- print ''; print ''; -// Nom +// Lastname print ''; -print ''; +print ''; print "\n"; // Prenom diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 72c6237ef44..13a45f61cb2 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -101,8 +101,8 @@ if ($id) print ''; print ''; - // Nom - print ''; + // Lastname + print ''; print ''; // Prenom diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 534ae00ddc4..f389fdaf713 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -130,9 +130,9 @@ print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user- print ''; print ''; -// Nom +// LastName print ''; -print ''; +print ''; print "\n"; // Prenom diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 7443d3d69b5..dc6421d886b 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -256,7 +256,7 @@ print ''."\n"; // Lastname print ''; -print ''; +print ''; print ''."\n"; // Firstname From 15f8b588d697d745808a8c1bcc13a57d8a828724 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 11:54:46 +0100 Subject: [PATCH 23/23] english standardization --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 1 + htdocs/user/class/user.class.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 8b3b1dc43e2..31715239739 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 @@ -50,6 +50,7 @@ alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN nom lastname text; alter table llx_adherent CHANGE COLUMN ville town text; +alter table llx_user CHANGE COLUMN name lastname text; alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN ville town text; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index bf3437dd4b0..ac16c30e220 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1120,7 +1120,7 @@ class User extends CommonObject // Mise a jour autres infos $sql = "UPDATE ".MAIN_DB_PREFIX."user SET"; - $sql.= " name = '".$this->db->escape($this->lastname)."'"; + $sql.= " lastname = '".$this->db->escape($this->lastname)."'"; $sql.= ", firstname = '".$this->db->escape($this->firstname)."'"; $sql.= ", login = '".$this->db->escape($this->login)."'"; $sql.= ", admin = ".$this->admin;
'; - print ''; print '
'.$langs->trans("Lastname").''; - if (! empty($ldap_nom)) + if (! empty($ldap_lastname)) { - print ''; - print $ldap_nom; + print ''; + print $ldap_lastname; } else { - print ''; + print ''; } print '
'; if ($caneditfield && !$object->ldap_sid) { - print ''; + print ''; } else { - print ''; - print $object->nom; + print ''; + print $object->lastname; } print '
'.$langs->trans("Lastname").''.$fuser->nom.''.$fuser->lastname.'
'.$langs->trans("Lastname").''.$fuser->nom.' 
'.$langs->trans("Lastname").''.$fuser->lastname.' 
'.$langs->trans("LastName").''.$fuser->nom.''.$fuser->lastname.'
'.$langs->trans("Lastname").''.$fuser->nom.''.$fuser->lastName.'