From 0d534f0c37063feb8ec45a60bfff9f695ee6535a Mon Sep 17 00:00:00 2001 From: ksar <35605507+ksar-ksar@users.noreply.github.com> Date: Wed, 2 Feb 2022 10:56:32 +0100 Subject: [PATCH 1/5] FIX #19974 : llx_onlinesignature.sql allready exist FIX #19974 : llx_onlinesignature.sql allready exist --- .../mysql/tables/llx_online_signatures.sql | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 htdocs/install/mysql/tables/llx_online_signatures.sql diff --git a/htdocs/install/mysql/tables/llx_online_signatures.sql b/htdocs/install/mysql/tables/llx_online_signatures.sql deleted file mode 100644 index fbba814dd4d..00000000000 --- a/htdocs/install/mysql/tables/llx_online_signatures.sql +++ /dev/null @@ -1,29 +0,0 @@ --- ============================================================================ --- Copyright (C) 2017 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 --- the Free Software Foundation; either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see . --- ============================================================================ - -create table llx_onlinesignature -( - rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, - object_type varchar(32) NOT NULL, - object_id integer NOT NULL, - datec datetime NOT NULL, - tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - name varchar(255) NOT NULL, - ip varchar(128), - pathoffile varchar(255) -)ENGINE=innodb; From 95833135f4b19805206d7a7d5c97f86bcc35601c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Feb 2022 10:44:19 +0100 Subject: [PATCH 2/5] FIX #19974 --- htdocs/install/mysql/data/llx_c_tva.sql | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index cae269783e4..1a14967357f 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -192,7 +192,7 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (14 -- MALI (id country=147) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1471, 147, '0','0','VAT rate 0', 1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1471, 147, '18','0','VAT rate - standard', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1472, 147, '18','0','VAT rate - standard', 1); -- MONACO (id country=27) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27, '0','0','VAT rate 0 ou non applicable',1); @@ -379,10 +379,6 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 4 INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 462, 46, '15','0','VAT 15%',1); INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES ( 463, 46, '7.5','0','VAT 7.5%',1); --- SOUTH AFRICA (id country=205) -INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2051,205, '0','0','No VAT',1); -INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (2052,205, '14','0','VAT 14%',1); - -- VENEZUELA (id country=232) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2321,232, '0','0','No VAT',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1); From 15dca77330e3412e7fb445a20f3aecbf32c84eac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Feb 2022 11:00:16 +0100 Subject: [PATCH 3/5] Fix filter on search_categ --- htdocs/product/reassort.php | 8 ++++---- htdocs/product/reassortlot.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index c327b24e8f0..a711c630414 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -146,11 +146,11 @@ if (!empty($conf->global->PRODUCT_USE_UNITS)) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid'; } // We'll need this table joined to the select in order to filter by categ -if ($search_categ) { +if ($search_categ > 0) { $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; } $sql .= " WHERE p.entity IN (".getEntity('product').")"; -if ($search_categ) { +if ($search_categ > 0) { $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ } if ($sall) { @@ -267,7 +267,7 @@ if ($resql) { if ($search_sale) { $param .= "&search_sale=".urlencode($search_sale); } - if ($search_categ) { + if ($search_categ > 0) { $param .= "&search_categ=".urlencode($search_categ); } if ($toolowstock) { @@ -344,7 +344,7 @@ if ($resql) { if ($toolowstock) { $param .= "&toolowstock=".urlencode($toolowstock); } - if ($search_categ) { + if ($search_categ > 0) { $param .= "&search_categ=".urlencode($search_categ); } diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 65e69b91384..21bca9c4aa8 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -135,11 +135,11 @@ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot as e on ps.fk_entrepot = e.rowid' $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_batch as pb on pb.fk_product_stock = ps.rowid'; // Detail for each lot on each warehouse $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl on pl.fk_product = p.rowid AND pl.batch = pb.batch'; // Link on unique key // We'll need this table joined to the select in order to filter by categ -if ($search_categ) { +if ($search_categ > 0) { $sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp"; } $sql .= " WHERE p.entity IN (".getEntity('product').")"; -if ($search_categ) { +if ($search_categ > 0) { $sql .= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ } if ($sall) { @@ -178,7 +178,7 @@ if ($fourn_id > 0) { $sql .= " AND p.rowid = pf.fk_product AND pf.fk_soc = ".((int) $fourn_id); } // Insert categ filter -if ($search_categ) { +if ($search_categ > 0) { $sql .= " AND cp.fk_categorie = ".((int) $search_categ); } if ($search_warehouse) { @@ -277,7 +277,7 @@ if ($resql) { if ($search_sale) { $param .= "&search_sale=".urlencode($search_sale); } - if ($search_categ) { + if ($search_categ > 0) { $param .= "&search_categ=".urlencode($search_categ); } /*if ($eatby) $param.="&eatby=".$eatby; From d09303d27c2374f496a289f65a86ad860221adc2 Mon Sep 17 00:00:00 2001 From: El-dge Date: Fri, 4 Feb 2022 12:31:40 +0100 Subject: [PATCH 4/5] Issue on stock virtuel : fix Dolibarr/dolibarr#18634 --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1e60a0f63d3..f69016d1576 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5026,7 +5026,7 @@ class Product extends CommonObject if ($result < 0) dol_print_error($this->db, $this->error); $stock_commande_fournisseur = $this->stats_commande_fournisseur['qty']; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && !empty($conf->reception->enabled)) { $filterStatus = '4'; if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus; From 3f87db08d4addbae2b1e9193e60417a7b6c21698 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Feb 2022 12:55:31 +0100 Subject: [PATCH 5/5] Update product.class.php --- htdocs/product/class/product.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index f69016d1576..ce7a5858a6a 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5026,16 +5026,18 @@ class Product extends CommonObject if ($result < 0) dol_print_error($this->db, $this->error); $stock_commande_fournisseur = $this->stats_commande_fournisseur['qty']; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && !empty($conf->reception->enabled)) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) { + // Case module reception is not used $filterStatus = '4'; if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus; $result = $this->load_stats_reception(0, $filterStatus, 1); if ($result < 0) dol_print_error($this->db, $this->error); $stock_reception_fournisseur = $this->stats_reception['qty']; } - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && !empty($conf->reception->enabled)) { + // Case module reception is used $filterStatus = '4'; if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus; $result = $this->load_stats_reception(0, $filterStatus, 1); // Use same tables than when module reception is not used.