From d508d44fef2751c0cb9439c91be7df3e3ca24091 Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 20 Sep 2016 12:10:25 +0200 Subject: [PATCH] NEW : migration script from 4.0.0 to 5.0.0 and langs --- htdocs/install/mysql/migration/4.0.0-5.0.0.sql | 13 ++++++++++--- htdocs/langs/en_US/stocks.lang | 1 + htdocs/product/stock/product.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index ef7189a3fa0..3c1928f3766 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -97,6 +97,13 @@ ALTER TABLE llx_product_lot_extrafields ADD INDEX idx_product_lot_extrafields (f ALTER TABLE llx_website_page MODIFY content MEDIUMTEXT; - - - +create table llx_product_stock_entrepot +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_product integer NOT NULL, + fk_entrepot integer NOT NULL, + seuil_stock_alerte int(11) DEFAULT '0', + desiredstock int(11) DEFAULT '0', + import_key varchar(14) -- Import key +)ENGINE=innodb; diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 1d63d4ddeb9..39f6e70aba6 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -139,4 +139,5 @@ UseDispatchStatus=Use dispatch status (aprouve/refuse) OptionMULTIPRICESIsOn=Option "several prices per segment" is on. It means a product has several selling price so value for sell can't be calculated ProductStockWarehouseCreated=Stock limit for alert and desired optimal stock correctly created ProductStockWarehouseUpdated=Stock limit for alert and desired optimal stock correctly updated +ProductStockWarehouseDeleted=Stock limit for alert and desired optimal stock correctly deleted AddNewProductStockWarehouse=Set new limit for alert and desired optimal stock \ No newline at end of file diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 22af0745357..8ef8e2bc486 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -149,7 +149,7 @@ if($action == 'delete_productstockwarehouse') $pse = new ProductStockEntrepot($db); $pse->fetch(GETPOST('fk_productstockwarehouse')); - $pse->delete($user); + if($pse->delete($user) > 0) setEventMessage($langs->trans('ProductStockWarehouseDeleted')); $action = '';