From c263fccb5f8bedd828ef2fd34b64b51fb8812c06 Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Thu, 19 Jun 2025 14:58:38 +0200 Subject: [PATCH 1/8] Prepare 18.0.7 (#34575) * Prepare 18.0.7 * Changelog for 18.0.7 LTS --- ChangeLog | 68 +++++++++++++++++++++++++++++++++++++++++ htdocs/filefunc.inc.php | 4 +-- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a222f2206ba..15cf54b593d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,74 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 18.0.7 compared to 18.0.6 ***** +138 files changed, 1622 insertions(+), 530 deletions(-) + +FIX: 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request +FIX: 17.0 API endpoints "PUT": prevent overwriting all extrafields if only some are supplied in the request cf. PR #29237 +FIX: 17.0 - collisions in cache for dol_getIdFromCode +FIX: 17.0 - missing error handling for FactureRec::fetch in card-rec.php +FIX: 17.0: warnings due to uninitialized variables + delete code that doesn't apply to recurring invoices (AFAIK, there is no recurring credit note feature) +FIX: #21294 Stock import sql query +FIX: #26250 fatal error on kit +FIX: #32339 Delete a loan settlement is partial +FIX: #33038 drag and drop files are not prefixed with object reference +FIX: #33117 accountancy export Quadratus when doc ref is less than 10 char +FIX: #33145 wrong label status buy on prodcut tooltip +FIX: #33145 wrong label status buy on product tooltip +FIX: accountancy export Quadratus when doc ref is less than 10 char +FIX: bad dispatched quantities for batches on shipment card +FIX: bank payment rejection on SEPA (backport commit 100a657) (#33838) +FIX: calculate start date of cloned task from cloned project (#31799) +FIX: can not delete files in task card +FIX: close all services on contract will close all lines (#33466) +FIX: compatibility with multicompany +FIX: constant PAYMENTBYBANKTRANSFER_ADDDAYS was never saved (#33799) +FIX: Count on supplier invoice list does not match count in DB (#33351) +FIX: #CVE-2024-34051 +FIX: delete supplier order line when linked to customer order line +FIX: delete supplier order when at least one line linked to customer order line +FIX: display error when loan can't be deleted +FIX: display full tree on shipment card when a kit contains a same component in other sub-kit +FIX: Fix case when the value of a extrafields of the type 'boolean', 'select' or other have an option with a value equal to '0'. +FIX: Fix return value of hook sendMail when hook return -1 who must be return false in sendfile() function +FIX: GETPOST('private_message') +FIX: in projet/element.php total_time is always back to 0 +FIX: invoice creation : use dol_include_once instead of require_once to allow external modules +FIX: invoice creation : use dol_include_once instead of require_once to allow external modules. +FIX: issue #28222 Edit date extrafield displayed on all on lines (#31914) +FIX: Many status on invoice linked object block +FIX: Multilangs : PDF lines description +FIX: ODT substitution when many HTML tags in string +FIX: old copy not needed in supplier order create method (#31733) +FIX: PAIEMENT Wrong field displayed for DateChequeReceived (#33390) +FIX: phpcs +FIX: product variants copy: also copy multiprice variations +FIX: qual +FIX: removes traces of << (#31983) +FIX: Show true error when send notify email at validate expense report +FIX: status ticket update for new message +FIX: swiftmailer: correctly set errors-to header (#31826) +FIX: TakePos barcode rule (#31857) +FIX: There were many status indicator in the invoice linked object block (propal card) +FIX(ticket): Notification email without public interface +FIX: Update on a sold line of bank entries set the type to empty, now it's fixed #22539 (#31888) +FIX: update status on create supplier order for trigger (#31642) +FIX: use tax with code on supplier order line give tax code missing in supplier invoice (#32018) +FIX: use vat with code on supplier order result code missing in supplier invoice +FIX: warehouse list: broken status filter (#33667) +FIX: warnings (#33423) +FIX: wrong left margin (v18 to develop ?) +FIX: wrong message on update shipment +FIX: wrong update function parameter + + ***** ChangeLog for 18.0.6 compared to 18.0.5 ***** FIX: 16.0 - parent company gets emptied when updating a third party from the card in edit mode (#28269) FIX: 16.0 - the e-mail templates configured in the notification module are not used if the recipient is a fixed e-mail address (#29407) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 9e1046d439f..d8fab8a966c 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,10 +31,10 @@ */ if (!defined('DOL_APPLICATION_TITLE')) { - define('DOL_APPLICATION_TITLE', 'Dolibarr'); + define('DOL_APPLICATION_TITLE', 'Dolibarr LTS'); } if (!defined('DOL_VERSION')) { - define('DOL_VERSION', '18.0.6'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c + define('DOL_VERSION', '18.0.7'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c } if (!defined('EURO')) { From 52c827c2bbe56e2183542199535526dc9d1bcaf9 Mon Sep 17 00:00:00 2001 From: Marc <99648320+emheyarssi@users.noreply.github.com> Date: Sat, 21 Jun 2025 14:35:20 +0200 Subject: [PATCH 2/8] FIX #34541 (#34597) --- htdocs/core/modules/project/doc/pdf_timespent.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index c00ae37ab22..d355b35825d 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -332,7 +332,7 @@ class pdf_timespent extends ModelePDFProjects //$progress=($object->lines[$i]->progress?$object->lines[$i]->progress.'%':''); $datestart = dol_print_date($object->lines[$i]->date_start, 'day'); $dateend = dol_print_date($object->lines[$i]->date_end, 'day'); - $duration = convertSecondToTime((int) $object->lines[$i]->duration, 'allhourmin'); + $duration = convertSecondToTime((int) $object->lines[$i]->duration_effective, 'allhourmin'); $showpricebeforepagebreak = 1; From 79afbab0950146d1b0f9e04b7bfc71cc8a8dfe62 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Sat, 21 Jun 2025 16:18:40 +0200 Subject: [PATCH 3/8] FIX: email collector: php 8 warning (#34496) * FIX: email collector: php 8 warning * FIX: email collector: php 8 warning, part 2 --------- Co-authored-by: Laurent Destailleur --- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1f30afa96c5..27e9d867b96 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2258,7 +2258,7 @@ class EmailCollector extends CommonObject $trackid = $objectemail->track_id; } if (empty($objectemail->origin_references)) { - $objectemail->origin_references = $headers['References']; + $objectemail->origin_references = !empty($headers['References']) ? $headers['References'] : null; $changeonticket_references = true; } else { foreach ($arrayofreferences as $key => $referencetmp) { From ce1243140f8b7da44f054fad6497c9ef9ae16c86 Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Sun, 22 Jun 2025 12:49:52 +0200 Subject: [PATCH 4/8] FIX js warning (Backport commit 84d982c) (#34555) Co-authored-by: Laurent Destailleur --- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/core/lib/ajax.lib.php | 2 +- htdocs/societe/card.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7f3a5678671..7062a87a78e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8402,7 +8402,7 @@ class Form }, cache: true }, - language: select2arrayoflanguage, + language: (typeof select2arrayoflanguage === \'undefined\') ? \'en\' : select2arrayoflanguage, containerCssClass: \':all:\', /* Line to add class of origin SELECT propagated to the new displayCanvasExists($action)) { placeholder: "' . $langs->trans('Name of the new third party. In the meantime we check if it already exists...') . '", allowClear: true, minimumInputLength: 3, - language: select2arrayoflanguage, + language: (typeof select2arrayoflanguage === \'undefined\') ? \'en\' : select2arrayoflanguage, containerCssClass: ":all:", selectionCssClass: ":all:", tags: true, From f3ae9f53f718ce5183c7263d98b4c21fb3134015 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Sun, 22 Jun 2025 12:54:42 +0200 Subject: [PATCH 5/8] FIX: product multiprices: fatal error on vat update on php 8.2 (#34444) Co-authored-by: Laurent Destailleur From f1ecb023ff1d651935a160d2b00f7824f4574699 Mon Sep 17 00:00:00 2001 From: Pichi1966 <57623859+josett225@users.noreply.github.com> Date: Sun, 22 Jun 2025 12:57:09 +0200 Subject: [PATCH 6/8] FIX BankTransfer link in rejets.php (#34424) * Prepare 18.0.7 * FIX BankTransfer link in rejets.php FIX BankTransfer link in rejets.php This is to fix a wrong action link in rejets.php. The link was sending to a WithDrawals screen creating confusion. --------- Co-authored-by: VESSILLER Co-authored-by: Laurent Destailleur --- htdocs/compta/prelevement/rejets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 4b30df4ffef..715031bfbb6 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -133,7 +133,7 @@ if ($result) { print ''; print $line->LibStatut($obj->statut, 2).' '; - print ''; + print ''; print substr('000000'.$obj->rowid, -6).""; print ''.$obj->nom."\n"; From 9f76298e5839e56a32ff770e3198c2a8cc2fd909 Mon Sep 17 00:00:00 2001 From: Pichi1966 <57623859+josett225@users.noreply.github.com> Date: Sun, 22 Jun 2025 12:57:33 +0200 Subject: [PATCH 7/8] FIX BankTransfer information in line.php (#34425) * Prepare 18.0.7 * FIX BankTransfer information in line.php FIX BankTransfer information in line.php This is too fix a wrong information in line.php. The mention of WithDrawalsReceipts instead of BankTransfers is wrong information * Suppress Tab in line.php --------- Co-authored-by: VESSILLER Co-authored-by: Laurent Destailleur --- htdocs/compta/prelevement/line.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 617d079c694..faa46461cbc 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -166,7 +166,12 @@ if ($id) { print ''.$langs->trans("Ref").''; print $id.''; - print ''.$langs->trans("WithdrawalsReceipts").''; + if ($type == 'bank-transfer') { + print ''.$langs->trans("BankTransfers").''; + } else { + print ''.$langs->trans("WithdrawalsReceipts").''; + } + print $bon->getNomUrl(1).''; print ''.$langs->trans("Date").''.dol_print_date($bon->datec, 'day').''; From 68a373b6c2c749155d69f384ea6fedfb7ff67f61 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sun, 22 Jun 2025 13:22:01 +0200 Subject: [PATCH 8/8] Fiw warning --- htdocs/projet/card.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index ffd2aa66daf..0f879ceff76 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1712,15 +1712,15 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) { if (!getDolGlobalString('PROJECT_HIDE_CREATE_OBJECT_BUTTON')) { // We check the type of thirdparty $is_customer_or_prospect = (!empty($object->thirdparty->prospect) || !empty($object->thirdparty->client)); - $is_supplier_only= (!empty($object->thirdparty->fournisseur) && $is_customer_or_prospect == false); + $is_supplier_only= (!empty($object->thirdparty->fournisseur) && !$is_customer_or_prospect); $arrayforbutaction = array( - 10 => array('lang'=>'propal', 'enabled' => (isModEnabled("propal") && $is_customer_or_prospect == true), 'perm' => $user->hasRight('propal', 'creer') ? true : false, 'label' => 'AddProp', 'url'=>'/comm/propal/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), - 20 => array('lang'=>'orders', 'enabled' => (isModEnabled("order") && $is_customer_or_prospect == true), 'perm' => $user->hasRight('commande', 'creer') ? true : false, 'label' => 'CreateOrder', 'url'=>'/commande/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), - 30 => array('lang'=>'bills', 'enabled' => (isModEnabled("invoice") && $is_customer_or_prospect == true), 'perm' => $user->hasRight('facture', 'creer') ? true : false, 'label' => 'CreateBill', 'url'=>'/compta/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), - 40 => array('lang'=>'supplier_proposal', 'enabled' => isModEnabled("supplier_proposal"), 'perm' => $user->hasRight('supplier_proposal', 'creer') ? true : false, 'label' => 'AddSupplierProposal', 'url'=>'/supplier_proposal/card.php?action=create&projectid='.$object->id.($is_supplier_only == true ? '&socid='.$object->socid : '')), - 50 => array('lang'=>'suppliers', 'enabled' => isModEnabled("supplier_order"), 'perm' => $user->hasRight('fournisseur', 'commande', 'creer') ? true : false, 'label' => 'AddSupplierOrder', 'url'=>'/fourn/commande/card.php?action=create&projectid='.$object->id.($is_supplier_only == true ? '&socid='.$object->socid : '')), - 60 => array('lang'=>'suppliers', 'enabled' => isModEnabled("supplier_invoice"), 'perm' => $user->hasRight('fournisseur', 'facture', 'creer') ? true : false, 'label' => 'AddSupplierInvoice', 'url'=>'/fourn/facture/card.php?action=create&projectid='.$object->id.($is_supplier_only == true ? '&socid='.$object->socid : '')), + 10 => array('lang'=>'propal', 'enabled' => (isModEnabled("propal") && $is_customer_or_prospect), 'perm' => $user->hasRight('propal', 'creer') ? true : false, 'label' => 'AddProp', 'url'=>'/comm/propal/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), + 20 => array('lang'=>'orders', 'enabled' => (isModEnabled("order") && $is_customer_or_prospect), 'perm' => $user->hasRight('commande', 'creer') ? true : false, 'label' => 'CreateOrder', 'url'=>'/commande/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), + 30 => array('lang'=>'bills', 'enabled' => (isModEnabled("invoice") && $is_customer_or_prospect), 'perm' => $user->hasRight('facture', 'creer') ? true : false, 'label' => 'CreateBill', 'url'=>'/compta/facture/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), + 40 => array('lang'=>'supplier_proposal', 'enabled' => isModEnabled("supplier_proposal"), 'perm' => $user->hasRight('supplier_proposal', 'creer') ? true : false, 'label' => 'AddSupplierProposal', 'url'=>'/supplier_proposal/card.php?action=create&projectid='.$object->id.($is_supplier_only ? '&socid='.$object->socid : '')), + 50 => array('lang'=>'suppliers', 'enabled' => isModEnabled("supplier_order"), 'perm' => $user->hasRight('fournisseur', 'commande', 'creer') ? true : false, 'label' => 'AddSupplierOrder', 'url'=>'/fourn/commande/card.php?action=create&projectid='.$object->id.($is_supplier_only ? '&socid='.$object->socid : '')), + 60 => array('lang'=>'suppliers', 'enabled' => isModEnabled("supplier_invoice"), 'perm' => $user->hasRight('fournisseur', 'facture', 'creer') ? true : false, 'label' => 'AddSupplierInvoice', 'url'=>'/fourn/facture/card.php?action=create&projectid='.$object->id.($is_supplier_only ? '&socid='.$object->socid : '')), 70 => array('lang'=>'interventions', 'enabled' => isModEnabled("intervention"), 'perm' => $user->hasRight('fichinter', 'creer') ? true : false, 'label' => 'AddIntervention', 'url'=>'/fichinter/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), 80 => array('lang'=>'contracts', 'enabled' => isModEnabled("contract"), 'perm' => $user->hasRight('contrat', 'creer') ? true : false, 'label' => 'AddContract', 'url'=>'/contrat/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid), 90 => array('lang'=>'trips', 'enabled' => isModEnabled("expensereport"), 'perm' => $user->hasRight('expensereport', 'creer') ? true : false, 'label' => 'AddTrip', 'url'=>'/expensereport/card.php?action=create&projectid='.$object->id.'&socid='.$object->socid),