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
@ -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.
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- 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
|
||||
-- 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;
|
||||
|
||||
@ -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
|
||||
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 $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)."'";
|
||||
|
||||
@ -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 '</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
|
||||
print '<tr><td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||
print '<td>';
|
||||
@ -996,6 +1010,11 @@ else
|
||||
print '<td>'.$fuser->prenom.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Position/Job
|
||||
print '<tr><td valign="top">'.$langs->trans("PostOrFunction").'</td>';
|
||||
print '<td>'.$fuser->job.'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Login
|
||||
print '<tr><td valign="top">'.$langs->trans("Login").'</td>';
|
||||
if (! empty($fuser->ldap_sid) && $fuser->statut==0)
|
||||
@ -1488,6 +1507,12 @@ else
|
||||
}
|
||||
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
|
||||
print "<tr>".'<td valign="top"><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
|
||||
print '<td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user