Merge branch 'develop' into feat-order-tags
This commit is contained in:
commit
1df8cc3bd5
11 changed files with 99 additions and 38 deletions
|
|
@ -235,14 +235,14 @@ if (isModEnabled("supplier_order")) {
|
|||
|
||||
|
||||
/*
|
||||
* List of users allowed
|
||||
* List of users allowed to approve
|
||||
*/
|
||||
|
||||
$sql = "SELECT";
|
||||
if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
|
||||
$sql .= " DISTINCT";
|
||||
}
|
||||
$sql .= " u.rowid, u.lastname, u.firstname, u.email, u.statut";
|
||||
$sql .= " u.rowid, u.login, u.lastname, u.firstname, u.email, u.photo, u.statut";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
|
||||
$sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||
|
|
@ -252,7 +252,7 @@ if (isModEnabled('multicompany') && getDolGlobalString('MULTICOMPANY_TRANSVERSE_
|
|||
} else {
|
||||
$sql .= " WHERE (u.entity IN (".getEntity('user')."))";
|
||||
}
|
||||
$sql .= " AND u.fk_soc IS NULL"; // An external user can not approved
|
||||
$sql .= " AND u.fk_soc IS NULL"; // An external user can not approve
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
|
|
@ -264,6 +264,9 @@ if ($resql) {
|
|||
print '<tr class="liste_titre"><th>'.$langs->trans("UserWithApproveOrderGrant").'</th>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
|
@ -272,19 +275,29 @@ if ($resql) {
|
|||
$userstatic->loadRights('fournisseur');
|
||||
|
||||
if ($userstatic->hasRight('fournisseur', 'commande', 'approuver')) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
if ($i > 0) {
|
||||
print ', ';
|
||||
}
|
||||
|
||||
$userstatic->lastname = $obj->lastname;
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
$userstatic->email = $obj->email;
|
||||
$userstatic->login = $obj->login;
|
||||
$userstatic->photo = $obj->photo;
|
||||
$userstatic->status = $obj->statut;
|
||||
print $userstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print $userstatic->getNomUrl(-1);
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
if ($i == 0) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("Nobody").'</span>';
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table></div><br>";
|
||||
$db->free($resql);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -58,3 +58,76 @@ ALTER TABLE llx_holiday_config ADD UNIQUE INDEX idx_holiday_config (entity, name
|
|||
ALTER TABLE llx_societe_account ADD COLUMN ip varchar(250);
|
||||
|
||||
ALTER TABLE llx_product ADD COLUMN packaging float(24,8) DEFAULT NULL;
|
||||
|
||||
|
||||
ALTER TABLE llx_categorie_member ADD COLUMN import_key varchar(14);
|
||||
ALTER TABLE llx_category_bankline ADD COLUMN import_key varchar(14);
|
||||
|
||||
|
||||
create table llx_categorie_order
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_order integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
--noqa:disable=PRS
|
||||
ALTER TABLE llx_categorie_order ADD PRIMARY KEY pk_categorie_order(fk_categorie, fk_order);
|
||||
--noqa:enable=PRS
|
||||
ALTER TABLE llx_categorie_order ADD INDEX idx_categorie_order_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_order ADD INDEX idx_categorie_order_fk_order (fk_order);
|
||||
|
||||
ALTER TABLE llx_categorie_order ADD CONSTRAINT fk_categorie_order_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_order ADD CONSTRAINT fk_categorie_order_fk_order_rowid FOREIGN KEY (fk_order) REFERENCES llx_commande (rowid);
|
||||
|
||||
|
||||
create table llx_categorie_invoice
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_invoice integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
--noqa:disable=PRS
|
||||
ALTER TABLE llx_categorie_invoice ADD PRIMARY KEY pk_categorie_invoice(fk_categorie, fk_invoice);
|
||||
--noqa:enable=PRS
|
||||
ALTER TABLE llx_categorie_invoice ADD INDEX idx_categorie_invoice_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_invoice ADD INDEX idx_categorie_invoice_fk_invoice (fk_invoice);
|
||||
|
||||
ALTER TABLE llx_categorie_invoice ADD CONSTRAINT fk_categorie_invoice_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_invoice ADD CONSTRAINT fk_categorie_invoice_fk_invoice_rowid FOREIGN KEY (fk_invoice) REFERENCES llx_facture (rowid);
|
||||
|
||||
|
||||
create table llx_categorie_supplier_order
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_supplier_order integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
--noqa:disable=PRS
|
||||
ALTER TABLE llx_categorie_supplier_order ADD PRIMARY KEY pk_categorie_supplier_order(fk_categorie, fk_supplier_order);
|
||||
--noqa:enable=PRS
|
||||
ALTER TABLE llx_categorie_supplier_order ADD INDEX idx_categorie_supplier_order_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_supplier_order ADD INDEX idx_categorie_supplier_order_fk_supplier_order (fk_supplier_order);
|
||||
|
||||
ALTER TABLE llx_categorie_supplier_order ADD CONSTRAINT fk_categorie_supplier_order_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_supplier_order ADD CONSTRAINT fk_categorie_supplier_order_fk_supplier_order_rowid FOREIGN KEY (fk_supplier_order) REFERENCES llx_commande_fournisseur (rowid);
|
||||
|
||||
|
||||
create table llx_categorie_supplier_invoice
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_supplier_invoice integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
||||
--noqa:disable=PRS
|
||||
ALTER TABLE llx_categorie_supplier_invoice ADD PRIMARY KEY pk_categorie_supplier_invoice(fk_categorie, fk_supplier_invoice);
|
||||
--noqa:enable=PRS
|
||||
|
||||
ALTER TABLE llx_categorie_supplier_invoice ADD INDEX idx_categorie_supplier_invoice_fk_categorie (fk_categorie);
|
||||
ALTER TABLE llx_categorie_supplier_invoice ADD INDEX idx_categorie_supplier_invoice_fk_supplier_invoice (fk_supplier_invoice);
|
||||
|
||||
ALTER TABLE llx_categorie_supplier_invoice ADD CONSTRAINT fk_categorie_supplier_invoice_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_supplier_invoice ADD CONSTRAINT fk_categorie_supplier_invoice_fk_supplier_invoice_rowid FOREIGN KEY (fk_supplier_invoice) REFERENCES llx_facture_fourn (rowid);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
-- ============================================================================
|
||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||
-- Copyright (C) 2005-2010 Matthieu Valleton <mv@seeschloss.org>
|
||||
-- Copyright (C) 2005-2010 Matthieu Valleton <mv@seeschloss.org>
|
||||
--
|
||||
-- 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
|
||||
|
|
@ -20,5 +20,6 @@
|
|||
create table llx_categorie_member
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_member integer NOT NULL
|
||||
fk_member integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
-- ===================================================================
|
||||
-- Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
--
|
||||
-- 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
|
||||
-- the Free Software Foundation; either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
-- TODO : Remove this file, content of this table has been moved into llx_categories table
|
||||
|
||||
create table llx_category_bank
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
label varchar(255),
|
||||
entity integer DEFAULT 1 NOT NULL -- multi company id
|
||||
)ENGINE=innodb;
|
||||
|
|
@ -20,5 +20,6 @@
|
|||
create table llx_category_bankline
|
||||
(
|
||||
lineid integer NOT NULL,
|
||||
fk_categ integer NOT NULL
|
||||
fk_categ integer NOT NULL,
|
||||
import_key varchar(14)
|
||||
)ENGINE=innodb;
|
||||
|
|
|
|||
Loading…
Reference in a new issue