From 144846eef5a34b062a0ccb2ec5f2de57af911801 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 17 Jul 2025 16:51:28 +0200 Subject: [PATCH 1/3] Debug v22 --- htdocs/categories/categorie_list.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/categorie_list.php b/htdocs/categories/categorie_list.php index 9b99aa2da51..981b18ec4b2 100644 --- a/htdocs/categories/categorie_list.php +++ b/htdocs/categories/categorie_list.php @@ -483,7 +483,10 @@ if ($mode == 'hierarchy') { $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$param).$param, '', $permissiontoadd); - $morehtmlrightbeforebutton = ''.$langs->trans("BackToCategoryTypes").'   '; + $morehtmlrightbeforebutton = ''; + if (!GETPOST('dol_openinpopup', 'aZ')) { + $morehtmlrightbeforebutton = ''.$langs->trans("BackToCategoryTypes").'   '; + } print_barre_liste($title, 0, $_SERVER["PHP_SELF"], $param, '', '', '', 0, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', 0, 0, 0, 1, $morehtmlrightbeforebutton); @@ -610,7 +613,10 @@ if ($mode == 'hierarchy') { $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$param).$param, '', $permissiontoadd); - $morehtmlrightbeforebutton = ''.$langs->trans("BackToCategoryTypes").'   '; + $morehtmlrightbeforebutton = ''; + if (!GETPOST('dol_openinpopup', 'aZ')) { + $morehtmlrightbeforebutton = ''.$langs->trans("BackToCategoryTypes").'   '; + } print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1, $morehtmlrightbeforebutton); From 5940007f000e6f4c6a53f804c28f40791b1b446a Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 17 Jul 2025 18:12:46 +0200 Subject: [PATCH 2/3] Debug v22 --- htdocs/core/js/lib_head.js.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 5f8b9af8dc9..2e63484deef 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -677,6 +677,11 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke }); if (forcereload) { var url = window.location.href; + + /* reset action param */ + url = url.replace(/action=\w+/g, ''); + + /* reset dol_resetcache param */ if (url.indexOf('dol_resetcache') < 0) { if (url.indexOf('?') > -1) { url = url + "&dol_resetcache=1"; @@ -684,6 +689,8 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke url = url + "?dol_resetcache=1"; } } + + /* reset page_y param */ var page_y = $(document).scrollTop(); url = url.replace(/page_y=\d+/g, ''); if (page_y > 0) { From 66ceb9911db65a2e10da18df5204c00f75b95c33 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 17 Jul 2025 18:31:40 +0200 Subject: [PATCH 3/3] Debug v22 - Fix bad trans and setup for Cash acocunting. --- htdocs/accountancy/admin/index.php | 4 ++-- htdocs/admin/compta.php | 7 ++++--- htdocs/langs/en_US/compta.lang | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 6351ff0e050..aba0ae018dc 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -433,7 +433,7 @@ print '
'; // Case of the parameter ACCOUNTING_MODE -if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { +if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1) { print '
'; print ''; print ''; @@ -446,7 +446,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { print ' ('.$langs->trans('Default').')'; print ''.nl2br($langs->trans('ACCOUNTING_USE_NON_TREASURY_Desc')).''; print "\n"; - print ''; + print ''; print ''.nl2br($langs->trans('ACCOUNTING_USE_TREASURY_Desc')).""; print "\n"; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 365ff634e5d..a2cce93ce4a 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -134,6 +134,7 @@ if ($action == 'update') { } } + /* * View */ @@ -158,11 +159,11 @@ print ''; print ''; print ''; print "\n"; -print ''; +print ''; +print '\n"; +print ''; print '\n"; -print ''; -print '\n"; print "
'.$langs->trans('OptionMode').'
'.nl2br($langs->trans('OptionModeVirtualDesc'))."
'.nl2br($langs->trans('OptionModeTrueDesc')); print "
'.nl2br($langs->trans('OptionModeVirtualDesc'))."
\n"; diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 6810b0dde3d..acaae9d05dd 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -3,10 +3,10 @@ MenuFinancial=Billing | Payment TaxModuleSetupToModifyRules=Go to Taxes module setup to modify rules for calculation TaxModuleSetupToModifyRulesLT=Go to Company setup to modify rules for calculation OptionMode=Option for accountancy -OptionModeTrue=Accrual accounting -OptionModeVirtual=Cash accounting -OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). The validity of the figures is assured only if the book-keeping is scrutinized through the input/output on payments. +OptionModeVirtual=Accrual accounting +OptionModeTrue=Cash accounting OptionModeVirtualDesc=In this context, the turnover is calculated over invoices (date of validation). When these invoices are due, whether they have been paid or not, they are listed in the turnover output. +OptionModeTrueDesc=In this context, the turnover is calculated over payments (date of payments). The validity of the figures is assured only if the book-keeping is scrutinized through the input/output on payments. FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration) VATReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Tax module setup. LTReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Company setup.