From 8bd6f070aab2fd5efe01c4ce78fd274ee8002ac5 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 9 Feb 2023 17:22:45 +0100 Subject: [PATCH 1/3] FIX: product ref fourn same size in supplier order/invoice as in product price fourn --- htdocs/install/mysql/migration/14.0.0-15.0.0.sql | 3 +++ htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql | 2 +- htdocs/install/mysql/tables/llx_facture_fourn_det.sql | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql index 5621ca6fad8..bef7621d282 100644 --- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql +++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql @@ -530,3 +530,6 @@ ALTER TABLE llx_element_tag ADD CONSTRAINT fk_element_tag_categorie_rowid FOREIG -- Idea is to update this column manually in v15 with value in currency of company for bank that are not into the main currency and the transfer -- into accounting will use it in priority if value is not null. The script repair.sql contains the sequence to fix datas in llx_bank. ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL; + +ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN ref varchar(128); +ALTER TABLE llx_facture_fourn_det MODIFY COLUMN ref varchar(128); diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql index f6092bc4c74..0dfed7152aa 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql @@ -25,7 +25,7 @@ create table llx_commande_fournisseurdet fk_commande integer NOT NULL, fk_parent_line integer NULL, fk_product integer, - ref varchar(50), -- supplier product ref + ref varchar(128), -- supplier product ref label varchar(255), -- product label description text, vat_src_code varchar(10) DEFAULT '', -- Vat code used as source of vat fields. Not strict foreign key here. diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql index 30f57fa184b..8daf658fa68 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql @@ -24,7 +24,7 @@ create table llx_facture_fourn_det fk_facture_fourn integer NOT NULL, fk_parent_line integer NULL, fk_product integer NULL, - ref varchar(50), -- supplier product ref + ref varchar(128), -- supplier product ref label varchar(255), -- product label description text, pu_ht double(24,8), -- unit price excluding tax From 802ee770c3cac69d7efdb792d23b28d59b95ce70 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 9 Feb 2023 19:24:16 +0100 Subject: [PATCH 2/3] FIX #23860 --- htdocs/compta/facture/card.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 90f45018489..69155ecd8c7 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2981,7 +2981,11 @@ if ($action == 'create') { } // when bank account is empty (means not override by payment mode form a other object, like third-party), try to use default value - $fk_account = GETPOSTISSET("fk_account") ? GETPOST("fk_account", 'int') : $fk_account; + if ($socid > 0 && $fk_account) { // A company has already been set and it has a default fk_account + $fk_account = GETPOSTISSET('fk_account') ? GETPOST("fk_account", 'int') : $fk_account; // The GETPOST is used only if form was posted to avoid to take default value, because in such case, the default must be the one of the company + } else { // No company forced + $fk_account = GETPOST("fk_account", 'int'); + } if (!empty($soc->id)) { $absolute_discount = $soc->getAvailableDiscounts(); From 1bc16f47c0633332e9a855bcc499b4b73d5ceb39 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 10 Feb 2023 15:00:27 +0100 Subject: [PATCH 3/3] FIX : Missing right to edit service note when module product is disabled --- htdocs/product/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/note.php b/htdocs/product/note.php index b758f414035..52d912933eb 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -49,7 +49,7 @@ if ($id > 0 || !empty($ref)) { $object->fetch($id, $ref); } -$permissionnote = $user->rights->produit->creer; // Used by the include of actions_setnotes.inc.php +$permissionnote = ($user->rights->produit->creer || $user->rights->service->creer); // Used by the include of actions_setnotes.inc.php if ($object->id > 0) { if ($object->type == $object::TYPE_PRODUCT) {