diff --git a/ChangeLog b/ChangeLog index 9af3bdc2a74ed2520c60b590b8dc7083eeb4af8e..374ee7a91fdac5f0d0294375f6b38725cf3fd196 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,7 @@ For users: - New: Created {line_price_ht_locale}, {line_price_vat_locale} and {line_price_ttc_locale} ODT tags. - New: Add filter on project status into task list. By default, only "opened" project are visible. - New: Status "validated" for project are renamed into "opened". +- New: Add barcode fields into user database. - Fix: Project Task numbering customs rule works. TODO diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index bd37d953875fda39250e751e75c77b0d9d598aae..e29443e6b9b28e6f091a25f7cec7f10d62dc7810 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -991,11 +991,13 @@ ALTER TABLE llx_product_customer_price ADD UNIQUE INDEX uk_customer_price_fk_pro ALTER TABLE llx_product_customer_price ADD CONSTRAINT fk_customer_price_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product(rowid) ON DELETE CASCADE; ALTER TABLE llx_product_customer_price ADD CONSTRAINT fk_customer_price_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid) ON DELETE CASCADE; +ALTER TABLE llx_user ADD COLUMN barcode varchar(255) DEFAULT NULL; +ALTER TABLE llx_user ADD COLUMN fk_barcode_type integer DEFAULT 0; create table llx_product_customer_price_log ( rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, -- multi company id + entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, fk_product integer NOT NULL, fk_soc integer NOT NULL, @@ -1015,43 +1017,43 @@ create table llx_product_customer_price_log --Batch number managment ALTER TABLE llx_product ADD COLUMN tobatch tinyint DEFAULT 0 NOT NULL; -CREATE TABLE IF NOT EXISTS `llx_product_batch` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_product_stock` int(11) NOT NULL, - `eatby` datetime DEFAULT NULL, - `sellby` datetime DEFAULT NULL, - `batch` varchar(30) DEFAULT NULL, - `qty` double NOT NULL DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, - KEY `ix_fk_product_stock` (`fk_product_stock`) +CREATE TABLE IF NOT EXISTS llx_product_batch ( + rowid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, + tms timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_product_stock int(11) NOT NULL, + eatby datetime DEFAULT NULL, + sellby datetime DEFAULT NULL, + batch varchar(30) DEFAULT NULL, + qty double NOT NULL DEFAULT '0', + import_key varchar(14) DEFAULT NULL, + KEY ix_fk_product_stock (fk_product_stock) ) ENGINE=InnoDB; -CREATE TABLE IF NOT EXISTS `llx_expeditiondet_batch` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, - `fk_expeditiondet` int(11) NOT NULL, - `eatby` date DEFAULT NULL, - `sellby` date DEFAULT NULL, - `batch` varchar(30) DEFAULT NULL, - `qty` double NOT NULL DEFAULT '0', - `fk_origin_stock` int(11) NOT NULL, - KEY `ix_fk_expeditiondet` (`fk_expeditiondet`) +CREATE TABLE IF NOT EXISTS llx_expeditiondet_batch ( + rowid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, + fk_expeditiondet int(11) NOT NULL, + eatby date DEFAULT NULL, + sellby date DEFAULT NULL, + batch varchar(30) DEFAULT NULL, + qty double NOT NULL DEFAULT '0', + fk_origin_stock int(11) NOT NULL, + KEY ix_fk_expeditiondet (fk_expeditiondet) ) ENGINE=InnoDB; --Salary payment in tax module -CREATE TABLE IF NOT EXISTS `llx_payment_salary` ( - `rowid` integer AUTO_INCREMENT PRIMARY KEY, - `tms` timestamp, - `fk_user` integer NOT NULL, - `datep` date, - `datev` date, - `amount` real NOT NULL DEFAULT 0, - `label` varchar(255), - `datesp` date, -- date de début de la période - `dateep` date, -- date de fin de la période - `entity` integer DEFAULT 1 NOT NULL, -- multi company id - `note` text, - `fk_bank` integer, - `fk_user_creat` integer, - `fk_user_modif` integer +CREATE TABLE IF NOT EXISTS llx_payment_salary ( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_user integer NOT NULL, + datep date, + datev date, + amount real NOT NULL DEFAULT 0, + label varchar(255), + datesp date, -- date de début de la période + dateep date, -- date de fin de la période + entity integer DEFAULT 1 NOT NULL, -- multi company id + note text, + fk_bank integer, + fk_user_creat integer, + fk_user_modif integer )ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 1332ce5e6eb5c39b9189fa5cf024984c7249af77..14e47fe7fe680d4a80398d82d15cc196e07357b6 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -43,21 +43,21 @@ create table llx_product price_min double(24,8) DEFAULT 0, price_min_ttc double(24,8) DEFAULT 0, price_base_type varchar(3) DEFAULT 'HT', - tva_tx double(6,3), - recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT + tva_tx double(6,3), -- Default VAT rate of product + recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT localtax1_tx double(6,3) DEFAULT 0, -- Spanish local VAT 1 localtax2_tx double(6,3) DEFAULT 0, -- Spanish local VAT 2 fk_user_author integer, - tosell tinyint DEFAULT 1, - tobuy tinyint DEFAULT 1, - tobatch tinyint DEFAULT 0 NOT NULL, - fk_product_type integer DEFAULT 0, -- Type 0 for regular product, 1 for service, 9 for other (used by external module) + tosell tinyint DEFAULT 1, -- Product you sell + tobuy tinyint DEFAULT 1, -- Product you buy + tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch or eat-by management + fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module) duration varchar(6), seuil_stock_alerte integer DEFAULT 0, barcode varchar(255) DEFAULT NULL, fk_barcode_type integer DEFAULT 0, - accountancy_code_sell varchar(15), -- Selling accountancy code - accountancy_code_buy varchar(15), -- Buying accountancy code + accountancy_code_sell varchar(15), -- Selling accountancy code + accountancy_code_buy varchar(15), -- Buying accountancy code partnumber varchar(32), -- Not used. Used by external modules. weight float DEFAULT NULL, weight_units tinyint DEFAULT NULL, @@ -71,7 +71,7 @@ create table llx_product pmp double(24,8) DEFAULT 0 NOT NULL, canvas varchar(32) DEFAULT NULL, finished tinyint DEFAULT NULL, - hidden tinyint DEFAULT 0, -- Need permission see also hidden products + hidden tinyint DEFAULT 0, -- Not used. Deprecated. import_key varchar(14), -- Import key desiredstock integer DEFAULT 0 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 2bd8523b27856a8134d995f6ece47af91b128135..a2d6a32264c9b6e8dc426bcaf5a56ab67d456e47 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -64,5 +64,7 @@ create table llx_user photo varchar(255), -- filename or url of photo lang varchar(6), color varchar(6), + barcode varchar(255) DEFAULT NULL, + fk_barcode_type integer DEFAULT 0, accountancy_code varchar(24) NULL )ENGINE=innodb;