From 7fc2b2e8b1f252d2ec624d1cb2e7828ac324e57d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 10 Apr 2023 22:30:16 +0200 Subject: [PATCH 1/6] Fix error on call function print_liste_field_titre --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 3362755d962..007d4f232cc 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1510,7 +1510,7 @@ if (!empty($arrayfields['s.import_key']['checked'])) { } // Action column if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { - print_liste_field_titre(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch actioncolumn '); + print_liste_field_titre(($mode != 'kanban' ? $selectedfields : ''), $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch actioncolumn '); $totalarray['nbfield']++; // For the column action } print ''."\n"; From 5c54d5d279abb46808992bc70adbdf6a29470d17 Mon Sep 17 00:00:00 2001 From: jyhere Date: Thu, 13 Apr 2023 16:55:00 +0200 Subject: [PATCH 2/6] FIX check on wrong variable, some unnecessary code removed --- htdocs/product/class/productcustomerprice.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 6a6fe72a08a..39adc8cd598 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -871,7 +871,7 @@ class Productcustomerprice extends CommonObject $prodsocpriceupd->recuperableonly = $this->recuperableonly; $resultupd = $prodsocpriceupd->update($user, 0, $forceupdateaffiliate); - if ($result < 0) { + if ($resultupd < 0) { $error++; $this->error = $prodsocpriceupd->error; } @@ -889,7 +889,7 @@ class Productcustomerprice extends CommonObject $prodsocpricenew->recuperableonly = $this->recuperableonly; $resultupd = $prodsocpricenew->create($user, 0, $forceupdateaffiliate); - if ($result < 0) { + if ($resultupd < 0) { $error++; $this->error = $prodsocpricenew->error; } @@ -923,7 +923,7 @@ class Productcustomerprice extends CommonObject $this->db->begin(); - if (!$error && !$notrigger) { + if (!$notrigger) { $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user); if ($result < 0) { $error++; From 939d5cc3225c9f516bf9c5ae9281ba9052ec18bc Mon Sep 17 00:00:00 2001 From: x Date: Tue, 18 Apr 2023 10:26:51 +0200 Subject: [PATCH 3/6] 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 4/6] 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 5/6] 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 From 25850a7e0a06b0124672ce89e3932d17039d92aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 18 Apr 2023 20:59:43 +0200 Subject: [PATCH 6/6] typo --- htdocs/mrp/class/api_mos.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/mrp/class/api_mos.class.php b/htdocs/mrp/class/api_mos.class.php index 2312f4bd636..594cd0e1ac4 100644 --- a/htdocs/mrp/class/api_mos.class.php +++ b/htdocs/mrp/class/api_mos.class.php @@ -345,10 +345,10 @@ class Mos extends DolibarrApi } if (empty($labelmovement)) { - throw new RestException(500, "Field inventorylabel not prodivded"); + throw new RestException(500, "Field inventorylabel not provided"); } if (empty($codemovement)) { - throw new RestException(500, "Field inventorycode not prodivded"); + throw new RestException(500, "Field inventorycode not provided"); } // Code for consume and produce...