From 939d5cc3225c9f516bf9c5ae9281ba9052ec18bc Mon Sep 17 00:00:00 2001 From: x Date: Tue, 18 Apr 2023 10:26:51 +0200 Subject: [PATCH 1/3] Add fk_default_workstation on bom line and mrp production --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_bom_bomline.sql | 3 ++- htdocs/install/mysql/tables/llx_mrp_production.sql | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index c4735898126..cf71f0a02e4 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -394,3 +394,6 @@ ALTER TABLE llx_c_email_templates add COLUMN defaultfortype smallint DEFAULT 0; ALTER TABLE llx_mailing ADD COLUMN fk_user_modif integer AFTER fk_user_creat; ALTER TABLE llx_mailing ADD COLUMN evenunsubscribe smallint DEFAULT 0; ALTER TABLE llx_mailing ADD COLUMN name_from varchar(128) AFTER email_from; + +ALTER TABLE llx_bom_bomline ADD COLUMN fk_default_workstation integer DEFAULT NULL; +ALTER TABLE llx_mrp_production ADD COLUMN fk_default_workstation integer DEFAULT NULL; diff --git a/htdocs/install/mysql/tables/llx_bom_bomline.sql b/htdocs/install/mysql/tables/llx_bom_bomline.sql index eae1f6c6662..27f22e5c07e 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline.sql @@ -26,6 +26,7 @@ CREATE TABLE llx_bom_bomline( disable_stock_change smallint DEFAULT 0, efficiency double(24,8) NOT NULL DEFAULT 1, fk_unit integer NULL, - position integer NOT NULL DEFAULT 0 + position integer NOT NULL DEFAULT 0, + fk_default_workstation integer DEFAULT NULL -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mrp_production.sql b/htdocs/install/mysql/tables/llx_mrp_production.sql index a76e1f655ae..eac6bb1969b 100644 --- a/htdocs/install/mysql/tables/llx_mrp_production.sql +++ b/htdocs/install/mysql/tables/llx_mrp_production.sql @@ -33,6 +33,7 @@ CREATE TABLE llx_mrp_production( tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, - import_key varchar(14) + import_key varchar(14), + fk_default_workstation integer DEFAULT NULL ) ENGINE=innodb; From 5ce5559ee53641d2d7f5cf66c953be78a43e20d7 Mon Sep 17 00:00:00 2001 From: x Date: Tue, 18 Apr 2023 11:01:57 +0200 Subject: [PATCH 2/3] Add field on class "fk_default_workstation" --- htdocs/bom/class/bom.class.php | 6 ++++++ htdocs/mrp/class/mo.class.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 43a40705660..e10139f3711 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1732,6 +1732,12 @@ class BOMLine extends CommonObjectLine */ public $childBom = array(); + /* + * Service Workstation + */ + public $fk_default_workstation; + + /** * Constructor diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 100043ef055..d170230e0f7 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1744,6 +1744,11 @@ class MoLine extends CommonObjectLine public $import_key; public $fk_parent_line; + /* + * Service Workstation + */ + public $fk_default_workstation; + /** * Constructor * From c2fe891ed6a4f6a530aa49dde7b1ac6e98cb8a3c Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 18 Apr 2023 09:06:26 +0000 Subject: [PATCH 3/3] Fixing style errors. --- htdocs/mrp/class/mo.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index d170230e0f7..f7587daf331 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1744,10 +1744,10 @@ class MoLine extends CommonObjectLine public $import_key; public $fk_parent_line; - /* + /* * Service Workstation */ - public $fk_default_workstation; + public $fk_default_workstation; /** * Constructor