Skip to content

Commit

Permalink
FIX Bad message on menu to go to setup of accounting custom groups
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 31, 2023
1 parent 21a03ed commit 5581dee
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion htdocs/accountancy/admin/categories_list.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -852,6 +852,9 @@
print "</tr>\n";
$i++;
}
} else {
$colspan = 11;
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}
} else {
dol_print_error($db);
Expand Down
1 change: 0 additions & 1 deletion htdocs/admin/dict.php
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,6 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
$maxlength = '';
if (in_array($fieldlist[$field], array('libelle', 'label'))) {
switch ($tabname) {
case 'c_accounting_category':
case 'c_ecotaxe':
case 'c_email_senderprofile':
case 'c_forme_juridique':
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/class/html.formaccounting.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function multi_select_journal($selectedIds = array(), $htmlname = 'journa
public function select_accounting_category($selected = '', $htmlname = 'account_category', $useempty = 0, $maxlen = 0, $help = 1, $allcountries = 0)
{
// phpcs:enable
global $db, $langs, $user, $mysoc;
global $db, $langs, $mysoc;

if (empty($mysoc->country_id) && empty($mysoc->country_code) && empty($allcountries)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
Expand Down Expand Up @@ -293,7 +293,7 @@ public function select_accounting_category($selected = '', $htmlname = 'account_
$out .= '</select>';
//if ($user->admin && $help) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
} else {
$out = $langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code);
$out = $langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code, $langs->trans("Accounting"), $langs->trans("Setup"), $langs->trans("AccountingCategories"));
}
} else {
dol_print_error($this->db);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/accountancy.lang
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ ConfirmMassDeleteBookkeepingWritingQuestion=This will delete the transaction fro

## Error
SomeMandatoryStepsOfSetupWereNotDone=Some mandatory steps of setup was not done, please complete them
ErrorNoAccountingCategoryForThisCountry=No accounting account group available for country %s (See Home - Setup - Dictionaries)
ErrorNoAccountingCategoryForThisCountry=No accounting account group available for country %s (See %s - %s - %s)
ErrorInvoiceContainsLinesNotYetBounded=You try to journalize some lines of the invoice <strong>%s</strong>, but some other lines are not yet bounded to accounting account. Journalization of all invoice lines for this invoice are refused.
ErrorInvoiceContainsLinesNotYetBoundedShort=Some lines on invoice are not bound to accounting account.
ExportNotSupported=The export format setuped is not supported into this page
Expand Down

0 comments on commit 5581dee

Please sign in to comment.