From 0a958e98ec7646f7071d5997dad5dbfb422683b2 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Tue, 4 Feb 2025 16:16:02 +0100 Subject: [PATCH 01/11] NEW: takepos cash control: add vat taxless total --- htdocs/compta/cashcontrol/report.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index d4d1d6d758f..4b9d33c32af 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -226,6 +226,7 @@ if ($resql) { $totalqty = 0; $totalvat = 0; $totalvatperrate = array(); + $totalhtperrate = array(); $totallocaltax1 = 0; $totallocaltax2 = 0; $cachebankaccount = array(); @@ -257,8 +258,10 @@ if ($resql) { if ($line->tva_tx) { if (empty($totalvatperrate[$line->tva_tx])) { $totalvatperrate[$line->tva_tx] = 0; + $totalhtperrate[$line->tva_tx] = 0; } $totalvatperrate[$line->tva_tx] += $line->total_tva; + $totalhtperrate[$line->tva_tx] += $line->total_ht; } $totallocaltax1 += $line->total_localtax1; $totallocaltax2 += $line->total_localtax2; @@ -448,9 +451,9 @@ if ($resql) { } if (!empty($totalvatperrate) && is_array($totalvatperrate)) { - print '

'.$langs->trans("VATRate").'
'; + print '

'.$langs->trans("TotalHT").'
'.$langs->trans("TotalVAT").'
'; foreach ($totalvatperrate as $keyrate => $valuerate) { - print '
'.$langs->trans("VATRate").' '.vatrate($keyrate, true).' :
'.price($valuerate).'
'; + print '
'.$langs->trans("VATRate").' '.vatrate($keyrate, true).' :
'.price($totalhtperrate[$keyrate] ?? 0).'
'.price($valuerate).'
'; } } From a9ef15ee55349c7dea85feec2febe368c64151a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 6 Feb 2025 13:26:58 +0100 Subject: [PATCH 02/11] fix missing translations --- dev/translation/ignore_translation_keys.lst | 1 - htdocs/langs/en_US/main.lang | 1 + htdocs/public/donations/donateurs_code.php | 4 ++-- htdocs/website/index.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index 3945b5a4f8b..68932ab360e 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -125,7 +125,6 @@ AmountOfinterventionsByMonthHT AnObjectWithThisClassNameAlreadyExists AnnualByAccountDueDebtMode AnnualByAccountInputOutputMode -Anonymous AnotherField Applications Articles diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index b87d3e0c148..cf6093a6061 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1349,3 +1349,4 @@ EcoTax=Eco-Tax GroupingLine=Grouping line AllTime=From start Transferred=Transferred +Anonymous=Anonymous diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index e801451df37..b2d2d2c0e2b 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * * 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 @@ -67,7 +67,7 @@ if (!isModEnabled('don')) { } -$langs->load("donations"); +$langs->load("donations", "main"); /* diff --git a/htdocs/website/index.php b/htdocs/website/index.php index baec057484e..fb33d4c0468 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016-2023 Laurent Destailleur * Copyright (C) 2020 Nicolas ZABOURI * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -4809,7 +4809,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties print ''; print $langs->trans('PublicAuthorAlias'); print ''; - print ''; + print ''; print ''; print ''; From ea2728afa0b811534d59d682b2152b42f16de3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 6 Feb 2025 13:31:18 +0100 Subject: [PATCH 03/11] fix missing translations --- htdocs/website/index.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index fb33d4c0468..8ff1b796049 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -64,7 +64,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; */ // Load translation files required by the page -$langs->loadLangs(array("admin", "other", "website", "errors")); +$langs->loadLangs(array("admin", "other", "website", "main", "errors")); // Security check if (!$user->hasRight('website', 'read')) { @@ -2078,12 +2078,10 @@ if ($action == 'updatemeta' && $usercanedit) { $langs->load("errors"); if ($db->lasterrno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $error++; - $langs->load("errors"); setEventMessages($langs->trans("ErrorAPageWithThisNameOrAliasAlreadyExists"), null, 'errors'); $action = 'editmeta'; } else { $error++; - $langs->load("errors"); setEventMessages($objectpage->error, $objectpage->errors, 'errors'); $action = 'editmeta'; } From e1c9dd32a77422d2772075184abe05fd77be0b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 6 Feb 2025 13:48:23 +0100 Subject: [PATCH 04/11] fix missing translations --- dev/translation/ignore_translation_keys.lst | 2 -- htdocs/langs/en_US/sendings.lang | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index 68932ab360e..c8e2dfc5294 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -199,7 +199,6 @@ CloneProgression CloneTimes Close Done Close2 -CloseShipment CodeTooltipHelp Column Combination @@ -214,7 +213,6 @@ ConfirmActionMyObject ConfirmActionTarget ConfirmCloneMyObject ConfirmCloneTask -ConfirmCloseShipment ConfirmCreateAdherent ConfirmDeleteAdherent ConfirmDeleteIndividual diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index f2fafacff93..bc12badb248 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -90,3 +90,5 @@ TypeContact_shipping_external_BILLING=Customer invoice contact TypeContact_shipping_external_CUSTOMER=Customer contact following-up shipping TypeContact_shipping_external_SHIPPING=Customer contact for shipping TypeContact_shipping_external_DELIVERY=Customer contact for delivery +CloseShipment=Close shipment +ConfirmCloseShipment=Confirm close shipment From d69636b9218ffcab6970440a0c18cb5aad495edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 6 Feb 2025 18:02:17 +0100 Subject: [PATCH 05/11] Update index.php --- htdocs/website/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 8ff1b796049..eab30a6de09 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -64,7 +64,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; */ // Load translation files required by the page -$langs->loadLangs(array("admin", "other", "website", "main", "errors")); +$langs->loadLangs(array("admin", "other", "website")); // Security check if (!$user->hasRight('website', 'read')) { From fb71027aecb9f4cdb6fa552b8a1f0e184c3884d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 6 Feb 2025 18:13:42 +0100 Subject: [PATCH 06/11] Update donateurs_code.php --- htdocs/public/donations/donateurs_code.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index b2d2d2c0e2b..8c84311b6c6 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -67,7 +67,7 @@ if (!isModEnabled('don')) { } -$langs->load("donations", "main"); +$langs->load("donations"); /* From ae7e3dcf2d1721c3082cddceb856489127381137 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Feb 2025 09:54:02 +0100 Subject: [PATCH 07/11] NEW: add const to not include default CSS in top_htmlhead with DISABLE_CSS_DEFAULT_THEME --- htdocs/main.inc.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1bfd7b4361e..d25d87140b9 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2036,22 +2036,24 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; } - print ''."\n"; - // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' - $themepath = dol_buildpath($conf->css, 1); - $themesubdir = ''; - if (!empty($conf->modules_parts['theme'])) { // This slow down - foreach ($conf->modules_parts['theme'] as $reldir) { - if (file_exists(dol_buildpath($reldir.$conf->css, 0))) { - $themepath = dol_buildpath($reldir.$conf->css, 1); - $themesubdir = $reldir; - break; + if (!defined('DISABLE_CSS_DEFAULT_THEME')) { + print ''."\n"; + // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' + $themepath = dol_buildpath($conf->css, 1); + $themesubdir = ''; + if (!empty($conf->modules_parts['theme'])) { // This slow down + foreach ($conf->modules_parts['theme'] as $reldir) { + if (file_exists(dol_buildpath($reldir.$conf->css, 0))) { + $themepath = dol_buildpath($reldir.$conf->css, 1); + $themesubdir = $reldir; + break; + } } } + + print '' . "\n"; } - //print 'themepath='.$themepath.' themeparam='.$themeparam;exit; - print ''."\n"; if (getDolGlobalString('MAIN_FIX_FLASH_ON_CHROME')) { print ''."\n".''."\n"; } From 91abc644dd1d165681ba89b88d1706be25b83a7e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Feb 2025 10:04:34 +0100 Subject: [PATCH 08/11] NEW: add const to not include JQuery UI in top_htmlhead DISABLE_JQUERY_UI --- htdocs/main.inc.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1bfd7b4361e..9004839fa99 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2012,14 +2012,16 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) { print ''."\n"; - $jquerytheme = 'base'; - if (getDolGlobalString('MAIN_USE_JQUERY_THEME')) { - $jquerytheme = getDolGlobalString('MAIN_USE_JQUERY_THEME'); - } - if (constant('JS_JQUERY_UI')) { - print ''."\n"; // Forced JQuery - } else { - print ''."\n"; // JQuery + if (!defined('DISABLE_JQUERY_UI')) { + $jquerytheme = 'base'; + if (getDolGlobalString('MAIN_USE_JQUERY_THEME')) { + $jquerytheme = getDolGlobalString('MAIN_USE_JQUERY_THEME'); + } + if (constant('JS_JQUERY_UI')) { + print '' . "\n"; // Forced JQuery + } else { + print '' . "\n"; // JQuery + } } if (!defined('DISABLE_JQUERY_JNOTIFY')) { print ''."\n"; // JNotify @@ -2118,10 +2120,12 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } else { print ''."\n"; } - if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) { - print ''."\n"; - } else { - print ''."\n"; + if (!defined('DISABLE_JQUERY_UI')) { + if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) { + print '' . "\n"; + } else { + print '' . "\n"; + } } // jQuery jnotify if (!getDolGlobalString('MAIN_DISABLE_JQUERY_JNOTIFY') && !defined('DISABLE_JQUERY_JNOTIFY')) { From 15dec468cb555e43e3454d431b7c23b87e89d093 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Feb 2025 10:05:06 +0100 Subject: [PATCH 09/11] NEW: add const to not include JQuery UI in top_htmlhead DISABLE_JQUERY_UI --- htdocs/main.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9004839fa99..3ddad620a92 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2120,6 +2120,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } else { print ''."\n"; } + + if (!defined('DISABLE_JQUERY_UI')) { if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) { print '' . "\n"; From 867215e2eae009af0b4e5f11b84f01363fed2104 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Feb 2025 10:05:17 +0100 Subject: [PATCH 10/11] NEW: add const to not include JQuery UI in top_htmlhead DISABLE_JQUERY_UI --- htdocs/main.inc.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 3ddad620a92..9004839fa99 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2120,8 +2120,6 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } else { print ''."\n"; } - - if (!defined('DISABLE_JQUERY_UI')) { if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) { print '' . "\n"; From a8811551092404b7ea028c21001033173884af5d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 7 Feb 2025 10:10:45 +0100 Subject: [PATCH 11/11] NEW: add const to not include default CSS in top_htmlhead with DISABLE_CSS_DEFAULT_THEME --- htdocs/main.inc.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index d25d87140b9..9b126b49724 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2036,21 +2036,21 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; } - if (!defined('DISABLE_CSS_DEFAULT_THEME')) { - print ''."\n"; - // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' - $themepath = dol_buildpath($conf->css, 1); - $themesubdir = ''; - if (!empty($conf->modules_parts['theme'])) { // This slow down - foreach ($conf->modules_parts['theme'] as $reldir) { - if (file_exists(dol_buildpath($reldir.$conf->css, 0))) { - $themepath = dol_buildpath($reldir.$conf->css, 1); - $themesubdir = $reldir; - break; - } + // Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php' + $themepath = dol_buildpath($conf->css, 1); + $themesubdir = ''; + if (!empty($conf->modules_parts['theme'])) { // This slow down + foreach ($conf->modules_parts['theme'] as $reldir) { + if (file_exists(dol_buildpath($reldir.$conf->css, 0))) { + $themepath = dol_buildpath($reldir.$conf->css, 1); + $themesubdir = $reldir; + break; } } + } + if (!defined('DISABLE_CSS_DEFAULT_THEME')) { + print ''."\n"; print '' . "\n"; }