diff --git a/COPYRIGHT b/COPYRIGHT index 62a925d436f..e06586aa7c2 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -36,7 +36,7 @@ jQuery blockUI 2.43 GPL and MIT Licence Yes JS libra jQuery jPicker 1.1.00 GPL and MIT Licence Yes JS library for color picker with not defined list of colors jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.15) jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows) -jQuery Mobile 1.0rc2 GPL and MIT Licence Yes JS library for smartphone (not used) +jQuery Mobile 1.3 GPL and MIT Licence Yes JS library for smartphone (not used) jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports) diff --git a/ChangeLog b/ChangeLog index 8a7c97adf97..9509d17c800 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,8 @@ For developers: - Add hook getFormMail. - Function plimit of databases drivers accept -1 as value (it means default value set into conf->liste_limit). +- New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page. + For translators: - Update language files. diff --git a/dev/test/testdiv.php b/dev/test/testdiv.php new file mode 100644 index 00000000000..2d6a42ebc14 --- /dev/null +++ b/dev/test/testdiv.php @@ -0,0 +1,71 @@ + + + + + + + + + +Login Dolibarr 3.4.0-alpha + + + + + + + + + + + +
+ +
+ + +
+ +
+ + + + + + + + + + + + + +
  fds fs df sdf gdsfgsdf r   + +
    + +
+ +
+
+ + +
+ + + +
+
+ + + +
+ +
+ + + + diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 9fc872f6e2f..50a24ea907a 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -364,10 +364,10 @@ abstract class ActionsAdherentCardCommon if ($action == 'create_user') { - // Full firstname and name separated with a dot : firstname.name + // Full firstname and lastname separated with a dot : firstname.lastname 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->firstname); $generated_password=getRandomPassword(''); $password=$generated_password; @@ -423,7 +423,6 @@ abstract class ActionsAdherentCardCommon { dol_print_error($this->db); } - $this->object->pays_code = $obj->code; $this->object->pays = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; $this->object->country_code = $obj->code; $this->object->country = $langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; 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/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 9d408af9ed6..199e2025b47 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.firstname, 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 27fde653695..13fc7f2488e 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -61,8 +61,8 @@ 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.= " d.address, d.cp as zip, d.ville as town, d.naiss, d.email, d.photo,"; + $sql = "SELECT d.rowid, d.firstname, d.lastname, d.login, d.societe as company, d.datefin,"; + $sql.= " d.address, d.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"; @@ -109,12 +109,8 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated // For backward compatibility - '%PRENOM%'=>$objp->firstname, - '%NOM%'=>$objp->lastname, '%SOCIETE%'=>$objp->company, - '%ADDRESS%'=>$objp->address, - '%CP%'=>$objp->zip, - '%VILLE%'=>$objp->town, + '%ZIP%'=>$objp->zip, '%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..c3be6de5ed8 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -45,16 +45,12 @@ class Adherent extends CommonObject var $ref; var $civilite_id; var $firstname; - var $prenom; // deprecated var $lastname; - var $nom; // deprecated var $login; var $pass; var $societe; var $address; - var $cp; var $zip; - var $ville; var $town; var $state_id; // Id of department @@ -67,8 +63,6 @@ class Adherent extends CommonObject var $country_id; var $country_code; var $country; - var $pays_id; // deprecated - var $pays_code; // deprecated var $pays; // deprecated var $email; @@ -229,12 +223,8 @@ class Adherent extends CommonObject '%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass, // 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, '%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, + '%ZIP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, ); @@ -401,11 +391,11 @@ 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->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom); + $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); + $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->firstname); $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->zip=($this->zip?$this->zip:$this->zip); + $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)); @@ -423,14 +413,14 @@ 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.= ", firstname = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"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"); $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.= ", zip=" .($this->zip?"'".$this->db->escape($this->zip)."'":"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."'"; @@ -525,8 +515,6 @@ class Adherent extends CommonObject $luser->civilite_id=$this->civilite_id; $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; @@ -573,7 +561,7 @@ class Adherent extends CommonObject $lthirdparty->tel=$this->phone; $lthirdparty->state_id=$this->state_id; $lthirdparty->country_id=$this->country_id; - $lthirdparty->pays_id=$this->country_id; + $lthirdparty->country_id=$this->country_id; //$lthirdparty->phone_mobile=$this->phone_mobile; $result=$lthirdparty->update($this->fk_soc,$user,0,1,1,'update'); // Use sync to 0 to avoid cyclic updates @@ -1018,7 +1006,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.firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.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,"; @@ -1056,18 +1044,14 @@ class Adherent extends CommonObject $this->ref = $obj->rowid; $this->id = $obj->rowid; $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; $this->societe = $obj->societe; $this->fk_soc = $obj->fk_soc; $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; @@ -1083,8 +1067,6 @@ class Adherent extends CommonObject $this->country = $langs->transnoentitiesnoconv("Country".$obj->country_code); else $this->country=$obj->country; - $this->pays_id = $obj->country_id; // deprecated - $this->pays_code = $obj->country_code; // deprecated $this->pays = $this->country; // deprecated $this->phone = $obj->phone; @@ -1817,14 +1799,14 @@ 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->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom; + if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname; + if ($this->firstname && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->firstname; 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 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->zip && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->zip; + 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/adherents/cotisations.php b/htdocs/adherents/cotisations.php index 1361a5f9123..ad71332eff2 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.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..01c4da22ba9 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -159,11 +159,11 @@ if ($id > 0) print ''.$langs->trans("UserTitle").''.$member->getCivilityLabel().' '; print ''; - // Nom + // Lastname print ''.$langs->trans("Lastname").''.$member->lastname.' '; print ''; - // Prenom + // Firstname print ''.$langs->trans("Firstname").''.$member->firstname.' '; print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index b0bb18511e9..59b2a6e2402 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -251,23 +251,18 @@ 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->firstname = trim($_POST["firstname"]); + $object->lastname = trim($_POST["lastname"]); $object->login = trim($_POST["login"]); $object->pass = trim($_POST["pass"]); $object->societe = trim($_POST["societe"]); $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"]; $object->fk_departement = $_POST["departement_id"]; // deprecated - $object->pays_id = $_POST["country_id"]; // deprecated $object->phone = trim($_POST["phone"]); $object->phone_perso = trim($_POST["phone_perso"]); @@ -409,8 +404,8 @@ if ($action == 'add' && $user->rights->adherent->creer) $typeid=$_POST["typeid"]; $civilite_id=$_POST["civilite_id"]; - $nom=$_POST["nom"]; - $prenom=$_POST["prenom"]; + $lastname=$_POST["lastname"]; + $firstname=$_POST["firstname"]; $societe=$_POST["societe"]; $address=$_POST["address"]; $zip=$_POST["zipcode"]; @@ -434,19 +429,14 @@ if ($action == 'add' && $user->rights->adherent->creer) $socid=$_POST["socid"]; $object->civilite_id = $civilite_id; - $object->prenom = $prenom; // deprecated - $object->nom = $nom; // deprecated - $object->firstname = $prenom; - $object->lastname = $nom; + $object->firstname = $firstname; + $object->lastname = $lastname; $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; - $object->pays_id = $country_id; $object->country_id = $country_id; $object->phone = $phone; $object->phone_perso = $phone_perso; @@ -501,12 +491,12 @@ 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"; } - if ($morphy != 'mor' && (!isset($prenom) || $prenom=='')) { + if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; @@ -738,7 +728,6 @@ else if ($object->country_id) { $tmparray=getCountry($object->country_id,'all'); - $object->pays_code=$tmparray['code']; $object->pays=$tmparray['code']; $object->country_code=$tmparray['code']; $object->country=$tmparray['label']; @@ -821,11 +810,11 @@ else print ''; // Lastname - print ''.$langs->trans("Lastname").''; + print ''.$langs->trans("Lastname").''; print ''; // Firstname - print ''.$langs->trans("Firstname").''; + print ''.$langs->trans("Firstname").''; print ''; // Password @@ -967,8 +956,6 @@ else { dol_print_error($db); } - $object->pays_id=$obj->rowid; - $object->pays_code=$obj->code; $object->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->label; $object->country_id=$obj->rowid; $object->country_code=$obj->code; @@ -1077,12 +1064,12 @@ else print ''; print ''; - // Name - print ''.$langs->trans("Lastname").'lastname).'">'; + // Lastname + print ''.$langs->trans("Lastname").'lastname).'">'; print ''; // Firstname - print ''.$langs->trans("Firstname").'firstname).'">'; + print ''.$langs->trans("Firstname").'firstname).'">'; print ''; // Password diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 03048a443bf..9e86de34c58 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.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.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/ldap.php b/htdocs/adherents/ldap.php index 7d22a417ba7..86667b20122 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -108,11 +108,11 @@ print ''; print $form->showrefnav($adh,'id'); print ''; -// Nom +// Lastname print ''.$langs->trans("Lastname").''.$adh->lastname.' '; print ''; -// Prenom +// Firstname print ''.$langs->trans("Firstname").''.$adh->firstname.' '; print ''; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index b19fcae8d85..8bab0cab35b 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -39,8 +39,8 @@ $filter=GETPOST("filter"); $statut=GETPOST("statut"); $search=GETPOST("search"); $search_ref=GETPOST("search_ref"); -$search_nom=GETPOST("search_nom"); -$search_prenom=GETPOST("search_prenom"); +$search_lastname=GETPOST("search_lastname"); +$search_firstname=GETPOST("search_firstname"); $search_login=GETPOST("search_login"); $type=GETPOST("type"); $search_email=GETPOST("search_email"); @@ -56,14 +56,14 @@ $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_prenom=""; + $search_lastname=""; + $search_firstname=""; $search_login=""; $type=""; $search_email=""; @@ -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.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,9 +103,9 @@ 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.firstname 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.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; + $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($type > 0) { @@ -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.firstname 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/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..f4a60f55cd9 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.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,9 +415,9 @@ 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.firstname 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.ville LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; + $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } if ($status != '') { @@ -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.firstname 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.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if (! empty($search_login)) { @@ -492,8 +492,8 @@ if ($rowid > 0) $param="&rowid=".$rowid; if (! empty($status)) $param.="&status=".$status; - if (! empty($search_lastname)) $param.="&search_nom=".$search_lastname; - if (! empty($search_firstname)) $param.="&search_prenom=".$search_firstname; + if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname; + if (! empty($search_firstname)) $param.="&search_firstname=".$search_firstname; if (! empty($search_login)) $param.="&search_login=".$search_login; if (! empty($search_email)) $param.="&search_email=".$search_email; if (! empty($filter)) $param.="&filter=".$filter; @@ -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/admin/carrier.php b/htdocs/admin/carrier.php new file mode 100644 index 00000000000..305b3f30529 --- /dev/null +++ b/htdocs/admin/carrier.php @@ -0,0 +1,219 @@ +. + */ + +/** + * \file htdocs/admin/carrier.php + * \ingroup expedition + * \brief Page d'administration des Transporteurs + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; + +$langs->load("admin"); +$langs->load("sendings"); +$langs->load("deliveries"); +$langs->load('other'); + +if (! $user->admin) + accessforbidden(); + +$action=GETPOST('action','alpha'); +$carrier=GETPOST('carrier','int'); + +$object = new Expedition($db); + + +/* + * Actions + */ +//if ($action==setvalue AND $carrier) +if ($action==setvalue) +{ + // need to add check on values + $object->update[code]=GETPOST('code','alpha'); + $object->update[libelle]=GETPOST('libelle','alpha'); + $object->update[description]=GETPOST('description','alpha'); + $object->update[tracking]=GETPOST('tracking','alpha'); + $object->update_delivery_method($carrier); + header("Location: carrier.php"); + exit; +} + +if ($action==activate_carrier AND $carrier!='') +{ + $object->activ_delivery_method($carrier); +} + +if ($action==disable_carrier AND $carrier!='') +{ + $object->disable_delivery_method($carrier); +} + +/* + * View + */ + +$form=new Form($db); + +llxHeader("",""); + +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("SendingsSetup"),$linkback,'setup'); +print '
'; + + +//if ($mesg) print $mesg.'
'; + + +$h = 0; + +$head[$h][0] = DOL_URL_ROOT."/admin/confexped.php"; +$head[$h][1] = $langs->trans("Setup"); +$h++; + +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$hselected=$h; +$h++; + +if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; + $head[$h][1] = $langs->trans("Sending"); + $h++; +} + +if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][1] = $langs->trans("Receivings"); + $h++; +} + +dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); + +/* + * Carrier List + */ +if ($action=='edit_carrier' || $action=='setvalue') +{ + // Carrier Edit + if ($carrier!='') $object->list_delivery_methods($carrier); + print_titre($langs->trans("CarrierEdit")); + + print ''; + print ''; + print ''; + + + print '
'; - print ''; print '
'; + + $var=true; + print ''; + print ''; + print ''; + print "\n"; + + $var=!$var; + print ''; + + $var=!$var; + print ''; + + $var=!$var; + print ''; + + $var=!$var; + print ''; + + if ($carrier) + { + print ''; + } + else + { + print ''; + } + + print '
'.$langs->trans("CarrierParameter").''.$langs->trans("Value").'
'; + print $langs->trans("Code").''; + print ''; + print '   '.$langs->trans("Example").': CODE'; + print '
'; + print $langs->trans("Name").''; + print ''; + print '
'; + print $langs->trans("Description").''; + print ''; + print '
'; + print $langs->trans("Tracking").''; + print ''; + print '   '.$langs->trans("Example").': http://www.website.com/dir/{TRACKID}'; + print '


'; + print ''; + +} +else +{ + // Display List + $object->list_delivery_methods(); + $var=true; + print_titre($langs->trans("CarrierList")); + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + for ($i=0; $ilistmeths); $i++) + { + $var=!$var; + print ""; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + } + print ''; + + print '
'.$langs->trans("Code").''.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("TrackingUrl").''.$langs->trans("Status").''.$langs->trans("Edit").'
'.$object->listmeths[$i][code].''.$object->listmeths[$i][libelle].''.$object->listmeths[$i][description].''.$object->listmeths[$i][tracking].''; + if($object->listmeths[$i][active] == 0) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } + print ''; + print ''.img_picto($langs->trans("Edit"),'edit').''; + print '

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

'; + + print ''; +} + +llxFooter(); + +$db->close(); +?> diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 28336d2966a..271318258ee 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -65,9 +65,9 @@ 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_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_ADDRESS",$_POST["address"],'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_ZIP",$_POST["zipcode"],'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); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL",$_POST["tel"],'chaine',0,'',$conf->entity); @@ -276,15 +276,15 @@ if ($action == 'edit' || $action == 'updateedit') $var=!$var; print ''.$langs->trans("CompanyAddress").''; - print ''."\n"; + print ''."\n"; $var=!$var; print ''.$langs->trans("CompanyZip").''; - print ''."\n"; + print ''."\n"; $var=!$var; print ''.$langs->trans("CompanyTown").''; - print ''."\n"; + print ''."\n"; // Country $var=!$var; @@ -646,13 +646,13 @@ 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) . ''; + print ''.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . ''; $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/admin/confexped.php b/htdocs/admin/confexped.php index d9be768461f..6653badfb36 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -84,6 +84,10 @@ $head[$h][1] = $langs->trans("Setup"); $hselected=$h; $h++; +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$h++; + if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d5fe7846714..4bd5a1029c8 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -128,20 +128,20 @@ $tablib[24]= "DictionnaryAccountancysystem"; // Requete pour extraction des donnees des dictionnaires $tabsql=array(); -$tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.code as pays_code, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid"; -$tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as libelle, d.fk_region as region_id, r.nom as region, p.code as pays_code, p.libelle as pays, d.active FROM ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE d.fk_region=r.code_region and r.fk_pays=p.rowid and r.active=1 and p.active=1"; -$tabsql[3] = "SELECT r.rowid as rowid, code_region as code, nom as libelle, r.fk_pays as pays_id, p.code as pays_code, p.libelle as pays, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE r.fk_pays=p.rowid and p.active=1"; +$tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.code as country_code, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid"; +$tabsql[2] = "SELECT d.rowid as rowid, d.code_departement as code, d.nom as libelle, d.fk_region as region_id, r.nom as region, p.code as country_code, p.libelle as pays, d.active FROM ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE d.fk_region=r.code_region and r.fk_pays=p.rowid and r.active=1 and p.active=1"; +$tabsql[3] = "SELECT r.rowid as rowid, code_region as code, nom as libelle, r.fk_pays as country_id, p.code as country_code, p.libelle as pays, r.active FROM ".MAIN_DB_PREFIX."c_regions as r, ".MAIN_DB_PREFIX."c_pays as p WHERE r.fk_pays=p.rowid and p.active=1"; $tabsql[4] = "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_pays"; $tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.civilite AS libelle, c.active FROM ".MAIN_DB_PREFIX."c_civilite AS c"; $tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.type, a.active, a.module, a.position FROM ".MAIN_DB_PREFIX."c_actioncomm AS a"; -$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, p.code as pays_code, p.libelle as pays, a.fk_pays as pays_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_pays as p WHERE a.fk_pays=p.rowid and p.active=1"; +$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, p.code as country_code, p.libelle as pays, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_pays as p WHERE a.fk_pays=p.rowid and p.active=1"; $tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent"; $tabsql[9] = "SELECT code_iso as code, label, unicode, active FROM ".MAIN_DB_PREFIX."c_currencies"; -$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid"; +$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, p.libelle as pays, p.code as country_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid"; $tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; $tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c'; $tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c"; -$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as pays_id, p.code as pays_code, p.libelle as pays, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_pays as p WHERE e.fk_pays=p.rowid and p.active=1"; +$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, p.code as country_code, p.libelle as pays, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_pays as p WHERE e.fk_pays=p.rowid and p.active=1"; $tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format"; $tabsql[16]= "SELECT code, label as libelle, active FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $tabsql[17]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_fees"; @@ -151,7 +151,7 @@ $tabsql[20]= "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREF $tabsql[21]= "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_availability AS c"; $tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason"; $tabsql[23]= "SELECT rowid as rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number as accountancy_code, account_parent, label, active FROM ".MAIN_DB_PREFIX."accountingaccount"; -$tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as pays_id, p.code as pays_code, p.libelle as pays, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_pays as p WHERE s.fk_pays=p.rowid and p.active=1"; +$tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, p.code as country_code, p.libelle as pays, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_pays as p WHERE s.fk_pays=p.rowid and p.active=1"; // Critere de tri du dictionnaire $tabsqlsort=array(); @@ -183,19 +183,19 @@ $tabsqlsort[24]="pcg_version ASC"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield=array(); $tabfield[1] = "code,libelle,pays"; -$tabfield[2] = "code,libelle,region_id,region,pays"; // "code,libelle,region,pays_code-pays" -$tabfield[3] = "code,libelle,pays_id,pays"; +$tabfield[2] = "code,libelle,region_id,region,pays"; // "code,libelle,region,country_code-pays" +$tabfield[3] = "code,libelle,country_id,pays"; $tabfield[4] = "code,libelle"; $tabfield[5] = "code,libelle"; $tabfield[6] = "code,libelle,type,position"; -$tabfield[7] = "code,libelle,pays_id,pays,accountancy_code,deductible"; +$tabfield[7] = "code,libelle,country_id,pays,accountancy_code,deductible"; $tabfield[8] = "code,libelle"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "pays_id,pays,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; $tabfield[11]= "element,source,code,libelle"; $tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; $tabfield[13]= "code,libelle,type"; -$tabfield[14]= "code,libelle,price,organization,pays_id,pays"; +$tabfield[14]= "code,libelle,price,organization,country_id,pays"; $tabfield[15]= "code,libelle,width,height,unit"; $tabfield[16]= "code,libelle"; $tabfield[17]= "code,libelle"; @@ -205,7 +205,7 @@ $tabfield[20]= "code,libelle"; $tabfield[21]= "code,label"; $tabfield[22]= "code,label"; $tabfield[23]= "fk_pcg_version,accountancy_code,account_parent,pcg_type,pcg_subtype,label"; -$tabfield[24]= "pcg_version,pays_id,pays,label"; +$tabfield[24]= "pcg_version,country_id,pays,label"; // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue=array(); @@ -673,8 +673,8 @@ if ($id) if ($sortfield) { - // If sort order is "pays", we use pays_code instead - if ($sortfield == 'pays') $sortfield='pays_code'; + // If sort order is "pays", we use country_code instead + if ($sortfield == 'pays') $sortfield='country_code'; $sql.= " ORDER BY ".$sortfield; if ($sortorder) { @@ -739,7 +739,7 @@ if ($id) if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); } if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); } if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); } - if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $valuetoshow=''; } + if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; } if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); } if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); } if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); } @@ -853,7 +853,7 @@ if ($id) if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); } if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); } if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); } - if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $showfield=0; } + if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); } if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; } if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; } @@ -923,14 +923,14 @@ if ($id) $valuetoshow=$langs->trans('All'); } else if ($fieldlist[$field]=='pays') { - if (empty($obj->pays_code)) + if (empty($obj->country_code)) { $valuetoshow='-'; } else { - $key=$langs->trans("Country".strtoupper($obj->pays_code)); - $valuetoshow=($key != "Country".strtoupper($obj->pays_code)?$obj->pays_code." - ".$key:$obj->pays); + $key=$langs->trans("Country".strtoupper($obj->country_code)); + $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->pays); } } else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='fdm' || $fieldlist[$field] == 'deductible') { @@ -1014,7 +1014,7 @@ if ($id) $key = $langs->trans(strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->$fieldlist[$field]); } - else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { + else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } else if ($fieldlist[$field]=='unicode') { @@ -1196,12 +1196,12 @@ function fieldList($fieldlist,$obj='',$tabname='') if ($fieldlist[$field] == 'pays') { if (in_array('region_id',$fieldlist)) { print ' '; continue; } // For region page, we do not show the country input print ''; - print $form->select_country((! empty($obj->pays_code)?$obj->pays_code:(! empty($obj->pays)?$obj->pays:'')), 'pays', '', 28); + print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->pays)?$obj->pays:'')), 'pays', '', 28); print ''; } - elseif ($fieldlist[$field] == 'pays_id') { - $pays_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); - print ''; + elseif ($fieldlist[$field] == 'country_id') { + $country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); + print ''; } elseif ($fieldlist[$field] == 'region') { print ''; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 709832b1968..c012d52efb1 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -201,6 +201,10 @@ $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php"; $head[$h][1] = $langs->trans("Setup"); $h++; +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$h++; + $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; $head[$h][1] = $langs->trans("Sending"); $hselected=$h; @@ -208,9 +212,9 @@ $h++; if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) { - $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; - $head[$h][1] = $langs->trans("Receivings"); - $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; + $head[$h][1] = $langs->trans("Receivings"); + $h++; } dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); 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/admin/livraison.php b/htdocs/admin/livraison.php index 2603a0a1d51..fa4b7b3c1d4 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -5,8 +5,8 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2012 Juanjo Menent - * Copyright (C) 2011-2012 Philippe Grand + * Copyright (C) 2011-2012 Juanjo Menent + * Copyright (C) 2011-2012 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,13 +50,13 @@ $type='delivery'; if ($action == 'updateMask') { - $maskconstdelivery=GETPOST('maskconstdelivery','alpha'); - $maskdelivery=GETPOST('maskdelivery','alpha'); - if ($maskconstdelivery) $res = dolibarr_set_const($db,$maskconstdelivery,$maskdelivery,'chaine',0,'',$conf->entity); + $maskconstdelivery=GETPOST('maskconstdelivery','alpha'); + $maskdelivery=GETPOST('maskdelivery','alpha'); + if ($maskconstdelivery) $res = dolibarr_set_const($db,$maskconstdelivery,$maskdelivery,'chaine',0,'',$conf->entity); - if (! $res > 0) $error++; + if (! $res > 0) $error++; - if (! $error) + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } @@ -68,12 +68,12 @@ if ($action == 'updateMask') if ($action == 'set_DELIVERY_FREE_TEXT') { - $free=GETPOST('DELIVERY_FREE_TEXT','alpha'); + $free=GETPOST('DELIVERY_FREE_TEXT','alpha'); $res=dolibarr_set_const($db, "DELIVERY_FREE_TEXT",$free,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; - if (! $error) + if (! $error) { $mesg = "".$langs->trans("SetupSaved").""; } @@ -85,58 +85,58 @@ if ($action == 'set_DELIVERY_FREE_TEXT') if ($action == 'specimen') { - $modele=GETPOST('module','alpha'); + $modele=GETPOST('module','alpha'); - $sending = new Livraison($db); - $sending->initAsSpecimen(); + $sending = new Livraison($db); + $sending->initAsSpecimen(); - // Search template files - $file=''; $classname=''; $filefound=0; - $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); - foreach($dirmodels as $reldir) - { - $file=dol_buildpath($reldir."core/modules/livraison/pdf/pdf_".$modele.".modules.php",0); - if (file_exists($file)) - { - $filefound=1; - $classname = "pdf_".$modele; - break; - } - } + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + $file=dol_buildpath($reldir."core/modules/livraison/pdf/pdf_".$modele.".modules.php",0); + if (file_exists($file)) + { + $filefound=1; + $classname = "pdf_".$modele; + break; + } + } - if ($filefound) - { - require_once $file; + if ($filefound) + { + require_once $file; - $module = new $classname($db); + $module = new $classname($db); - if ($module->write_file($sending,$langs) > 0) - { - header("Location: ".DOL_URL_ROOT."/document.php?modulepart=livraison&file=SPECIMEN.pdf"); - return; - } - else - { - $mesg=''.$module->error.''; - dol_syslog($module->error, LOG_ERR); - } - } - else - { - $mesg=''.$langs->trans("ErrorModuleNotFound").''; - dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); - } + if ($module->write_file($sending,$langs) > 0) + { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=livraison&file=SPECIMEN.pdf"); + return; + } + else + { + $mesg=''.$module->error.''; + dol_syslog($module->error, LOG_ERR); + } + } + else + { + $mesg=''.$langs->trans("ErrorModuleNotFound").''; + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } } if ($action == 'set') -{ - $ret = addDocumentModel($value, $type, $label, $scandir); +{ + $ret = addDocumentModel($value, $type, $label, $scandir); } if ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) + if ($ret > 0) { if ($conf->global->LIVRAISON_ADDON_PDF == "$value") dolibarr_del_const($db, 'LIVRAISON_ADDON_PDF',$conf->entity); } @@ -146,17 +146,17 @@ if ($action == 'setdoc') { if (dolibarr_set_const($db, "LIVRAISON_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) { - // La constante qui a ete lue en avant du nouveau set - // on passe donc par une variable pour avoir un affichage coherent + // La constante qui a ete lue en avant du nouveau set + // on passe donc par une variable pour avoir un affichage coherent $conf->global->LIVRAISON_ADDON_PDF = $value; } // On active le modele - $ret = delDocumentModel($value, $type); - if ($ret > 0) - { - $ret = addDocumentModel($value, $type, $label, $scandir); - } + $ret = delDocumentModel($value, $type); + if ($ret > 0) + { + $ret = addDocumentModel($value, $type, $label, $scandir); + } } if ($action == 'setmod') @@ -164,7 +164,7 @@ if ($action == 'setmod') // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated - dolibarr_set_const($db, "LIVRAISON_ADDON",$value,'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "LIVRAISON_ADDON",$value,'chaine',0,'',$conf->entity); } @@ -189,11 +189,15 @@ $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php"; $head[$h][1] = $langs->trans("Setup"); $h++; +$head[$h][0] = DOL_URL_ROOT."/admin/carrier.php"; +$head[$h][1] = $langs->trans("Carriers"); +$h++; + if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { - $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; - $head[$h][1] = $langs->trans("Sending"); - $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; + $head[$h][1] = $langs->trans("Sending"); + $h++; } $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; @@ -222,34 +226,34 @@ clearstatcache(); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/livraison/"); + $dir = dol_buildpath($reldir."core/modules/livraison/"); - if (is_dir($dir)) - { - $handle = opendir($dir); - if (is_resource($handle)) - { - $var=true; - while (($file = readdir($handle))!==false) - { - if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php') - { - $file = substr($file, 0, dol_strlen($file)-4); + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + $var=true; + while (($file = readdir($handle))!==false) + { + if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php') + { + $file = substr($file, 0, dol_strlen($file)-4); - require_once DOL_DOCUMENT_ROOT ."/core/modules/livraison/".$file.'.php'; + require_once DOL_DOCUMENT_ROOT ."/core/modules/livraison/".$file.'.php'; - $module = new $file; + $module = new $file; - // Show modules according to features level - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - if ($module->isEnabled()) - { - $var=!$var; - print ''.$module->nom."\n"; - print $module->info(); - print ''; + if ($module->isEnabled()) + { + $var=!$var; + print ''.$module->nom."\n"; + print $module->info(); + print ''; // Show example of numbering module print ''; @@ -259,48 +263,48 @@ foreach ($dirmodels as $reldir) else print $tmp; print ''."\n"; - print ''; - if ($conf->global->LIVRAISON_ADDON == "$file") - { - print img_picto($langs->trans("Activated"),'switch_on'); - } - else - { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - print ''; + print ''; + if ($conf->global->LIVRAISON_ADDON == "$file") + { + print img_picto($langs->trans("Activated"),'switch_on'); + } + else + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + print ''; - $livraison=new Livraison($db); - $livraison->initAsSpecimen(); + $livraison=new Livraison($db); + $livraison->initAsSpecimen(); - // Info - $htmltooltip=''; - $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; - $nextval=$module->getNextValue($mysoc,$livraison); - if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval - { - $htmltooltip.=''.$langs->trans("NextValue").': '; - if ($nextval) - { - $htmltooltip.=$nextval.'
'; - } - else - { - $htmltooltip.=$langs->trans($module->error).'
'; - } - } + // Info + $htmltooltip=''; + $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; + $nextval=$module->getNextValue($mysoc,$livraison); + if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval + { + $htmltooltip.=''.$langs->trans("NextValue").': '; + if ($nextval) + { + $htmltooltip.=$nextval.'
'; + } + else + { + $htmltooltip.=$langs->trans($module->error).'
'; + } + } - print ''; - print $form->textwithpicto('',$htmltooltip,1,0); - print ''; + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; - print ''; - } - } - } - closedir($handle); - } - } + print ''; + } + } + } + closedir($handle); + } + } } print ''; @@ -352,77 +356,77 @@ clearstatcache(); $var=true; foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/livraison/pdf/"); + $dir = dol_buildpath($reldir."core/modules/livraison/pdf/"); - if (is_dir($dir)) - { - $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,4) == 'pdf_') - { - $name = substr($file, 4, dol_strlen($file) - 16); - $classname = substr($file, 0, dol_strlen($file) - 12); + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,4) == 'pdf_') + { + $name = substr($file, 4, dol_strlen($file) - 16); + $classname = substr($file, 0, dol_strlen($file) - 12); - $var=!$var; + $var=!$var; - print ''; - print $name; - print "\n"; - require_once $dir.$file; - $module = new $classname($db); + print ''; + print $name; + print "\n"; + require_once $dir.$file; + $module = new $classname($db); - print $module->description; - print ''; + print $module->description; + print ''; - // Activ - if (in_array($name, $def)) - { - print "\n"; - print 'scandir.'&label='.urlencode($module->name).'">'; - print img_picto($langs->trans("Enabled"),'switch_on'); - print ''; - print ""; - } - else - { - print "\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; - print ""; - } + // Activ + if (in_array($name, $def)) + { + print "\n"; + print 'scandir.'&label='.urlencode($module->name).'">'; + print img_picto($langs->trans("Enabled"),'switch_on'); + print ''; + print ""; + } + else + { + print "\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print ""; + } - // Defaut - print ""; - if ($conf->global->LIVRAISON_ADDON_PDF == "$name") - { - print img_picto($langs->trans("Default"),'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; - } - print ''; + // Defaut + print ""; + if ($conf->global->LIVRAISON_ADDON_PDF == "$name") + { + print img_picto($langs->trans("Default"),'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + } + print ''; - // Info - $htmltooltip = ''.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); - $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); - print ''; - print $form->textwithpicto('',$htmltooltip,1,0); - print ''; - print ''; - print ''.img_object($langs->trans("Preview"),'sending').''; - print ''; + // Info + $htmltooltip = ''.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; + print ''; + print ''.img_object($langs->trans("Preview"),'sending').''; + print ''; - print ''; - } - } - closedir($handle); - } - } + print ''; + } + } + closedir($handle); + } + } } print ''; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index de4d80bee61..c079e5a8d72 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -233,7 +233,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''; } // List of current notifications for objet_type='withdraw' -$sql = "SELECT u.name, u.firstname"; +$sql = "SELECT u.lastname, u.firstname"; $sql.= ", nd.rowid, ad.code, ad.label"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."notify_def as nd"; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 9cda778b98c..c082183a046 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -200,7 +200,6 @@ if (function_exists("imagecreatefrompng")) } else { - $form = new Form($db); $desc = $form->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning'); print $desc; } diff --git a/htdocs/bookmarks/liste.php b/htdocs/bookmarks/liste.php index 2498974f7ba..371870047d9 100644 --- a/htdocs/bookmarks/liste.php +++ b/htdocs/bookmarks/liste.php @@ -70,7 +70,7 @@ print_fiche_titre($langs->trans("Bookmarks")); if ($mesg) print $mesg; $sql = "SELECT b.fk_soc as rowid, b.dateb, b.rowid as bid, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; -$sql.= " u.login, u.name, u.firstname"; +$sql.= " u.login, u.lastname, u.firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid"; $sql.= " WHERE 1=1"; if (! $user->admin) $sql.= " AND (b.fk_user = ".$user->id." OR b.fk_user is NULL OR b.fk_user = 0)"; @@ -91,7 +91,7 @@ if ($resql) print_liste_field_titre($langs->trans("Title"),'','').""; print_liste_field_titre($langs->trans("Link"),'','').""; print_liste_field_titre($langs->trans("Target"),'','','','','align="center"').""; - print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.name","","",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.lastname","","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Position"),$_SERVER["PHP_SELF"],"b.position","","",'align="right"',$sortfield,$sortorder); print_liste_field_titre('','',''); diff --git a/htdocs/boutique/commande/class/boutiquecommande.class.php b/htdocs/boutique/commande/class/boutiquecommande.class.php index 7168ba977ba..102d43085c2 100644 --- a/htdocs/boutique/commande/class/boutiquecommande.class.php +++ b/htdocs/boutique/commande/class/boutiquecommande.class.php @@ -65,7 +65,7 @@ class BoutiqueCommande { global $conf; - $sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, date_purchased, orders_status, orders_date_finished, currency, currency_value"; + $sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_zipcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_zipcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, date_purchased, orders_status, orders_date_finished, currency, currency_value"; $sql.= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders"; $sql.= " WHERE orders_id = ".$id; @@ -84,13 +84,13 @@ class BoutiqueCommande $this->delivery_adr->name = stripslashes($array["delivery_name"]); $this->delivery_adr->street = stripslashes($array["delivery_street_address"]); - $this->delivery_adr->cp = stripslashes($array["delivery_postcode"]); + $this->delivery_adr->zip = stripslashes($array["delivery_zipcode"]); $this->delivery_adr->city = stripslashes($array["delivery_city"]); $this->delivery_adr->country = stripslashes($array["delivery_country"]); $this->billing_adr->name = stripslashes($array["billing_name"]); $this->billing_adr->street = stripslashes($array["billing_street_address"]); - $this->billing_adr->cp = stripslashes($array["billing_postcode"]); + $this->billing_adr->zip = stripslashes($array["billing_zipcode"]); $this->billing_adr->city = stripslashes($array["billing_city"]); $this->billing_adr->country = stripslashes($array["billing_country"]); diff --git a/htdocs/boutique/commande/fiche.php b/htdocs/boutique/commande/fiche.php index 598e48d2000..e7f0e83537f 100644 --- a/htdocs/boutique/commande/fiche.php +++ b/htdocs/boutique/commande/fiche.php @@ -55,8 +55,8 @@ if ($id > 0) print "".$langs->trans("Address")."".$langs->trans("Delivery")."".$langs->trans("Invoice").""; - print " ".$commande->delivery_adr->name."
".$commande->delivery_adr->street."
".$commande->delivery_adr->cp."
".$commande->delivery_adr->city."
".$commande->delivery_adr->country.""; - print "".$commande->billing_adr->name."
".$commande->billing_adr->street."
".$commande->billing_adr->cp."
".$commande->billing_adr->city."
".$commande->billing_adr->country.""; + print " ".$commande->delivery_adr->name."
".$commande->delivery_adr->street."
".$commande->delivery_adr->zip."
".$commande->delivery_adr->city."
".$commande->delivery_adr->country.""; + print "".$commande->billing_adr->name."
".$commande->billing_adr->street."
".$commande->billing_adr->zip."
".$commande->billing_adr->city."
".$commande->billing_adr->country.""; print ""; print ""; diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index cd35bc02174..b6dc3cb2046 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -94,8 +94,8 @@ if ( $retour >= 0 ) $_SESSION['uid'] = $tab['rowid']; $_SESSION['uname'] = $username; - $_SESSION['nom'] = $tab['name']; - $_SESSION['prenom'] = $tab['firstname']; + $_SESSION['lastname'] = $tab['lastname']; + $_SESSION['firstname'] = $tab['firstname']; $_SESSION['CASHDESK_ID_THIRDPARTY'] = $thirdpartyid; $_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid; $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : ''); diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index e43c8527e23..59800fb57c1 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -66,7 +66,7 @@ print ''; // Disconnect -print '