From c278f65591f8564e6519c8e9e95503ff639c1ea5 Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Fri, 12 Jun 2026 23:48:03 +0200 Subject: [PATCH 1/9] FIX set SOCIETE_FISCAL_MONTH_START default to 1 (#37662) (#38162) --- htdocs/core/modules/modSociete.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index ee1f36810b8..eb7b9952ba3 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -94,7 +94,7 @@ class modSociete extends DolibarrModules $this->const[$r][0] = "SOCIETE_FISCAL_MONTH_START"; $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "0"; + $this->const[$r][2] = "1"; $this->const[$r][3] = "Enter the month number of the first month of the fiscal year, e. g. 9 for September"; $this->const[$r][4] = 0; $r++; From db6314ce9b5b4e7a50ecbecb54dcc0a93fe26e2a Mon Sep 17 00:00:00 2001 From: Eric - CAP-REL <1468823+rycks@users.noreply.github.com> Date: Fri, 12 Jun 2026 23:57:34 +0200 Subject: [PATCH 2/9] =?UTF-8?q?remove=20suppliers=20from=20list=20as=20fic?= =?UTF-8?q?hinter=20is=20displayed=20only=20on=20customer=E2=80=A6=20(#386?= =?UTF-8?q?57)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove suppliers from list as fichinter is displayed only on customer/prospect card * add client = 2 as accepted values * QUAL: switch to constants --- htdocs/fichinter/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 261b5e4ffaa..da5b55860b1 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1063,7 +1063,9 @@ if ($action == 'create') { } print ''; print ''; print '
'.$langs->trans("ThirdParty").''; - print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); + $filter = '((s.client:IN:'.Societe::CUSTOMER.', '.Societe::PROSPECT.', '.Societe::CUSTOMER_AND_PROSPECT.') AND (s.status:=:1))'; + + print $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); print ' '; print '
'; From b302dfea2ebbdc15d98bbf7654f5fd7920bad6dc Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Mon, 15 Jun 2026 11:25:24 +0200 Subject: [PATCH 3/9] fix very old llx_adherent migration bug from 3.6-3.7 --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) 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 d17370ce0cc..e7522f6352b 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 @@ -721,3 +721,6 @@ ALTER TABLE llx_user CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP O ALTER TABLE llx_salary_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- 15.0 -> 16.0 rename llx_advtargetemailing to llx_mailing_advtarget ALTER TABLE llx_mailing_advtarget CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + +-- 3.6 -> 3.7 typo on llx_adherents ('end with s') and varchar is 128 +ALTER TABLE llx_adherent MODIFY COLUMN societe VARCHAR(128); From a2623d8fc5037e44ca6367933782a499751f2c15 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Mon, 15 Jun 2026 11:38:22 +0200 Subject: [PATCH 4/9] name llx_product_stock_entrepot is now llx_product_warehouse_properties --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 4 ++-- 1 file changed, 2 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 d17370ce0cc..ae11f0f0d49 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 @@ -489,7 +489,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut); -ALTER TABLE fk_product_price_product DROP FOREIGN KEY fk_product_price_product; +ALTER TABLE product_price_product DROP FOREIGN KEY fk_product_price_product; ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128); @@ -679,7 +679,7 @@ ALTER TABLE llx_product_lot_extrafields CHANGE COLUMN tms tms timestamp DEFAULT ALTER TABLE llx_product_lot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price_by_qty CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -ALTER TABLE llx_product_stock_entrepot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +ALTER TABLE llx_product_warehouse_properties CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_stock CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_projet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_projet CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; From 5556626a92add0694247e2e406417bfb26ff49c3 Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Tue, 16 Jun 2026 02:08:22 +0200 Subject: [PATCH 5/9] Fix #38781 allow editing dictionary entries with rowid = 0 (ST_NEVER) (#38842) --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 4f65c79b90f..6c3421cca2b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1792,7 +1792,7 @@ if ($id) { $obj = $db->fetch_object($resql); //print_r($obj); print ''; - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { + if ($action == 'edit' && ($rowid == (isset($obj->rowid) ? $obj->rowid : $obj->code))) { $tmpaction = 'edit'; $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -1804,7 +1804,7 @@ if ($id) { } print ''; - print '
'; + print '
'; print ''; print ''; if (!is_null($withentity)) { From 4978cccc3bc60c71fc64716cfecb3fc89e870342 Mon Sep 17 00:00:00 2001 From: ThomasNgr-OpenDSI Date: Thu, 18 Jun 2026 09:19:59 +0200 Subject: [PATCH 6/9] Fix #38781 allow editing dictionary entries with rowid = 0 (ST_NEVER) (#38841) --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 859ef271a85..9eab23d2835 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2046,7 +2046,7 @@ if ($id > 0) { print ''; } - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) { + if ($action == 'edit' && ($rowid == (isset($obj->rowid) ? $obj->rowid : $obj->code))) { $tmpaction = 'edit'; $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -2058,7 +2058,7 @@ if ($id > 0) { } print ''; - print '
'; + print '
'; print ''; print ''; if (!is_null($withentity)) { From 7338f2916ba0bd46054f1264d191f66475537577 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 18 Jun 2026 09:22:21 +0200 Subject: [PATCH 7/9] missing llx prefix --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ae11f0f0d49..df3a09f3858 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 @@ -489,7 +489,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut); -ALTER TABLE product_price_product DROP FOREIGN KEY fk_product_price_product; +ALTER TABLE llx_product_price_product DROP FOREIGN KEY fk_product_price_product; ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128); From 1145c38080ed311d9ef752d3b9d0b64b5f2c0ca7 Mon Sep 17 00:00:00 2001 From: Eric Seigne Date: Thu, 18 Jun 2026 09:29:12 +0200 Subject: [PATCH 8/9] fix table name thanks to lionel review --- htdocs/install/mysql/migration/17.0.0-18.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 df3a09f3858..1d4571f9b6b 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 @@ -489,7 +489,7 @@ ALTER TABLE llx_partnership ADD COLUMN email_partnership varchar(64) after fk_me ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_statut (statut); -ALTER TABLE llx_product_price_product DROP FOREIGN KEY fk_product_price_product; +ALTER TABLE llx_product_price DROP FOREIGN KEY fk_product_price_product; ALTER TABLE llx_societe_rib ADD COLUMN ext_payment_site varchar(128); From 2653b1707afe43ba53413e5b823afa84ea2fcc07 Mon Sep 17 00:00:00 2001 From: Pichinov-Jose Date: Thu, 18 Jun 2026 09:55:17 +0200 Subject: [PATCH 9/9] FIX Multicurrency amount columns were hidden on discount screens (wrong module test) (#38825) On the third party discount tabs (htdocs/comm/remx.php), the multicurrency amount columns (MulticurrencyAmountHT / MulticurrencyAmountTTC) and their colspan adjustments were guarded by isModEnabled('multicompany') instead of isModEnabled('multicurrency'). As a result the foreign currency amounts of available and consumed discounts/down payments were never shown when the Multicurrency module is enabled (and the Multi-company module disabled). The wrong test was introduced in commit 3bb1a2387b8 (2022, 'FIX php8 compatibility') which converted !empty($conf->multicurrency->enabled) into isModEnabled('multicompany'). Restore the correct module test. Present from v17 to develop; fixed here on the oldest maintained LTS branch (18.0). --- htdocs/comm/remx.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 48755203f1a..3c9c48722d2 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -458,12 +458,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("DiscountOfferedBy").''; @@ -513,12 +513,12 @@ if ($socid > 0) { print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -542,7 +542,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -602,12 +602,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("DiscountOfferedBy").''; @@ -652,12 +652,12 @@ if ($socid > 0) { } print ''.$langs->trans("NotConsumed").''; print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -681,7 +681,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -775,12 +775,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("Author").''; @@ -848,12 +848,12 @@ if ($socid > 0) { } print ''; print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -865,7 +865,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").''; @@ -936,12 +936,12 @@ if ($socid > 0) { print ''.$langs->trans("ReasonDiscount").''; print ''.$langs->trans("ConsumedBy").''; print ''.$langs->trans("AmountHT").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountHT").''; } print ''.$langs->trans("VATRate").''; print ''.$langs->trans("AmountTTC").''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.$langs->trans("MulticurrencyAmountTTC").''; } print ''.$langs->trans("Author").''; @@ -1009,12 +1009,12 @@ if ($socid > 0) { } print ''; print ''.price($obj->amount_ht).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ht).''; } print ''.vatrate($obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''), true).''; print ''.price($obj->amount_ttc).''; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { print ''.price($obj->multicurrency_amount_ttc).''; } print ''; @@ -1026,7 +1026,7 @@ if ($socid > 0) { } } else { $colspan = 8; - if (isModEnabled('multicompany')) { + if (isModEnabled('multicurrency')) { $colspan += 2; } print ''.$langs->trans("None").'';