From fb1e5b9dd5726a85a107d78e188e6a1b554bc609 Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 25 May 2024 06:04:39 -0500 Subject: [PATCH 1/4] Update card.php Issue #29757 (#29758) Bug-Fix Issue #29757 Prevent the check for a duplicate ref from populating the new ticket object fields with values from the conflicting ticket. --- htdocs/ticket/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 82d1bab2c07..265a661448d 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -212,7 +212,8 @@ if (empty($reshook)) { $db->begin(); $getRef = GETPOST("ref", 'alphanohtml'); - if ($object->fetch('', $getRef) > 0) { + $refcheck_object = new Ticket($db); + if ($refcheck_object->fetch('', $getRef) > 0) { $object->ref = $object->getDefaultRef(); $object->track_id = null; setEventMessage($langs->trans('TicketRefAlreadyUsed', $getRef, $object->ref)); From 5821a87ac3f9d9077f5b362ad989a5a63fe6c6e8 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Sun, 26 May 2024 15:16:56 +0200 Subject: [PATCH 2/4] Fix 18.0 - Update VAT for Switzerland (#29760) VAT in Switzerland was increased on January 1, 2024. See: https://www.estv.admin.ch/estv/fr/accueil/taxe-sur-la-valeur-ajoutee/taux-tva-suisse.html --- htdocs/install/mysql/data/llx_c_tva.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index ac0ffcb8812..fcd3132c2f2 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -316,9 +316,9 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2 -- SWITZERLAND (id country=6) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 61, 6, '0','0','VAT rate 0', 1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 62, 6, '3.7','0','VAT rate - reduced',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.5','0','VAT rate - super-reduced',1); -insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '7.7','0','VAT rate - standard',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 62, 6, '3.8','0','VAT rate - reduced',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 63, 6, '2.6','0','VAT rate - super-reduced',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 64, 6, '8.1','0','VAT rate - standard',1); -- SRI LANKA (id country=207) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2071, 207, '0','0','VAT 0', 1); From f0bf49f94259d0585446268bb3aad51fdbe6c9af Mon Sep 17 00:00:00 2001 From: battosai30 Date: Fri, 31 May 2024 15:24:31 +0200 Subject: [PATCH 3/4] FIX: #29439 incomplete API return (#29796) * Update api_documents.class.php * Update api_documents.class.php * Update api_documents.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/api/class/api_documents.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index 915768e0ea6..a739f0a1866 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -580,8 +580,10 @@ class Documents extends DolibarrApi } elseif (is_array($ecmfile->lines) && count($ecmfile->lines) > 0) { $count = count($filearray); for ($i = 0 ; $i < $count ; $i++) { - if ($filearray[$i]['name'] == $ecmfile->lines[$i]->filename) { - $filearray[$i] = array_merge($filearray[$i], (array) $ecmfile->lines[0]); + foreach ($ecmfile->lines as $line) { + if ($filearray[$i]['name'] == $line->filename) { + $filearray[$i] = array_merge($filearray[$i], (array) $line); + } } } } From 382f27978387170e7751fc78ebbd7f094cbf71fa Mon Sep 17 00:00:00 2001 From: MaximilienR-easya <122890855+MaximilienR-easya@users.noreply.github.com> Date: Fri, 31 May 2024 16:27:46 +0200 Subject: [PATCH 4/4] Fix incorrect translation code and missing one (#29804) * Fix of an incorrect translation code and added a missing one * added missing translation in en_US --- htdocs/contrat/services_list.php | 4 ++-- htdocs/langs/en_US/contracts.lang | 1 + htdocs/langs/fr_FR/contracts.lang | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 62cb1b62c69..a85f0d4714c 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -482,10 +482,10 @@ if ($search_status == "4") { $title = $langs->trans("ListOfRunningServices"); } if ($search_status == "4&filter=notexpired") { - $title = $langs->trans("ListOfNotExpiredRunningServices"); + $title = $langs->trans("ListOfNotExpiredServices"); } if ($search_status == "4&filter=expired") { - $title = $langs->trans("ListOfExpiredRunningServices"); + $title = $langs->trans("ListOfExpiredServices"); } if ($search_status == "5") { $title = $langs->trans("ListOfClosedServices"); diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang index 6b83094fabe..aa2db72fb41 100644 --- a/htdocs/langs/en_US/contracts.lang +++ b/htdocs/langs/en_US/contracts.lang @@ -47,6 +47,7 @@ DateContract=Contract date DateServiceActivate=Service activation date ListOfServices=List of services ListOfInactiveServices=List of not active services +ListOfNotExpiredServices=List of unexpired active services ListOfExpiredServices=List of expired active services ListOfClosedServices=List of closed services ListOfRunningServices=List of running services diff --git a/htdocs/langs/fr_FR/contracts.lang b/htdocs/langs/fr_FR/contracts.lang index 9337aa4240c..704f13b0917 100644 --- a/htdocs/langs/fr_FR/contracts.lang +++ b/htdocs/langs/fr_FR/contracts.lang @@ -47,6 +47,7 @@ DateContract=Date contrat DateServiceActivate=Date activation du service ListOfServices=Liste des services ListOfInactiveServices=Liste des services inactifs +ListOfNotExpiredServices=Liste des services actifs non expirés ListOfExpiredServices=Liste des services actifs expirés ListOfClosedServices=Liste des services fermés ListOfRunningServices=Liste des services actifs