diff --git a/ChangeLog b/ChangeLog index 63a3740a7c8..a1de53b75a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -50,7 +50,9 @@ For users: - New: Allow to search thirds and products from barcodes directly from the permanent mini search left box. - New: Allow to search product from barcodes directly from invoices, proposals... through AJAX. - New: Can make one invoice for several orders. -- New: POS module can works with only one payment method (cach, chq, credit card). +- New: POS module can works with only one payment method (cach, chq, credit card). +- New: Add possibility to defined position/job of a user + New experimental modules: - New: Add margin and commissions management module. diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index 08142a50c45..81922a2b4b9 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -756,3 +756,6 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN remise DOUBLE NOT NULL DEFA -- Stock calculation on product UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); + +-- Add possibility to defined position/job of a user +ALTER TABLE llx_user ADD COLUMN job varchar(128) AFTER firstname; diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 006b0cc993e..dd42a2062c7 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -1,7 +1,7 @@ -- ============================================================================ -- Copyright (C) 2001-2003 Rodolphe Quiedeville -- Copyright (C) 2006-2011 Laurent Destailleur --- Copyright (C) 2007-2011 Regis Houssin +-- Copyright (C) 2007-2012 Regis Houssin -- -- 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 @@ -35,6 +35,7 @@ create table llx_user civilite varchar(6), name varchar(50), firstname varchar(50), + job varchar(128), office_phone varchar(20), office_fax varchar(20), user_mobile varchar(20), @@ -58,4 +59,5 @@ create table llx_user statut tinyint DEFAULT 1, photo varchar(255), -- filename or url of photo lang varchar(6) + )ENGINE=innodb; diff --git a/htdocs/langs/en_GB/bills.lang b/htdocs/langs/en_GB/bills.lang index 7bfffa69165..60c38ade196 100644 --- a/htdocs/langs/en_GB/bills.lang +++ b/htdocs/langs/en_GB/bills.lang @@ -1,8 +1,6 @@ # Dolibarr language file - en_GB - main CHARSET=UTF-8 PrettyLittleSentence=Accept the amount of payments due by cheques issued in my name as a Member of an accounting association approved by the Fiscal Administration. -PaymentTypeCHQ=Cheque -PaymentTypeShortCHQ=Cheque ChequeNumber=Cheque N° ChequeOrTransferNumber=Cheque/Transfer N° ChequeMaker=Cheque transmitter @@ -19,4 +17,22 @@ Cheques=Cheques # PaymentConditions PaymentConditionShortRECEP=Due on Receipt -PaymentConditionRECEP=Due on Receipt \ No newline at end of file +PaymentConditionRECEP=Due on Receipt + +# PaymentType +PaymentTypeVIR=Bank transfer +PaymentTypeShortVIR=Bank transfer +PaymentTypePRE=Direct debit +PaymentTypeShortPRE=Direct debit +PaymentTypeLIQ=Cash +PaymentTypeShortLIQ=Cash +PaymentTypeCB=Credit card +PaymentTypeShortCB=Credit card +PaymentTypeCHQ=Cheque +PaymentTypeShortCHQ=Cheque +PaymentTypeTIP=TIP +PaymentTypeShortTIP=TIP +PaymentTypeVAD=On line payment +PaymentTypeShortVAD=On line payment +PaymentTypeTRA=Bill payment +PaymentTypeShortTRA=Bill \ No newline at end of file diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 1542e51a5f1..ce7c2953e19 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -51,6 +51,7 @@ class User extends CommonObject var $firstname; var $note; var $email; + var $job; var $signature; var $office_phone; var $office_fax; @@ -138,7 +139,7 @@ class User extends CommonObject $login=trim($login); // Get user - $sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; + $sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; $sql.= " u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note,"; $sql.= " u.pass, u.pass_crypted, u.pass_temp,"; $sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.ldap_sid,"; @@ -193,28 +194,29 @@ class User extends CommonObject $this->prenom = $obj->firstname; // TODO deprecated $this->firstname = $obj->firstname; - $this->login = $obj->login; + $this->login = $obj->login; $this->pass_indatabase = $obj->pass; $this->pass_indatabase_crypted = $obj->pass_crypted; - $this->pass = $obj->pass; - $this->pass_temp = $obj->pass_temp; - $this->office_phone = $obj->office_phone; + $this->pass = $obj->pass; + $this->pass_temp = $obj->pass_temp; + $this->office_phone = $obj->office_phone; $this->office_fax = $obj->office_fax; $this->user_mobile = $obj->user_mobile; - $this->email = $obj->email; - $this->signature = $obj->signature; - $this->admin = $obj->admin; - $this->note = $obj->note; - $this->statut = $obj->statut; - $this->photo = $obj->photo; - $this->openid = $obj->openid; - $this->lang = $obj->lang; - $this->entity = $obj->entity; + $this->email = $obj->email; + $this->job = $obj->job; + $this->signature = $obj->signature; + $this->admin = $obj->admin; + $this->note = $obj->note; + $this->statut = $obj->statut; + $this->photo = $obj->photo; + $this->openid = $obj->openid; + $this->lang = $obj->lang; + $this->entity = $obj->entity; - $this->datec = $this->db->jdate($obj->datec); - $this->datem = $this->db->jdate($obj->datem); - $this->datelastlogin = $this->db->jdate($obj->datel); - $this->datepreviouslogin = $this->db->jdate($obj->datep); + $this->datec = $this->db->jdate($obj->datec); + $this->datem = $this->db->jdate($obj->datem); + $this->datelastlogin = $this->db->jdate($obj->datel); + $this->datepreviouslogin = $this->db->jdate($obj->datep); $this->webcal_login = $obj->webcal_login; $this->phenix_login = $obj->phenix_login; @@ -1070,6 +1072,7 @@ class User extends CommonObject $this->office_fax = trim($this->office_fax); $this->user_mobile = trim($this->user_mobile); $this->email = trim($this->email); + $this->job = trim($this->job); $this->signature = trim($this->signature); $this->note = trim($this->note); $this->openid = trim(empty($this->openid)?'':$this->openid); // Avoid warning @@ -1101,7 +1104,8 @@ class User extends CommonObject $sql.= ", office_fax = '".$this->db->escape($this->office_fax)."'"; $sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'"; $sql.= ", email = '".$this->db->escape($this->email)."'"; - $sql.= ", signature = '".addslashes($this->signature)."'"; + $sql.= ", job = '".$this->db->escape($this->job)."'"; + $sql.= ", signature = '".$this->db->escape($this->signature)."'"; $sql.= ", webcal_login = '".$this->db->escape($this->webcal_login)."'"; $sql.= ", phenix_login = '".$this->db->escape($this->phenix_login)."'"; $sql.= ", phenix_pass = '".$this->db->escape($this->phenix_pass)."'"; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 429be1f16e6..d3c1c40e877 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -183,12 +183,16 @@ if ($action == 'add' && $canadduser) $edituser->office_fax = $_POST["office_fax"]; $edituser->user_mobile = $_POST["user_mobile"]; $edituser->email = $_POST["email"]; - $edituser->webcal_login = $_POST["webcal_login"]; + $edituser->job = $_POST["job"]; $edituser->signature = $_POST["signature"]; - $edituser->phenix_login = $_POST["phenix_login"]; - $edituser->phenix_pass = $_POST["phenix_pass"]; $edituser->note = $_POST["note"]; $edituser->ldap_sid = $_POST["ldap_sid"]; + + // FIXME external module + $edituser->webcal_login = $_POST["webcal_login"]; + $edituser->phenix_login = $_POST["phenix_login"]; + $edituser->phenix_pass = $_POST["phenix_pass"]; + // If multicompany is off, admin users must all be on entity 0. if (! empty($conf->multicompany->enabled)) { @@ -301,11 +305,15 @@ if ($action == 'update' && ! $_POST["cancel"]) $edituser->office_fax = $_POST["office_fax"]; $edituser->user_mobile = $_POST["user_mobile"]; $edituser->email = $_POST["email"]; + $edituser->job = $_POST["job"]; $edituser->signature = $_POST["signature"]; $edituser->openid = $_POST["openid"]; + + // FIXME external module $edituser->webcal_login = $_POST["webcal_login"]; $edituser->phenix_login = $_POST["phenix_login"]; $edituser->phenix_pass = $_POST["phenix_pass"]; + if (! empty($conf->multicompany->enabled)) { if (! empty($_POST["superadmin"])) @@ -639,6 +647,12 @@ if (($action == 'create') || ($action == 'adduserldap')) } print ''; + // Position/Job + print ''.$langs->trans("PostOrFunction").''; + print ''; + print ''; + print ''; + // Login print ''.$langs->trans("Login").''; print ''; @@ -996,6 +1010,11 @@ else print ''.$fuser->prenom.''; print ''."\n"; + // Position/Job + print ''.$langs->trans("PostOrFunction").''; + print ''.$fuser->job.''; + print ''."\n"; + // Login print ''.$langs->trans("Login").''; if (! empty($fuser->ldap_sid) && $fuser->statut==0) @@ -1488,6 +1507,12 @@ else } print ''; + // Position/Job + print ''.$langs->trans("PostOrFunction").''; + print ''; + print ''; + print ''; + // Login print "".''.$langs->trans("Login").''; print '';