New: Add barcode fields into user database.

This commit is contained in:
Laurent Destailleur 2014-03-13 09:11:14 +01:00
parent 07ac9d3922
commit 3c842f9b6f
4 changed files with 49 additions and 44 deletions

View File

@ -31,6 +31,7 @@ For users:
- New: Created {line_price_ht_locale}, {line_price_vat_locale} and {line_price_ttc_locale} ODT tags. - 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: 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: Status "validated" for project are renamed into "opened".
- New: Add barcode fields into user database.
- Fix: Project Task numbering customs rule works. - Fix: Project Task numbering customs rule works.
TODO TODO

View File

@ -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_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_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 create table llx_product_customer_price_log
( (
rowid integer AUTO_INCREMENT PRIMARY KEY, 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, datec datetime,
fk_product integer NOT NULL, fk_product integer NOT NULL,
fk_soc integer NOT NULL, fk_soc integer NOT NULL,
@ -1015,43 +1017,43 @@ create table llx_product_customer_price_log
--Batch number managment --Batch number managment
ALTER TABLE llx_product ADD COLUMN tobatch tinyint DEFAULT 0 NOT NULL; ALTER TABLE llx_product ADD COLUMN tobatch tinyint DEFAULT 0 NOT NULL;
CREATE TABLE IF NOT EXISTS `llx_product_batch` ( CREATE TABLE IF NOT EXISTS llx_product_batch (
`rowid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, rowid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, tms timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`fk_product_stock` int(11) NOT NULL, fk_product_stock int(11) NOT NULL,
`eatby` datetime DEFAULT NULL, eatby datetime DEFAULT NULL,
`sellby` datetime DEFAULT NULL, sellby datetime DEFAULT NULL,
`batch` varchar(30) DEFAULT NULL, batch varchar(30) DEFAULT NULL,
`qty` double NOT NULL DEFAULT '0', qty double NOT NULL DEFAULT '0',
`import_key` varchar(14) DEFAULT NULL, import_key varchar(14) DEFAULT NULL,
KEY `ix_fk_product_stock` (`fk_product_stock`) KEY ix_fk_product_stock (fk_product_stock)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS `llx_expeditiondet_batch` ( CREATE TABLE IF NOT EXISTS llx_expeditiondet_batch (
`rowid` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, rowid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`fk_expeditiondet` int(11) NOT NULL, fk_expeditiondet int(11) NOT NULL,
`eatby` date DEFAULT NULL, eatby date DEFAULT NULL,
`sellby` date DEFAULT NULL, sellby date DEFAULT NULL,
`batch` varchar(30) DEFAULT NULL, batch varchar(30) DEFAULT NULL,
`qty` double NOT NULL DEFAULT '0', qty double NOT NULL DEFAULT '0',
`fk_origin_stock` int(11) NOT NULL, fk_origin_stock int(11) NOT NULL,
KEY `ix_fk_expeditiondet` (`fk_expeditiondet`) KEY ix_fk_expeditiondet (fk_expeditiondet)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
--Salary payment in tax module --Salary payment in tax module
CREATE TABLE IF NOT EXISTS `llx_payment_salary` ( CREATE TABLE IF NOT EXISTS llx_payment_salary (
`rowid` integer AUTO_INCREMENT PRIMARY KEY, rowid integer AUTO_INCREMENT PRIMARY KEY,
`tms` timestamp, tms timestamp,
`fk_user` integer NOT NULL, fk_user integer NOT NULL,
`datep` date, datep date,
`datev` date, datev date,
`amount` real NOT NULL DEFAULT 0, amount real NOT NULL DEFAULT 0,
`label` varchar(255), label varchar(255),
`datesp` date, -- date de début de la période datesp date, -- date de début de la période
`dateep` date, -- date de fin de la période dateep date, -- date de fin de la période
`entity` integer DEFAULT 1 NOT NULL, -- multi company id entity integer DEFAULT 1 NOT NULL, -- multi company id
`note` text, note text,
`fk_bank` integer, fk_bank integer,
`fk_user_creat` integer, fk_user_creat integer,
`fk_user_modif` integer fk_user_modif integer
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -43,21 +43,21 @@ create table llx_product
price_min double(24,8) DEFAULT 0, price_min double(24,8) DEFAULT 0,
price_min_ttc double(24,8) DEFAULT 0, price_min_ttc double(24,8) DEFAULT 0,
price_base_type varchar(3) DEFAULT 'HT', price_base_type varchar(3) DEFAULT 'HT',
tva_tx double(6,3), tva_tx double(6,3), -- Default VAT rate of product
recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT recuperableonly integer NOT NULL DEFAULT '0', -- French NPR VAT
localtax1_tx double(6,3) DEFAULT 0, -- Spanish local VAT 1 localtax1_tx double(6,3) DEFAULT 0, -- Spanish local VAT 1
localtax2_tx double(6,3) DEFAULT 0, -- Spanish local VAT 2 localtax2_tx double(6,3) DEFAULT 0, -- Spanish local VAT 2
fk_user_author integer, fk_user_author integer,
tosell tinyint DEFAULT 1, tosell tinyint DEFAULT 1, -- Product you sell
tobuy tinyint DEFAULT 1, tobuy tinyint DEFAULT 1, -- Product you buy
tobatch tinyint DEFAULT 0 NOT NULL, 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 0 for regular product, 1 for service, 9 for other (used by external module) 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), duration varchar(6),
seuil_stock_alerte integer DEFAULT 0, seuil_stock_alerte integer DEFAULT 0,
barcode varchar(255) DEFAULT NULL, barcode varchar(255) DEFAULT NULL,
fk_barcode_type integer DEFAULT 0, fk_barcode_type integer DEFAULT 0,
accountancy_code_sell varchar(15), -- Selling accountancy code accountancy_code_sell varchar(15), -- Selling accountancy code
accountancy_code_buy varchar(15), -- Buying accountancy code accountancy_code_buy varchar(15), -- Buying accountancy code
partnumber varchar(32), -- Not used. Used by external modules. partnumber varchar(32), -- Not used. Used by external modules.
weight float DEFAULT NULL, weight float DEFAULT NULL,
weight_units tinyint DEFAULT NULL, weight_units tinyint DEFAULT NULL,
@ -71,7 +71,7 @@ create table llx_product
pmp double(24,8) DEFAULT 0 NOT NULL, pmp double(24,8) DEFAULT 0 NOT NULL,
canvas varchar(32) DEFAULT NULL, canvas varchar(32) DEFAULT NULL,
finished tinyint 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 import_key varchar(14), -- Import key
desiredstock integer DEFAULT 0 desiredstock integer DEFAULT 0
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -64,5 +64,7 @@ create table llx_user
photo varchar(255), -- filename or url of photo photo varchar(255), -- filename or url of photo
lang varchar(6), lang varchar(6),
color varchar(6), color varchar(6),
barcode varchar(255) DEFAULT NULL,
fk_barcode_type integer DEFAULT 0,
accountancy_code varchar(24) NULL accountancy_code varchar(24) NULL
)ENGINE=innodb; )ENGINE=innodb;