New: add possibility to defined position/job of a user
Conflicts: htdocs/install/mysql/migration/3.2.0-3.3.0.sql
This commit is contained in:
parent
f3086ae23d
commit
6b21ca442d
@ -51,6 +51,8 @@ For users:
|
|||||||
- New: Allow to search product from barcodes directly from invoices, proposals... through AJAX.
|
- New: Allow to search product from barcodes directly from invoices, proposals... through AJAX.
|
||||||
- New: Can make one invoice for several orders.
|
- 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 experimental modules:
|
||||||
- New: Add margin and commissions management module.
|
- New: Add margin and commissions management module.
|
||||||
|
|
||||||
|
|||||||
@ -756,3 +756,6 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN remise DOUBLE NOT NULL DEFA
|
|||||||
|
|
||||||
-- Stock calculation on product
|
-- 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);
|
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;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
-- Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
-- Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
-- Copyright (C) 2007-2011 Regis Houssin <regis@dolibarr.fr>
|
-- Copyright (C) 2007-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
@ -35,6 +35,7 @@ create table llx_user
|
|||||||
civilite varchar(6),
|
civilite varchar(6),
|
||||||
name varchar(50),
|
name varchar(50),
|
||||||
firstname varchar(50),
|
firstname varchar(50),
|
||||||
|
job varchar(128),
|
||||||
office_phone varchar(20),
|
office_phone varchar(20),
|
||||||
office_fax varchar(20),
|
office_fax varchar(20),
|
||||||
user_mobile varchar(20),
|
user_mobile varchar(20),
|
||||||
@ -58,4 +59,5 @@ create table llx_user
|
|||||||
statut tinyint DEFAULT 1,
|
statut tinyint DEFAULT 1,
|
||||||
photo varchar(255), -- filename or url of photo
|
photo varchar(255), -- filename or url of photo
|
||||||
lang varchar(6)
|
lang varchar(6)
|
||||||
|
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
# Dolibarr language file - en_GB - main
|
# Dolibarr language file - en_GB - main
|
||||||
CHARSET=UTF-8
|
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.
|
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°
|
ChequeNumber=Cheque N°
|
||||||
ChequeOrTransferNumber=Cheque/Transfer N°
|
ChequeOrTransferNumber=Cheque/Transfer N°
|
||||||
ChequeMaker=Cheque transmitter
|
ChequeMaker=Cheque transmitter
|
||||||
@ -20,3 +18,21 @@ Cheques=Cheques
|
|||||||
# PaymentConditions
|
# PaymentConditions
|
||||||
PaymentConditionShortRECEP=Due on Receipt
|
PaymentConditionShortRECEP=Due on Receipt
|
||||||
PaymentConditionRECEP=Due on Receipt
|
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
|
||||||
@ -51,6 +51,7 @@ class User extends CommonObject
|
|||||||
var $firstname;
|
var $firstname;
|
||||||
var $note;
|
var $note;
|
||||||
var $email;
|
var $email;
|
||||||
|
var $job;
|
||||||
var $signature;
|
var $signature;
|
||||||
var $office_phone;
|
var $office_phone;
|
||||||
var $office_fax;
|
var $office_fax;
|
||||||
@ -138,7 +139,7 @@ class User extends CommonObject
|
|||||||
$login=trim($login);
|
$login=trim($login);
|
||||||
|
|
||||||
// Get user
|
// 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.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.pass, u.pass_crypted, u.pass_temp,";
|
||||||
$sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.ldap_sid,";
|
$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->prenom = $obj->firstname; // TODO deprecated
|
||||||
$this->firstname = $obj->firstname;
|
$this->firstname = $obj->firstname;
|
||||||
|
|
||||||
$this->login = $obj->login;
|
$this->login = $obj->login;
|
||||||
$this->pass_indatabase = $obj->pass;
|
$this->pass_indatabase = $obj->pass;
|
||||||
$this->pass_indatabase_crypted = $obj->pass_crypted;
|
$this->pass_indatabase_crypted = $obj->pass_crypted;
|
||||||
$this->pass = $obj->pass;
|
$this->pass = $obj->pass;
|
||||||
$this->pass_temp = $obj->pass_temp;
|
$this->pass_temp = $obj->pass_temp;
|
||||||
$this->office_phone = $obj->office_phone;
|
$this->office_phone = $obj->office_phone;
|
||||||
$this->office_fax = $obj->office_fax;
|
$this->office_fax = $obj->office_fax;
|
||||||
$this->user_mobile = $obj->user_mobile;
|
$this->user_mobile = $obj->user_mobile;
|
||||||
$this->email = $obj->email;
|
$this->email = $obj->email;
|
||||||
$this->signature = $obj->signature;
|
$this->job = $obj->job;
|
||||||
$this->admin = $obj->admin;
|
$this->signature = $obj->signature;
|
||||||
$this->note = $obj->note;
|
$this->admin = $obj->admin;
|
||||||
$this->statut = $obj->statut;
|
$this->note = $obj->note;
|
||||||
$this->photo = $obj->photo;
|
$this->statut = $obj->statut;
|
||||||
$this->openid = $obj->openid;
|
$this->photo = $obj->photo;
|
||||||
$this->lang = $obj->lang;
|
$this->openid = $obj->openid;
|
||||||
$this->entity = $obj->entity;
|
$this->lang = $obj->lang;
|
||||||
|
$this->entity = $obj->entity;
|
||||||
|
|
||||||
$this->datec = $this->db->jdate($obj->datec);
|
$this->datec = $this->db->jdate($obj->datec);
|
||||||
$this->datem = $this->db->jdate($obj->datem);
|
$this->datem = $this->db->jdate($obj->datem);
|
||||||
$this->datelastlogin = $this->db->jdate($obj->datel);
|
$this->datelastlogin = $this->db->jdate($obj->datel);
|
||||||
$this->datepreviouslogin = $this->db->jdate($obj->datep);
|
$this->datepreviouslogin = $this->db->jdate($obj->datep);
|
||||||
|
|
||||||
$this->webcal_login = $obj->webcal_login;
|
$this->webcal_login = $obj->webcal_login;
|
||||||
$this->phenix_login = $obj->phenix_login;
|
$this->phenix_login = $obj->phenix_login;
|
||||||
@ -1070,6 +1072,7 @@ class User extends CommonObject
|
|||||||
$this->office_fax = trim($this->office_fax);
|
$this->office_fax = trim($this->office_fax);
|
||||||
$this->user_mobile = trim($this->user_mobile);
|
$this->user_mobile = trim($this->user_mobile);
|
||||||
$this->email = trim($this->email);
|
$this->email = trim($this->email);
|
||||||
|
$this->job = trim($this->job);
|
||||||
$this->signature = trim($this->signature);
|
$this->signature = trim($this->signature);
|
||||||
$this->note = trim($this->note);
|
$this->note = trim($this->note);
|
||||||
$this->openid = trim(empty($this->openid)?'':$this->openid); // Avoid warning
|
$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.= ", office_fax = '".$this->db->escape($this->office_fax)."'";
|
||||||
$sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'";
|
$sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'";
|
||||||
$sql.= ", email = '".$this->db->escape($this->email)."'";
|
$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.= ", webcal_login = '".$this->db->escape($this->webcal_login)."'";
|
||||||
$sql.= ", phenix_login = '".$this->db->escape($this->phenix_login)."'";
|
$sql.= ", phenix_login = '".$this->db->escape($this->phenix_login)."'";
|
||||||
$sql.= ", phenix_pass = '".$this->db->escape($this->phenix_pass)."'";
|
$sql.= ", phenix_pass = '".$this->db->escape($this->phenix_pass)."'";
|
||||||
|
|||||||
@ -183,12 +183,16 @@ if ($action == 'add' && $canadduser)
|
|||||||
$edituser->office_fax = $_POST["office_fax"];
|
$edituser->office_fax = $_POST["office_fax"];
|
||||||
$edituser->user_mobile = $_POST["user_mobile"];
|
$edituser->user_mobile = $_POST["user_mobile"];
|
||||||
$edituser->email = $_POST["email"];
|
$edituser->email = $_POST["email"];
|
||||||
$edituser->webcal_login = $_POST["webcal_login"];
|
$edituser->job = $_POST["job"];
|
||||||
$edituser->signature = $_POST["signature"];
|
$edituser->signature = $_POST["signature"];
|
||||||
$edituser->phenix_login = $_POST["phenix_login"];
|
|
||||||
$edituser->phenix_pass = $_POST["phenix_pass"];
|
|
||||||
$edituser->note = $_POST["note"];
|
$edituser->note = $_POST["note"];
|
||||||
$edituser->ldap_sid = $_POST["ldap_sid"];
|
$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 multicompany is off, admin users must all be on entity 0.
|
||||||
if (! empty($conf->multicompany->enabled))
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
@ -301,11 +305,15 @@ if ($action == 'update' && ! $_POST["cancel"])
|
|||||||
$edituser->office_fax = $_POST["office_fax"];
|
$edituser->office_fax = $_POST["office_fax"];
|
||||||
$edituser->user_mobile = $_POST["user_mobile"];
|
$edituser->user_mobile = $_POST["user_mobile"];
|
||||||
$edituser->email = $_POST["email"];
|
$edituser->email = $_POST["email"];
|
||||||
|
$edituser->job = $_POST["job"];
|
||||||
$edituser->signature = $_POST["signature"];
|
$edituser->signature = $_POST["signature"];
|
||||||
$edituser->openid = $_POST["openid"];
|
$edituser->openid = $_POST["openid"];
|
||||||
|
|
||||||
|
// FIXME external module
|
||||||
$edituser->webcal_login = $_POST["webcal_login"];
|
$edituser->webcal_login = $_POST["webcal_login"];
|
||||||
$edituser->phenix_login = $_POST["phenix_login"];
|
$edituser->phenix_login = $_POST["phenix_login"];
|
||||||
$edituser->phenix_pass = $_POST["phenix_pass"];
|
$edituser->phenix_pass = $_POST["phenix_pass"];
|
||||||
|
|
||||||
if (! empty($conf->multicompany->enabled))
|
if (! empty($conf->multicompany->enabled))
|
||||||
{
|
{
|
||||||
if (! empty($_POST["superadmin"]))
|
if (! empty($_POST["superadmin"]))
|
||||||
@ -639,6 +647,12 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Position/Job
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("PostOrFunction").'</td>';
|
||||||
|
print '<td>';
|
||||||
|
print '<input size="30" type="text" name="job" value="'.GETPOST('job').'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print '<tr><td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
print '<tr><td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -996,6 +1010,11 @@ else
|
|||||||
print '<td>'.$fuser->prenom.'</td>';
|
print '<td>'.$fuser->prenom.'</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
// Position/Job
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("PostOrFunction").'</td>';
|
||||||
|
print '<td>'.$fuser->job.'</td>';
|
||||||
|
print '</tr>'."\n";
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print '<tr><td valign="top">'.$langs->trans("Login").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("Login").'</td>';
|
||||||
if (! empty($fuser->ldap_sid) && $fuser->statut==0)
|
if (! empty($fuser->ldap_sid) && $fuser->statut==0)
|
||||||
@ -1488,6 +1507,12 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Position/Job
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("PostOrFunction").'</td>';
|
||||||
|
print '<td>';
|
||||||
|
print '<input size="30" type="text" name="job" value="'.$fuser->job.'">';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print "<tr>".'<td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
print "<tr>".'<td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user