From 3b5735bd9c4747ecc1ee1d1625030621126be81c Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 23 Dec 2009 10:07:48 +0000 Subject: [PATCH] Fix: uniformize code Fix: if the contact's address is empty, it uses one of the company --- htdocs/categories/categorie.php | 2 +- htdocs/comm/addpropal.php | 2 +- htdocs/comm/adresse_livraison.class.php | 20 ++++--- htdocs/comm/adresse_livraison.php | 13 +++-- htdocs/comm/fiche.php | 2 +- htdocs/comm/propal.php | 10 ++-- htdocs/comm/prospect/fiche.php | 2 +- htdocs/commande/commande.class.php | 12 ++-- htdocs/commande/fiche.php | 9 +-- htdocs/commonobject.class.php | 5 +- htdocs/contact.class.php | 10 ++-- htdocs/contact/fiche.php | 2 +- htdocs/contact/vcard.php | 4 +- .../pdf_courrier_droit_editeur.class.php | 22 ++++---- htdocs/expedition/commande.php | 4 +- htdocs/fourn/fiche.php | 2 +- .../modules/commande/modules_commande.php | 56 +++++++++---------- .../modules/commande/pdf_edison.modules.php | 10 ++-- .../modules/commande/pdf_einstein.modules.php | 4 +- .../modules/dons/html_cerfafr.modules.php | 2 +- .../pdf/pdf_expedition_merou.modules.php | 6 +- .../modules/facture/modules_facture.php | 2 +- .../modules/facture/pdf_crabe.modules.php | 4 +- .../modules/facture/pdf_oursin.modules.php | 4 +- .../modules/fichinter/pdf_soleil.modules.php | 4 +- .../livraison/pdf/pdf_sirocco.modules.php | 4 +- .../livraison/pdf/pdf_typhon.modules.php | 4 +- .../propale/pdf_propale_azur.modules.php | 4 +- .../propale/pdf_propale_jaune.modules.php | 4 +- .../pdf/pdf_muscadet.modules.php | 4 +- htdocs/livraison/livraison.class.php | 8 ++- htdocs/master.inc.php | 20 ++----- htdocs/oscommerce_ws/clients/fiche.php | 2 +- htdocs/oscommerce_ws/commandes/fiche.php | 22 ++++---- htdocs/propal.class.php | 10 ++-- htdocs/soc.php | 15 +++-- htdocs/societe.class.php | 19 ++++--- htdocs/societe/commerciaux.php | 2 +- htdocs/societe/lien.php | 2 +- scripts/books/droits-editeurs.php | 2 +- .../members/sync_members_ldap2dolibarr.php | 3 +- 41 files changed, 177 insertions(+), 161 deletions(-) diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index 1cfc9388a1a..752e3fd7b7c 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -169,7 +169,7 @@ if ($_GET["socid"]) print ''; } - print "".$langs->trans('Address')."".nl2br($soc->adresse).""; + print "".$langs->trans('Address')."".nl2br($soc->address).""; print ''.$langs->trans('Zip').''.$soc->cp.""; print ''.$langs->trans('Town').''.$soc->ville.""; diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php index 1af80a52fb6..ec9f41ba3b1 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -176,7 +176,7 @@ if ($_GET["action"] == 'create') { print ''.$langs->trans('DeliveryAddress').''; print ''; - $numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socid'],'adresse_livraison_id',1); + $numaddress = $html->select_adresse_livraison($soc->fk_delivery_address, $_GET['socid'],'adresse_livraison_id',1); if ($numaddress==0) { print '   id.'&action=create>'.$langs->trans("AddAddress").''; diff --git a/htdocs/comm/adresse_livraison.class.php b/htdocs/comm/adresse_livraison.class.php index a30c47aa00c..2c1d1402319 100644 --- a/htdocs/comm/adresse_livraison.class.php +++ b/htdocs/comm/adresse_livraison.class.php @@ -39,7 +39,8 @@ class AdresseLivraison var $label; var $socid; var $nom; - var $adresse; + var $adresse; // TODO obsolete + var $address; var $cp; var $ville; var $pays_id; @@ -171,7 +172,8 @@ class AdresseLivraison $this->fk_societe = $socid; $this->label = trim($this->label); $this->nom = trim($this->nom); - $this->adresse = trim($this->adresse); + $this->adresse = trim($this->adresse); // TODO obsolete + $this->address = trim($this->address); $this->cp = trim($this->cp); $this->ville = trim($this->ville); $this->pays_id = trim($this->pays_id); @@ -192,7 +194,7 @@ class AdresseLivraison $sql = "UPDATE ".MAIN_DB_PREFIX."societe_adresse_livraison"; $sql.= " SET label = '" . addslashes($this->label) ."'"; // Champ obligatoire $sql.= ",nom = '" . addslashes($this->nom) ."'"; // Champ obligatoire - $sql.= ",address = '" . addslashes($this->adresse) ."'"; + $sql.= ",address = '" . addslashes($this->address) ."'"; if ($this->cp) { $sql .= ",cp = '" . $this->cp ."'"; } @@ -298,10 +300,12 @@ class AdresseLivraison $ligne->date_update = $objp->date_update; $ligne->label = stripslashes($objp->label); $ligne->nom = stripslashes($objp->nom); - $ligne->adresse = stripslashes($objp->address); + $ligne->address = stripslashes($objp->address); + $ligne->adresse = stripslashes($objp->address); // TODO obsolete $ligne->cp = $objp->cp; $ligne->ville = stripslashes($objp->ville); $ligne->adresse_full = stripslashes($objp->address) . "\n". $objp->cp . ' '. stripslashes($objp->ville); + $ligne->full_address = stripslashes($objp->address) . "\n". $objp->cp . ' '. stripslashes($objp->ville); // TODO obsolete $ligne->pays_id = $objp->fk_pays; $ligne->pays_code = $objp->fk_pays?$objp->pays_code:''; $ligne->pays = $objp->fk_pays?($langs->trans('Country'.$objp->pays_code)!='Country'.$objp->pays_code?strtoupper($langs->trans('Country'.$objp->pays_code)):$objp->pays):''; @@ -367,10 +371,12 @@ class AdresseLivraison $this->label = stripslashes($obj->label); $this->nom = stripslashes($obj->nom); - $this->adresse = stripslashes($obj->address); + $this->adresse = stripslashes($obj->address); // TODO obsolete + $this->address = stripslashes($obj->address); $this->cp = $obj->cp; - $this->ville = stripslashes($obj->ville); - $this->adresse_full = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville); + $this->ville = stripslashes($obj->ville); + $this->adresse_full = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville); + $this->full_address = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville); //TODO obsolete $this->pays_id = $obj->fk_pays; $this->pays_code = $obj->fk_pays?$obj->pays_code:''; diff --git a/htdocs/comm/adresse_livraison.php b/htdocs/comm/adresse_livraison.php index 2270147ffe2..e898a6979c0 100644 --- a/htdocs/comm/adresse_livraison.php +++ b/htdocs/comm/adresse_livraison.php @@ -55,6 +55,7 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update') $livraison->label = ($_POST["label"]!=$langs->trans('RequiredField')?$_POST["label"]:''); $livraison->nom = ($_POST["nom"]!=$langs->trans('RequiredField')?$_POST["nom"]:''); $livraison->adresse = $_POST["adresse"]; + $livraison->address = $_POST["adresse"]; // TODO obsolete $livraison->cp = $_POST["cp"]; $livraison->ville = $_POST["ville"]; $livraison->pays_id = $_POST["pays_id"]; @@ -184,7 +185,8 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') $livraison->socid=$_POST["socid"]; $livraison->label=$_POST["label"]; $livraison->nom=$_POST["nom"]; - $livraison->adresse=$_POST["adresse"]; + $livraison->adresse=$_POST["adresse"]; // TODO obsolete + $livraison->address=$_POST["adresse"]; $livraison->cp=$_POST["cp"]; $livraison->ville=$_POST["ville"]; $livraison->tel=$_POST["tel"]; @@ -233,7 +235,7 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create') print ''.$langs->trans('Name').'trans('RequiredField')).'>'; print ''.$langs->trans('Address').''; print ''.$langs->trans('Zip').''; @@ -290,7 +292,8 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') $livraison->socid=$_POST["socid"]; $livraison->label=$_POST["label"]; $livraison->nom=$_POST["nom"]; - $livraison->adresse=$_POST["adresse"]; + $livraison->adresse=$_POST["adresse"]; // TODO obsolete + $livraison->address=$_POST["adresse"]; $livraison->zip=$_POST["zip"]; $livraison->ville=$_POST["ville"]; $livraison->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$conf->global->MAIN_INFO_SOCIETE_PAYS; @@ -337,7 +340,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''.$langs->trans('Name').''; print ''.$langs->trans('Address').''; print ''.$langs->trans('Zip').''; @@ -411,7 +414,7 @@ else print ''.$langs->trans('Note').' :
'.nl2br($livraison->lignes[$i]->note).''; print ''.$langs->trans('Name').''.$livraison->lignes[$i]->nom.''; - print "".$langs->trans('Address')."".nl2br($livraison->lignes[$i]->adresse).""; + print "".$langs->trans('Address')."".nl2br($livraison->lignes[$i]->address).""; print ''.$langs->trans('Zip').''.$livraison->lignes[$i]->cp.""; print ''.$langs->trans('Town').''.$livraison->lignes[$i]->ville.""; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index ff98deb7241..8cae18e30a9 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -177,7 +177,7 @@ if ($socid > 0) print ''; } - print "".$langs->trans('Address')."".nl2br($objsoc->adresse).""; + print "".$langs->trans('Address')."".nl2br($objsoc->address).""; // Zip / Town print ''.$langs->trans('Zip').''.$objsoc->cp.""; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a4b92ebcc56..28e3ae29f7d 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -232,7 +232,8 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) $propal->ref = $_POST['ref']; $propal->datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $propal->date_livraison = dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); - $propal->adresse_livraison_id = $_POST['adresse_livraison_id']; + $propal->fk_delivery_address = $_POST['adresse_livraison_id']; + $propal->adresse_livraison_id = $_POST['adresse_livraison_id']; // TODO obsolete $propal->duree_validite = $_POST['duree_validite']; $propal->cond_reglement_id = $_POST['cond_reglement_id']; $propal->mode_reglement_id = $_POST['mode_reglement_id']; @@ -259,7 +260,8 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer) $propal->ref_client = $_POST['ref_client']; $propal->datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $propal->date_livraison = dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']); - $propal->adresse_livraison_id = $_POST['adresse_livraison_id']; + $propal->fk_delivery_address = $_POST['fk_delivery_address']; + $propal->adresse_livraison_id = $_POST['fk_delivery_address']; // TODO obsolete $propal->duree_validite = $_POST['duree_validite']; $propal->cond_reglement_id = $_POST['cond_reglement_id']; $propal->mode_reglement_id = $_POST['mode_reglement_id']; @@ -1153,11 +1155,11 @@ if ($id > 0 || ! empty($ref)) if ($_GET['action'] == 'editdelivery_adress') { - $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','propal',$propal->id); + $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->fk_delivery_address,$_GET['socid'],'fk_delivery_address','propal',$propal->id); } else { - $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'none','propal',$propal->id); + $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->fk_delivery_address,$_GET['socid'],'none','propal',$propal->id); } print ''; } diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index b5e5a9722c0..250f5fabd65 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -100,7 +100,7 @@ if ($socid > 0) print ''; print ''; - print '"; + print '"; // Zip / Town print ''; diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index a9909f52738..838ebc0c9e4 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -139,7 +139,8 @@ class Commande extends CommonObject $this->cond_reglement_id = $propal->cond_reglement_id; $this->mode_reglement_id = $propal->mode_reglement_id; $this->date_livraison = $propal->date_livraison; - $this->adresse_livraison_id = $propal->adresse_livraison_id; + $this->fk_delivery_address = $propal->fk_delivery_address; + $this->adresse_livraison_id = $propal->adresse_livraison_id; // TODO obsolete $this->contact_id = $propal->contactid; $this->ref_client = $propal->ref_client; $this->note = $propal->note; @@ -554,7 +555,7 @@ class Commande extends CommonObject $sql.= ", ".($this->cond_reglement_id>0?"'".$this->cond_reglement_id."'":"null"); $sql.= ", ".($this->mode_reglement_id>0?"'".$this->mode_reglement_id."'":"null"); $sql.= ", ".($this->date_livraison?"'".$this->db->idate($this->date_livraison)."'":"null"); - $sql.= ", ".($this->adresse_livraison_id>0?$this->adresse_livraison_id:'NULL'); + $sql.= ", ".($this->fk_delivery_address>0?$this->fk_delivery_address:'NULL'); $sql.= ", ".($this->remise_absolue>0?$this->remise_absolue:'NULL'); $sql.= ", '".$this->remise_percent."'"; $sql.= ", ".$conf->entity; @@ -1549,16 +1550,17 @@ class Commande extends CommonObject * \param adresse_livraison Adresse de livraison * \return int <0 si ko, >0 si ok */ - function set_adresse_livraison($user, $adresse_livraison) + function set_adresse_livraison($user, $fk_delivery_address) { if ($user->rights->commande->creer) { - $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_adresse_livraison = '".$adresse_livraison."'"; + $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_adresse_livraison = '".$fk_delivery_address."'"; $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; if ($this->db->query($sql) ) { - $this->adresse_livraison_id = $adresse_livraison; + $this->adresse_livraison_id = $fk_delivery_address; // TODO obsolete + $this->fk_delivery_address = $fk_delivery_address; return 1; } else diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 4a6e117e556..d0af6bceb15 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -167,7 +167,8 @@ if ($_POST['action'] == 'add' && $user->rights->commande->creer) $commande->cond_reglement_id = $_POST['cond_reglement_id']; $commande->mode_reglement_id = $_POST['mode_reglement_id']; $commande->date_livraison = $datelivraison; - $commande->adresse_livraison_id = $_POST['adresse_livraison_id']; + $commande->fk_delivery_address = $_POST['fk_delivery_address']; + $commande->adresse_livraison_id = $_POST['fk_delivery_address']; // TODO obsolete $commande->contactid = $_POST['contactidp']; $NBLINES=8; @@ -1005,7 +1006,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer) { // Link to edit: $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?action=create','',$soc->id,'adresse_livraison_id','commande',''); print ''; } @@ -1442,11 +1443,11 @@ else if ($_GET['action'] == 'editdelivery_adress') { - $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id); + $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'fk_delivery_address','commande',$commande->id); } else { - $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id); + $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'none','commande',$commande->id); } print ''; } diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php index 37337bcf162..61a3c4fc8b0 100644 --- a/htdocs/commonobject.class.php +++ b/htdocs/commonobject.class.php @@ -389,7 +389,7 @@ class CommonObject } /** - * \brief Charge l'adresse de livraison d'id $this->adresse_livraison_id dans this->deliveryaddress + * \brief Charge l'adresse de livraison d'id $this->fk_delivery_address dans this->deliveryaddress * \param userid Id du contact * \return int <0 if KO, >0 if OK */ @@ -398,7 +398,8 @@ class CommonObject $address = new Societe($this->db); $result=$address->fetch_adresse_livraison($deliveryaddressid); $this->deliveryaddress = $address; - $this->adresse = $adresse; + $this->adresse = $address; // TODO obsolete + $this->address = $address; return $result; } diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index 93658307983..26d7d8ff64c 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -392,7 +392,7 @@ class Contact extends CommonObject $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid,"; $sql.= " c.priv, c.note,"; $sql.= " u.rowid as user_id, u.login as user_login,"; - $sql.= " s.nom as socname"; + $sql.= " s.nom as socname, s.address as socaddress, s.cp as soccp, s.ville as soccity"; $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."user as u ON c.rowid = u.fk_socpeople"; @@ -415,10 +415,10 @@ class Contact extends CommonObject $this->nom = $obj->name; $this->prenom = $obj->firstname; - $this->address = $obj->address; - $this->adresse = $obj->address; // Todo: uniformiser le nom des variables - $this->cp = $obj->cp; - $this->ville = $obj->ville; + $this->address = $obj->address?$obj->address:$obj->socaddress; + $this->adresse = $obj->address; // TODO obsolete + $this->cp = $obj->cp?$obj->cp:$obj->soccp; + $this->ville = $obj->ville?$obj->ville:$obj->soccity; $this->fk_pays = $obj->fk_pays; $this->pays_code = $obj->fk_pays?$obj->pays_code:''; $this->pays = ($obj->fk_pays > 0)?$langs->transnoentities("Country".$obj->pays_code):$langs->transnoentities("SelectCountry"); diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 6bf2a8a57ea..79b89d273d8 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -297,7 +297,7 @@ if ($user->rights->societe->contact->creer) print ''; // Address - if (($objsoc->typent_code == 'TE_PRIVATE') && strlen(trim($contact->address)) == 0) $contact->address = $objsoc->adresse; // Predefined with third party + if (($objsoc->typent_code == 'TE_PRIVATE') && strlen(trim($contact->address)) == 0) $contact->address = $objsoc->address; // Predefined with third party print ''; if (($objsoc->typent_code == 'TE_PRIVATE') && strlen(trim($contact->cp)) == 0) $contact->cp = $objsoc->cp; // Predefined with third party diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 038f83c3f39..d159b8ec18f 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -67,9 +67,9 @@ 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->adresse, $company->ville, "", $company->cp, $company->pays_code, "WORK;POSTAL"); + if (! $contact->cp) $v->setAddress("", "", $company->address, $company->ville, "", $company->cp, $company->pays_code, "WORK;POSTAL"); if ($company->email != $contact->email) $v->setEmail($company->email,'internet'); - // Si contact lié à un tiers non de type "particulier" + // Si contact lie a un tiers non de type "particulier" if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->nom); } diff --git a/htdocs/docs/class/pdf_courrier_droit_editeur.class.php b/htdocs/docs/class/pdf_courrier_droit_editeur.class.php index 6fe13eaa9b1..7a982ae7c84 100644 --- a/htdocs/docs/class/pdf_courrier_droit_editeur.class.php +++ b/htdocs/docs/class/pdf_courrier_droit_editeur.class.php @@ -95,7 +95,7 @@ class pdf_courrier_droit_editeur { $pdfrights = array('print'); // Ne permet que l'impression du document $pdfuserpass = ''; // Mot de passe pour l'utilisateur final - $pdfownerpass = NULL; // Mot de passe du propri�taire, cr�� al�atoirement si pas d�fini + $pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini $pdf_all->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass); } @@ -122,7 +122,7 @@ class pdf_courrier_droit_editeur { $pdfrights = array('print'); // Ne permet que l'impression du document $pdfuserpass = ''; // Mot de passe pour l'utilisateur final - $pdfownerpass = NULL; // Mot de passe du propri�taire, cr�� al�atoirement si pas d�fini + $pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini $pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass); } @@ -153,7 +153,7 @@ class pdf_courrier_droit_editeur } /** - \brief Fonction g�n�rant le fichier + \brief Fonction generant le fichier \param id id de la societe \return int 1=ok, 0=ko */ @@ -180,7 +180,7 @@ class pdf_courrier_droit_editeur $books = array(); $year_data = $year - 1; - // On r�cup�re donn�es du mail + // On recupere donnees du mail $sql = "SELECT p.rowid,p.label, pc.taux, pc.quantite"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= " , ".MAIN_DB_PREFIX."facturedet as fd"; @@ -240,8 +240,8 @@ class pdf_courrier_droit_editeur $pdf->SetFont('Arial','B',11); $pdf->MultiCell(106,4, $soc->nom, 0, 'L'); - // Caract�ristiques client - $carac_client=$soc->adresse; + // Caracteristiques client + $carac_client=$soc->address; $carac_client.="\n".$soc->cp . " " . $soc->ville."\n"; $carac_client.=$soc->pays."\n"; @@ -257,7 +257,7 @@ class pdf_courrier_droit_editeur $pdf->SetXY(10,100); - $pdf->MultiCell(190,5,"Je vous prie de trouver ci-dessous le r�capitulatif des ventes du titre cit� pour la p�riode du 1er janvier au 31 d�cembre $year_data."); + $pdf->MultiCell(190,5,"Je vous prie de trouver ci-dessous le recapitulatif des ventes du titre cite pour la periode du 1er janvier au 31 decembre $year_data."); $pdf->SetXY(10,120); $pdf->MultiCell(25,5,"Nom du titre : "); @@ -267,7 +267,7 @@ class pdf_courrier_droit_editeur $pdf->SetFont('Arial','',10); $pdf->SetXY(10,140); - $pdf->MultiCell(46,5,"Quantit� sign�e au contrat : "); + $pdf->MultiCell(46,5,"Quantite signee au contrat : "); $pdf->SetFont('Arial','B',10); $pdf->SetXY(56,140); @@ -296,7 +296,7 @@ class pdf_courrier_droit_editeur $pdf->SetFont('Arial','',10); $pdf->SetXY(10,140 + ($i * 8) ); - $pdf->MultiCell(44,5,"Quantit� vendue en ".$row[2]." : ",0); + $pdf->MultiCell(44,5,"Quantite vendue en ".$row[2]." : ",0); $pdf->SetFont('Arial','B',10); $pdf->SetXY(54,140 + ($i * 8) ); $pdf->MultiCell(16,5,$row[1],0,'R'); @@ -346,7 +346,7 @@ class pdf_courrier_droit_editeur $i++; $pdf->SetFont('Arial','',10); $pdf->SetXY(10,150 + ($i * 10) ); - $pdf->MultiCell(80,5,"Reste � devoir sur les droits pour l'ann�e ".($year-1)." : ",0); + $pdf->MultiCell(80,5,"Reste a devoir sur les droits pour l'annee ".($year-1)." : ",0); $pdf->SetFont('Arial','B',10); $pdf->SetXY(90,140 + ($i * 10) ); $pdf->MultiCell(16,5, $pu_ttc,0,'R'); @@ -354,7 +354,7 @@ class pdf_courrier_droit_editeur $i++; $pdf->SetFont('Arial','',10); $pdf->SetXY(10,150 + ($i * 10) + 20); - $pdf->MultiCell(190,5,"Nous restons � votre enti�re disposition pour de plus amples renseignements dont vous pouvez avoir besoin et vous remercions de la confiance que vous nous avez accord�e."); + $pdf->MultiCell(190,5,"Nous restons a votre entiere disposition pour de plus amples renseignements dont vous pouvez avoir besoin et vous remercions de la confiance que vous nous avez accordee."); } diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index cf8b7a6efed..4556ec206eb 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -290,11 +290,11 @@ if ($id > 0 || ! empty($ref)) if ($_GET['action'] == 'editdelivery_adress') { - $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id); + $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'adresse_livraison_id','commande',$commande->id); } else { - $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id); + $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'none','commande',$commande->id); } print ''; } diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index 2af1f78a323..5a8943e0201 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -81,7 +81,7 @@ if ( $societe->fetch($socid) ) print ''; } - print ''; + print ''; print ''; print ''; diff --git a/htdocs/includes/modules/commande/modules_commande.php b/htdocs/includes/modules/commande/modules_commande.php index ab461bc8202..315006a561c 100644 --- a/htdocs/includes/modules/commande/modules_commande.php +++ b/htdocs/includes/modules/commande/modules_commande.php @@ -22,11 +22,11 @@ */ /** - \file htdocs/includes/modules/commande/modules_commande.php - \ingroup commande - \brief Fichier contenant la classe m�re de generation des commandes en PDF - et la classe m�re de num�rotation des commandes - \version $Id$ + * \file htdocs/includes/modules/commande/modules_commande.php + * \ingroup commande + * \brief Fichier contenant la classe mere de generation des commandes en PDF + * et la classe mere de numerotation des commandes + * \version $Id$ */ require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php'); @@ -36,15 +36,15 @@ require_once(DOL_DOCUMENT_ROOT.'/discount.class.php'); /** - \class ModelePDFCommandes - \brief Classe m�re des mod�les de commandes + * \class ModelePDFCommandes + * \brief Classe mere des modeles de commandes */ class ModelePDFCommandes extends FPDF { var $error=''; /** - * \brief Renvoi le dernier message d'erreur de cr�ation de PDF de commande + * \brief Renvoi le dernier message d'erreur de creation de PDF de commande */ function pdferror() { @@ -52,7 +52,7 @@ class ModelePDFCommandes extends FPDF } /** - * \brief Renvoi la liste des mod�les actifs + * \brief Renvoi la liste des modeles actifs * \return array Tableau des modeles (cle=id, valeur=libelle) */ function liste_modeles($db) @@ -91,8 +91,8 @@ class ModelePDFCommandes extends FPDF /** - \class ModeleNumRefCommandes - \brief Classe m�re des mod�les de num�rotation des r�f�rences de commandes + * \class ModeleNumRefCommandes + * \brief Classe mere des modeles de numerotation des references de commandes */ class ModeleNumRefCommandes @@ -107,7 +107,7 @@ class ModeleNumRefCommandes return true; } - /** \brief Renvoi la description par defaut du modele de num�rotation + /** \brief Renvoi la description par defaut du modele de numerotation * \return string Texte descripif */ function info() @@ -117,7 +117,7 @@ class ModeleNumRefCommandes return $langs->trans("NoDescription"); } - /** \brief Renvoi un exemple de num�rotation + /** \brief Renvoi un exemple de numerotation * \return string Example */ function getExample() @@ -127,8 +127,8 @@ class ModeleNumRefCommandes return $langs->trans("NoExample"); } - /** \brief Test si les num�ros d�j� en vigueur dans la base ne provoquent pas de - * de conflits qui empechera cette num�rotation de fonctionner. + /** \brief Test si les numeros deja en vigueur dans la base ne provoquent pas de + * de conflits qui empechera cette numerotation de fonctionner. * \return boolean false si conflit, true si ok */ function canBeActivated() @@ -136,7 +136,7 @@ class ModeleNumRefCommandes return true; } - /** \brief Renvoi prochaine valeur attribu�e + /** \brief Renvoi prochaine valeur attribuee * \return string Valeur */ function getNextValue() @@ -161,12 +161,12 @@ class ModeleNumRefCommandes } -/* - \brief Cr�e un bon de commande sur disque en fonction d'un mod�le - \param db objet base de donn�e - \param id id de la propale � cr�er - \param modele force le modele � utiliser ('' to not force) - \param outputlangs objet lang a utiliser pour traduction +/** + * \brief Cree un bon de commande sur disque en fonction d'un modele + * \param db objet base de donnee + * \param id id de la propale a creer + * \param modele force le modele a utiliser ('' to not force) + * \param outputlangs objet lang a utiliser pour traduction */ function commande_pdf_create($db, $id, $modele, $outputlangs) { @@ -177,7 +177,7 @@ function commande_pdf_create($db, $id, $modele, $outputlangs) $modelisok=0; $liste=array(); - // Positionne modele sur le nom du modele de commande � utiliser + // Positionne modele sur le nom du modele de commande a utiliser $file = "pdf_".$modele.".modules.php"; if ($modele && file_exists($dir.$file)) $modelisok=1; @@ -194,7 +194,7 @@ function commande_pdf_create($db, $id, $modele, $outputlangs) { $model=new ModelePDFCommandes(); $liste=$model->liste_modeles($db); - $modele=key($liste); // Renvoie premiere valeur de cl� trouv� dans le tableau + $modele=key($liste); // Renvoie premiere valeur de cle trouve dans le tableau $file = "pdf_".$modele.".modules.php"; if (file_exists($dir.$file)) $modelisok=1; } @@ -240,10 +240,10 @@ function commande_pdf_create($db, $id, $modele, $outputlangs) } /** - \brief Supprime l'image de pr�visualitation, pour le cas de r�g�n�ration de commande - \param db objet base de donn�e - \param commandeid id de la commande � effacer - \param commanderef r�f�rence de la commande si besoin + * \brief Supprime l'image de previsualitation, pour le cas de regeneration de commande + * \param db objet base de donnee + * \param commandeid id de la commande a effacer + * \param commanderef reference de la commande si besoin */ function commande_delete_preview($db, $commandeid, $commanderef='') { diff --git a/htdocs/includes/modules/commande/pdf_edison.modules.php b/htdocs/includes/modules/commande/pdf_edison.modules.php index 71738439543..fbd7067c9fa 100644 --- a/htdocs/includes/modules/commande/pdf_edison.modules.php +++ b/htdocs/includes/modules/commande/pdf_edison.modules.php @@ -84,8 +84,8 @@ class pdf_edison extends ModelePDFCommandes } - /** \brief Renvoi derni�re erreur - \return string Derni�re erreur + /** \brief Renvoi derniere erreur + \return string Derniere erreur */ function pdferror() { @@ -406,7 +406,7 @@ class pdf_edison extends ModelePDFCommandes // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -457,7 +457,7 @@ class pdf_edison extends ModelePDFCommandes // Customer name $carac_client_name=$outputlangs->convToOutputCharset($object->client->nom); - // Nom du contact suivi commande si c'est une soci�t� + // Nom du contact suivi commande si c'est une societe $arrayidcontact = $object->getIdContact('external','CUSTOMER'); if (sizeof($arrayidcontact) > 0) { @@ -470,7 +470,7 @@ class pdf_edison extends ModelePDFCommandes } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index fcbcb702912..a4fe6e8fbb1 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -800,7 +800,7 @@ class pdf_einstein extends ModelePDFCommandes // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -870,7 +870,7 @@ class pdf_einstein extends ModelePDFCommandes } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/dons/html_cerfafr.modules.php b/htdocs/includes/modules/dons/html_cerfafr.modules.php index 02f7f551bc2..82db1ee042c 100644 --- a/htdocs/includes/modules/dons/html_cerfafr.modules.php +++ b/htdocs/includes/modules/dons/html_cerfafr.modules.php @@ -133,7 +133,7 @@ class html_cerfafr extends ModeleDon $html = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$conf->monnaie),$html); $html = str_replace('__CURRENCYCODE__',$conf->monnaie,$html); $html = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->nom,$html); - $html = str_replace('__MAIN_INFO_SOCIETE_ADRESSE__',$mysoc->adresse,$html); + $html = str_replace('__MAIN_INFO_SOCIETE_ADRESSE__',$mysoc->address,$html); $html = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->cp,$html); $html = str_replace('__MAIN_INFO_SOCIETE_VILLE__',$mysoc->ville,$html); $html = str_replace('__DONATOR_NAME__',$don->nom,$html); diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php index 90d1a52e7ab..bdf8ddb3a18 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php @@ -432,7 +432,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -483,7 +483,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition $blSocY+=3; //Adresse Client //Gestion des Retours chariots - $Out=explode("\n",$outputlangs->convToOutputCharset($this->expediteur->adresse)); + $Out=explode("\n",$outputlangs->convToOutputCharset($this->expediteur->address)); for ($i=0;$iSetXY($blExpX,$Yoff+$blSocY); $pdf->MultiCell($blW,5,$Out[$i], 0, 'L'); @@ -555,7 +555,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/facture/modules_facture.php b/htdocs/includes/modules/facture/modules_facture.php index 190cb8f7c66..d317807e845 100644 --- a/htdocs/includes/modules/facture/modules_facture.php +++ b/htdocs/includes/modules/facture/modules_facture.php @@ -258,7 +258,7 @@ function facture_meta_create($db, $facid, $message="") if (is_dir($dir)) { $nblignes = sizeof($fac->lignes); - $client = $fac->client->nom . " " . $fac->client->adresse . " " . $fac->client->cp . " " . $fac->client->ville; + $client = $fac->client->nom . " " . $fac->client->address . " " . $fac->client->cp . " " . $fac->client->ville; $meta = "REFERENCE=\"" . $fac->ref . "\" DATE=\"" . dol_print_date($fac->date,'') . "\" NB_ITEMS=\"" . $nblignes . "\" diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index 1f7e40790f7..78bd29c9962 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -1055,7 +1055,7 @@ class pdf_crabe extends ModelePDFFactures { // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -1137,7 +1137,7 @@ class pdf_crabe extends ModelePDFFactures } // Recipient - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/facture/pdf_oursin.modules.php b/htdocs/includes/modules/facture/pdf_oursin.modules.php index 5749db56ed1..f80752feca6 100644 --- a/htdocs/includes/modules/facture/pdf_oursin.modules.php +++ b/htdocs/includes/modules/facture/pdf_oursin.modules.php @@ -858,7 +858,7 @@ class pdf_oursin extends ModelePDFFactures // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -924,7 +924,7 @@ class pdf_oursin extends ModelePDFFactures } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->trans("Country".$object->client->pays_code)."\n"; } diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index ab59975a5b0..b5a98d97f4b 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -215,7 +215,7 @@ class pdf_soleil extends ModelePDFFicheinter // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -240,7 +240,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->MultiCell(86,5, $outputlangs->convToOutputCharset($fichinter->client->nom)); $pdf->SetFont('Arial','B',11); $pdf->SetXY(102,$pdf->GetY()); - $pdf->MultiCell(66,5, $outputlangs->convToOutputCharset($fichinter->client->adresse) . "\n" . $outputlangs->convToOutputCharset($fichinter->client->cp) . " " . $outputlangs->convToOutputCharset($fichinter->client->ville)); + $pdf->MultiCell(66,5, $outputlangs->convToOutputCharset($fichinter->client->address) . "\n" . $outputlangs->convToOutputCharset($fichinter->client->cp) . " " . $outputlangs->convToOutputCharset($fichinter->client->ville)); $pdf->rect(100, 40, 100, 40); diff --git a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php index 87f1fe0a726..576fc66cd80 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php @@ -379,7 +379,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -442,7 +442,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php index 4fef10dd3af..64a65374208 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php @@ -544,7 +544,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Tel @@ -612,7 +612,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php index c0db96f1a26..24c313a7a74 100644 --- a/htdocs/includes/modules/propale/pdf_propale_azur.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_azur.modules.php @@ -850,7 +850,7 @@ class pdf_propale_azur extends ModelePDFPropales { // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Add internal contact of proposal if defined @@ -940,7 +940,7 @@ class pdf_propale_azur extends ModelePDFPropales } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php index c3091ae925a..e0f60291d87 100644 --- a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php @@ -377,7 +377,7 @@ class pdf_propale_jaune extends ModelePDFPropales // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville); $carac_emetteur .= "\n"; // Add internal contact of proposal if defined @@ -501,7 +501,7 @@ class pdf_propale_jaune extends ModelePDFPropales } // Caracteristiques client - $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; } diff --git a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php index e90d6cd6a51..2a3197b8e27 100644 --- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -660,7 +660,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Sender properties $carac_emetteur = ''; - $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->adresse); + $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->address); $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->cp).' '.$outputlangs->convToOutputCharset($mysoc->ville); $carac_emetteur .= "\n"; // Tel @@ -693,7 +693,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $carac_client_name = $outputlangs->convToOutputCharset($object->client->nom); - $carac_client=$outputlangs->convToOutputCharset($object->client->adresse); + $carac_client=$outputlangs->convToOutputCharset($object->client->address); $carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n"; if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n"; diff --git a/htdocs/livraison/livraison.class.php b/htdocs/livraison/livraison.class.php index 90f180600a7..368f5265d51 100644 --- a/htdocs/livraison/livraison.class.php +++ b/htdocs/livraison/livraison.class.php @@ -111,7 +111,7 @@ class Livraison extends CommonObject $sql.= ", '".$this->ref_client."'"; $sql.= ", ".$this->db->idate(mktime()); $sql.= ", ".$user->id; - $sql.= ", ".($this->adresse_livraison_id > 0 ? $this->adresse_livraison_id : "null"); + $sql.= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : "null"); $sql.= ", ".($this->expedition_id ? $this->expedition_id : "null"); $sql.= ")"; @@ -276,7 +276,8 @@ class Livraison extends CommonObject $this->expedition_id = $obj->fk_expedition; $this->user_author_id = $obj->fk_user_author; $this->user_valid_id = $obj->fk_user_valid; - $this->adresse_livraison_id = $obj->fk_adresse_livraison; + $this->adresse_livraison_id = $obj->fk_adresse_livraison; // TODO obsolete + $this->fk_delivery_address = $obj->fk_adresse_livraison; $this->note = $obj->note; $this->note_public = $obj->note_public; $this->modelpdf = $obj->model_pdf; @@ -510,7 +511,8 @@ class Livraison extends CommonObject $this->note = $expedition->note; $this->projetid = $expedition->projetidp; $this->date_livraison = $expedition->date_livraison; - $this->adresse_livraison_id = $expedition->adresse_livraison_id; + $this->adresse_livraison_id = $expedition->adresse_livraison_id; // TODO obsolete + $this->fk_delivery_address = $expedition->adresse_livraison_id; $this->socid = $expedition->socid; $this->ref_client = $expedition->ref_client; diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 90891ff3fb0..09d27744824 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -329,7 +329,8 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC')) $mysoc->id=0; $mysoc->nom=$conf->global->MAIN_INFO_SOCIETE_NOM; - $mysoc->adresse=$conf->global->MAIN_INFO_SOCIETE_ADRESSE; + $mysoc->adresse=$conf->global->MAIN_INFO_SOCIETE_ADRESSE; // TODO obsolete + $mysoc->address=$conf->global->MAIN_INFO_SOCIETE_ADRESSE; $mysoc->cp=$conf->global->MAIN_INFO_SOCIETE_CP; $mysoc->ville=$conf->global->MAIN_INFO_SOCIETE_VILLE; // Si dans MAIN_INFO_SOCIETE_PAYS on a un id de pays, on recupere code @@ -370,7 +371,8 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC')) $mysoc->capital=$conf->global->MAIN_INFO_CAPITAL; $mysoc->forme_juridique_code=$conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE; $mysoc->email=$conf->global->MAIN_INFO_SOCIETE_MAIL; - $mysoc->adresse_full=$mysoc->adresse."\n".$mysoc->cp." ".$mysoc->ville; + $mysoc->adresse_full=$mysoc->adresse."\n".$mysoc->cp." ".$mysoc->ville; // TODO obsolete + $mysoc->full_address=$mysoc->adresse."\n".$mysoc->cp." ".$mysoc->ville; $mysoc->logo=$conf->global->MAIN_INFO_SOCIETE_LOGO; $mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL; $mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; @@ -415,18 +417,4 @@ if (! defined('MAGPIE_CACHE_DIR')) { define('MAGPIE_CACHE_DIR', $conf->exte if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR'); - -/** - * Convert a string into a regex - * - * @param unknown_type $s string to convert - */ -function dol_regify($s) -{ - $news=str_replace('/','\/',$s); - $news=str_replace('.','\.',$news); - $news=str_replace('*','\*',$news); - return $news; -} - ?> diff --git a/htdocs/oscommerce_ws/clients/fiche.php b/htdocs/oscommerce_ws/clients/fiche.php index 51929f79417..57a4cc9404d 100644 --- a/htdocs/oscommerce_ws/clients/fiche.php +++ b/htdocs/oscommerce_ws/clients/fiche.php @@ -100,7 +100,7 @@ if (($_GET["action"] == 'import' ) && ( $_GET["custid"] != '' ) && ($user->right /* initialisation */ $societe->nom = $osc_cust->osc_custsoc.' '.$osc_cust->osc_custlastname; - $societe->adresse = $osc_cust->osc_cutstreet; + $societe->address = $osc_cust->osc_cutstreet; $societe->cp = $osc_cust->osc_custpostcode; $societe->ville = $osc_cust->osc_custcity; $societe->departement_id = 0; diff --git a/htdocs/oscommerce_ws/commandes/fiche.php b/htdocs/oscommerce_ws/commandes/fiche.php index 127c1654166..2226cefbae1 100644 --- a/htdocs/oscommerce_ws/commandes/fiche.php +++ b/htdocs/oscommerce_ws/commandes/fiche.php @@ -45,7 +45,7 @@ if ($action == '' && !$cancel) { print ''; print ''; print ''; - print ''; + print ''; print "
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Address").''.nl2br($societe->adresse)."
'.$langs->trans("Address").''.nl2br($societe->address)."
'.$langs->trans('Zip').''.$societe->cp.'
'.$langs->trans('DeliveryAddress').''; - $numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socid'],'adresse_livraison_id',1); + $numaddress = $html->select_adresse_livraison($soc->fk_delivery_address, $_GET['socid'],'fk_delivery_address',1); print '   '.$langs->trans("AddAddress").''; print '
'.$langs->trans("PostOrFunction").'
'.$langs->trans("Address").'
'.$langs->trans("Address").''.nl2br($societe->adresse).'
'.$langs->trans("Address").''.nl2br($societe->address).'
'.$langs->trans("Zip").''.$societe->cp.''.$langs->trans("Town").''.$societe->ville.'
Nom client'.$osc_order->osc_custname.'
Montant'.convert_price($osc_order->osc_ordertotal).'
Date commande'.$osc_order->osc_orderdate.'
Méthode de paiement'.$osc_order->osc_orderpaymet.'
M�thode de paiement'.$osc_order->osc_orderpaymet.'
"; print ''; // les articles @@ -87,7 +87,7 @@ if ($action == '' && !$cancel) { print "\n
\n"; } } -/* action Import création de l'objet commande de dolibarr +/* action Import cr�ation de l'objet commande de dolibarr * */ if (($_GET["action"] == 'import' ) && ( $_GET["orderid"] != '' ) && $user->rights->commande->creer) @@ -102,10 +102,10 @@ if ($action == '' && !$cancel) { /* utilisation de la table de transco*/ if ($osc_order->get_orderid($osc_order->osc_orderid)>0) { - print '

Cette commande existe déjà

'; + print '

Cette commande existe d�j�

'; } else { -// vérifier que la société est renseignée, sinon importer le client d'abord +// v�rifier que la soci�t� est renseign�e, sinon importer le client d'abord if ( ! $commande->socid) { $osc_cust = new Osc_customer($db, $osc_order->osc_custid); @@ -122,7 +122,7 @@ if ($action == '' && !$cancel) { } /* initialisation */ $societe->nom = $osc_cust->osc_custsoc.' '.$osc_cust->osc_custlastname; - $societe->adresse = $osc_cust->osc_cutstreet; + $societe->address = $osc_cust->osc_cutstreet; $societe->cp = $osc_cust->osc_custpostcode; $societe->ville = $osc_cust->osc_custcity; $societe->departement_id = 0; @@ -141,18 +141,18 @@ if ($action == '' && !$cancel) { if ($cl == 0) { $commande->socid = $societe->id; - print '

création réussie nouveau client/prospect : '.$societe->nom; + print '

cr�ation r�ussie nouveau client/prospect : '.$societe->nom; $res = $osc_cust->transcode($osc_cust->osc_custid,$societe->id); print ' : Id Dolibarr '.$societe->id.' , Id osc : '.$osc_cust->osc_custid.'

'; } else { - print '

création impossible client : '. $osc_cust->osc_custid .'

'; + print '

cr�ation impossible client : '. $osc_cust->osc_custid .'

'; exit; } } } -// vérifier l'existence des produits commandés +// v�rifier l'existence des produits command�s $osc_product = new Osc_Product($db); $err = 0; @@ -161,7 +161,7 @@ if ($action == '' && !$cancel) { // print "

traitement de ".$commande->lines[$lig]->fk_product."

"; if (! $commande->lines[$lig]->fk_product) { - print "

Article non trouvé ".$commande->lines[$lig]->libelle." : ".$commande->lines[$lig]->desc."

"; + print "

Article non trouv� ".$commande->lines[$lig]->libelle." : ".$commande->lines[$lig]->desc."

"; $err ++; } } @@ -174,7 +174,7 @@ if ($action == '' && !$cancel) { if ($id > 0) { print "\n
\n"; - print '
création réussie nouvelle commande '.$id; + print '
cr�ation r�ussie nouvelle commande '.$id; $res = $osc_order->transcode($osc_order->osc_orderid,$id); print 'pour la commande osc : '.$osc_order->osc_orderid.'

'; print '

'.$langs->trans("Retour").'

'; @@ -193,7 +193,7 @@ if ($action == '' && !$cancel) { } if ($id == -2) { - /* la référence existe on fait un update */ + /* la r�f�rence existe on fait un update */ $societe_control = new Societe($db); if ($_error == 1) { diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 0cf6b064946..14a6d5c5b3b 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -85,6 +85,7 @@ class Propal extends CommonObject var $note; var $note_public; var $adresse_livraison_id; + var $fk_delivery_address; var $adresse; var $products=array(); @@ -642,10 +643,10 @@ class Propal extends CommonObject } // Affectation de l'adresse de livraison - if ($resql && $this->adresse_livraison_id) + if ($resql && $this->fk_delivery_address) { $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql.= " SET fk_adresse_livraison = ".$this->adresse_livraison_id; + $sql.= " SET fk_adresse_livraison = ".$this->fk_delivery_address; $sql.= " WHERE ref = '".$this->ref."'"; $sql.= " AND entity = ".$conf->entity; @@ -844,7 +845,8 @@ class Propal extends CommonObject $this->datep = $this->db->jdate($obj->dp); $this->fin_validite = $this->db->jdate($obj->dfv); $this->date_livraison = $this->db->jdate($obj->date_livraison); - $this->adresse_livraison_id = $obj->fk_adresse_livraison; + $this->fk_delivery_address = $obj->fk_adresse_livraison; + $this->adresse_livraison_id = $obj->fk_adresse_livraison; // TODO obsolete $this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_code = $obj->mode_reglement_code; @@ -1074,7 +1076,7 @@ class Propal extends CommonObject if ($this->db->query($sql) ) { - $this->adresse_livraison_id = $adresse_livraison; + $this->fk_delivery_address = $adresse_livraison; return 1; } else diff --git a/htdocs/soc.php b/htdocs/soc.php index 4f51753f1bd..19912748860 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -84,7 +84,8 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"]) { $soc->nom = $_POST["nom"]; } - $soc->adresse = $_POST["adresse"]; + $soc->address = $_POST["adresse"]; + $soc->adresse = $_POST["adresse"]; // TODO obsolete $soc->cp = $_POST["cp"]; $soc->ville = $_POST["ville"]; $soc->pays_id = $_POST["pays_id"]; @@ -165,7 +166,7 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"]) $contact->civilite_id = $soc->civilite_id; $contact->name=$soc->nom_particulier; $contact->firstname=$soc->prenom; - $contact->address=$soc->adresse; + $contact->address=$soc->address; $contact->cp=$soc->cp; $contact->ville=$soc->ville; $contact->fk_pays=$soc->fk_pays; @@ -323,6 +324,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create') $soc->fournisseur=$_POST["fournisseur"]?$_POST["fournisseur"]:$soc->fournisseur; $soc->code_fournisseur=$_POST["code_fournisseur"]; $soc->adresse=$_POST["adresse"]; + $soc->address=$_POST["adresse"]; // TODO obsolete $soc->cp=$_POST["cp"]; $soc->ville=$_POST["ville"]; $soc->departement_id=$_POST["departement_id"]; @@ -468,7 +470,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create') } print '
'; print ''; print ''; } - print ""; + print ""; print '"; print '"; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 5fcdb2580b4..8dcfe2b7da0 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -49,7 +49,8 @@ class Societe extends CommonObject var $nom_particulier; var $prenom; var $particulier; - var $adresse; + var $address; + var $adresse; // TODO obsolete var $cp; var $ville; var $departement_id; @@ -328,7 +329,8 @@ class Societe extends CommonObject $this->id=$id; $this->capital=trim($this->capital); $this->nom=trim($this->nom); - $this->adresse=trim($this->adresse); + $this->adresse=trim($this->adresse); // TODO obsolete + $this->address=trim($this->address); $this->cp=trim($this->cp); $this->ville=trim($this->ville); $this->departement_id=trim($this->departement_id); @@ -374,7 +376,7 @@ class Societe extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; $sql.= " SET nom = '" . addslashes($this->nom) ."'"; // Champ obligatoire $sql.= ",datea = ".$this->db->idate(mktime()); - $sql.= ",address = '" . addslashes($this->adresse) ."'"; + $sql.= ",address = '" . addslashes($this->address) ."'"; $sql.= ",cp = ".($this->cp?"'".$this->cp."'":"null"); $sql.= ",ville = ".($this->ville?"'".addslashes($this->ville)."'":"null"); @@ -560,10 +562,12 @@ class Societe extends CommonObject $this->date_update = $obj->date_update; $this->nom = $obj->nom; - $this->adresse = $obj->address; + $this->address = $obj->address; + $this->adresse = $obj->address; // TODO obsolete $this->cp = $obj->cp; $this->ville = $obj->ville; - $this->adresse_full = $obj->address . "\n". $obj->cp . ' '. $obj->ville; + $this->adresse_full = $obj->address . "\n". $obj->cp . ' '. $obj->ville; // TODO obsolete + $this->full_address = $obj->address . "\n". $obj->cp . ' '. $obj->ville; $this->pays_id = $obj->fk_pays; $this->pays_code = $obj->fk_pays?$obj->pays_code:''; @@ -683,7 +687,7 @@ class Societe extends CommonObject $this->societe = $obj->socname; $this->nom = $obj->nom; $this->address = $obj->address; - $this->adresse = $obj->address; //Todo: uniformiser le nom des champs + $this->adresse = $obj->address; // TODO obsolete $this->cp = $obj->cp; $this->ville = $obj->ville; $this->pays_id = $obj->fk_pays; @@ -2001,7 +2005,8 @@ class Societe extends CommonObject $this->client = 1; // A member is a customer by default $this->code_client = -1; $this->code_fournisseur = -1; - $this->adresse=$member->adresse; + $this->adresse=$member->adresse; // TODO obsolete + $this->address=$member->adresse; $this->cp=$member->cp; $this->ville=$member->ville; $this->pays_code=$member->pays_code; diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index e887bffba1b..17ec508e022 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -109,7 +109,7 @@ if ($_GET["socid"]) if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); print ''; - print ""; + print ""; print '"; print '"; diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index 504cff7fca6..6a2244ae7a0 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -111,7 +111,7 @@ if($_GET["socid"]) if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); print ''; - print ""; + print ""; print ""; print ""; diff --git a/scripts/books/droits-editeurs.php b/scripts/books/droits-editeurs.php index eeea87a19b0..55b66a4fe4a 100644 --- a/scripts/books/droits-editeurs.php +++ b/scripts/books/droits-editeurs.php @@ -180,7 +180,7 @@ class pdf_courrier_editeur $pdf->MultiCell(106,4, $soc->nom, 0, 'L'); // Caracteristiques client - $carac_client=$soc->adresse; + $carac_client=$soc->address; $carac_client.="\n".$soc->cp . " " . $soc->ville."\n"; $carac_client.=$soc->pays."\n"; diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index bf592ec3c49..c5ab386bc4c 100644 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -188,7 +188,8 @@ if ($result >= 0) $member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD]; //$member->societe; - $member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; + $member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; + $member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // TODO obsolete $member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; $member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; $member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // Pays en libelle
'.$langs->trans('Address').'
'.$langs->trans('Zip').''; @@ -671,7 +673,8 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') $soc->code_client=$_POST["code_client"]; $soc->fournisseur=$_POST["fournisseur"]; $soc->code_fournisseur=$_POST["code_fournisseur"]; - $soc->adresse=$_POST["adresse"]; + $soc->adresse=$_POST["adresse"]; // TODO obsolete + $soc->address=$_POST["adresse"]; $soc->cp=$_POST["cp"]; $soc->ville=$_POST["ville"]; $soc->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$conf->global->MAIN_INFO_SOCIETE_PAYS; @@ -822,7 +825,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') } print '
'.$langs->trans('Address').'
'.$langs->trans('Zip').''; @@ -1012,7 +1015,7 @@ else print '
'.$langs->trans('Gencod').''.$soc->gencod.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
".$langs->trans('Address')."".nl2br($soc->address)."
'.$langs->trans('Zip').''.$soc->cp."'.$langs->trans('Town').''.$soc->ville."
'.$langs->trans('Prefix').''.$soc->prefix_comm.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
".$langs->trans('Address')."".nl2br($soc->address)."
'.$langs->trans('Zip').''.$soc->cp."'.$langs->trans('Town').''.$soc->ville."
'.$langs->trans('Prefix').''.$soc->prefix_comm.'
".$langs->trans('Address')."".nl2br($soc->adresse)."
".$langs->trans('Address')."".nl2br($soc->address)."
".$langs->trans('Zip')."".$soc->cp."".$langs->trans('Town')."".$soc->ville."