diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index 130ff59791c..add82b52ee3 100755 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -170,8 +170,10 @@ create table llx_bank_account_extrafields ALTER TABLE llx_stock_mouvement MODIFY COLUMN label varchar(255); +ALTER TABLE llx_stock_mouvement MODIFY COLUMN price double(24,8) DEFAULT 0; ALTER TABLE llx_stock_mouvement ADD COLUMN inventorycode varchar(128); + ALTER TABLE llx_product_association ADD COLUMN incdec integer DEFAULT 1; diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.sql index a367c6952c5..3db9a4475cd 100644 --- a/htdocs/install/mysql/tables/llx_stock_mouvement.sql +++ b/htdocs/install/mysql/tables/llx_stock_mouvement.sql @@ -1,6 +1,6 @@ -- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2009 Laurent Destailleur +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2009-2015 Laurent Destailleur -- -- 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 @@ -21,18 +21,18 @@ create table llx_stock_mouvement ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, - datem datetime, - fk_product integer NOT NULL, - batch varchar(30) DEFAULT NULL, - eatby date DEFAULT NULL, - sellby date DEFAULT NULL, - fk_entrepot integer NOT NULL, - value real, - price float(13,4) DEFAULT 0, - type_mouvement smallint, - fk_user_author integer, - label varchar(255), -- comment on movement - inventorycode varchar(128), -- code used to group different movement line into one operation (may be an inventory, a mass picking) + datem datetime, -- Date and hour of movement + fk_product integer NOT NULL, -- Id of product + batch varchar(30) DEFAULT NULL, -- Lot or serial number + eatby date DEFAULT NULL, -- Eatby date + sellby date DEFAULT NULL, -- Sellby date + fk_entrepot integer NOT NULL, -- Id warehouse + value real, -- Qty of movement + price double(24,8) DEFAULT 0, -- Entry price (used to calculate PMP, FIFO or LIFO value) + type_mouvement smallint, -- Type/Direction of movement + fk_user_author integer, -- Id user making movement + label varchar(255), -- Comment on movement + inventorycode varchar(128), -- Code used to group different movement line into one operation (may be an inventory, a mass picking) fk_origin integer, origintype varchar(32) )ENGINE=innodb;