From 0662f2cc91c3cc1fc1151e50e321ba2fb29d19b0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Apr 2023 18:48:08 +0200 Subject: [PATCH] Try to add tooltips to explain goal of advanced options --- htdocs/accountancy/admin/index.php | 54 +++++++++---------- htdocs/admin/accounting.php | 1 + .../install/mysql/migration/17.0.0-18.0.0.sql | 4 +- htdocs/langs/en_US/accountancy.lang | 8 ++- 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 22d570fd5e7..0e9b9dbbd99 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -508,14 +508,20 @@ print ''; print ''; print '
'; -// Lettering params + +// Show advanced options +print '
'; + + +// Advanced params print ''; print ''; -print ''; +print ''; print "\n"; print ''; -print ''; +print ''; if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { print ''; if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { print ''; - print ''; + print ''; if (!empty($conf->global->ACCOUNTING_ENABLE_AUTOLETTERING)) { print ''; } +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE)) { + print ''; +} else { + print ''; +} +print ''; + print '
'.$langs->trans('Options').' '.$langs->trans('Lettering').'' . $langs->trans('OptionsAdvanced') . '
'.$langs->trans("ACCOUNTING_ENABLE_LETTERING").''; +print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_LETTERING"), $langs->trans("ACCOUNTING_ENABLE_LETTERING_DESC", $langs->transnoentitiesnoconv("NumMvts")).'
'.$langs->trans("EnablingThisFeatureIsNotNecessary")).'
'; print img_picto($langs->trans("Activated"), 'switch_on'); @@ -529,7 +535,8 @@ print '
' . $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING") . ''; + print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING"), $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING_DESC")) . ''; print img_picto($langs->trans("Activated"), 'switch_on'); @@ -542,33 +549,22 @@ if (!empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) { print '
'; +print $form->textwithpicto($langs->trans("ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE"), $langs->trans("ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE_DESC", $langs->transnoentities("MenuDefaultAccounts"))).''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'; -// Show specific accountancy FR option -if ($mysoc->country_code == 'FR') { - print '
'; - - // Advanced params - print ''; - print ''; - print ''; - print "\n"; - - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE)) { - print ''; - } else { - print ''; - } - print ''; - - print '
' . $langs->trans('OptionsAdvanced') . '
' . $langs->trans("ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE") . ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'; -} print '
'; diff --git a/htdocs/admin/accounting.php b/htdocs/admin/accounting.php index fba458936b8..18d383a1b3c 100644 --- a/htdocs/admin/accounting.php +++ b/htdocs/admin/accounting.php @@ -55,6 +55,7 @@ $error = 0; $title = $langs->trans("ConfigAccountingExpert"); $help_url = ''; + llxHeader('', $title, $help_url); $linkback = ''.$langs->trans("BackToModuleList").''; diff --git a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql index a86404b105f..c4735898126 100644 --- a/htdocs/install/mysql/migration/17.0.0-18.0.0.sql +++ b/htdocs/install/mysql/migration/17.0.0-18.0.0.sql @@ -386,8 +386,8 @@ ALTER TABLE llx_product_fournisseur_price_log ADD INDEX idx_product_fournisseur_ ALTER TABLE llx_bordereau_cheque ADD COLUMN label varchar(255) AFTER ref; -ALTER TABLE llx_societe ADD COLUMN vat_reverse_charge smallint DEFAULT 0 AFTER tva_assuj; -ALTER TABLE llx_facture_fourn ADD COLUMN vat_reverse_charge smallint DEFAULT 0 AFTER close_note; +ALTER TABLE llx_societe ADD COLUMN vat_reverse_charge tinyint DEFAULT 0 AFTER tva_assuj; +ALTER TABLE llx_facture_fourn ADD COLUMN vat_reverse_charge tinyint DEFAULT 0 AFTER close_note; ALTER TABLE llx_c_email_templates add COLUMN defaultfortype smallint DEFAULT 0; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 79793817f5f..c3ac42a165d 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -345,9 +345,13 @@ ACCOUNTING_DISABLE_BINDING_ON_SALES=Disable binding & transfer in accountancy on ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountancy on purchases (vendor invoices will not be taken into account in accounting) ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting) ACCOUNTING_ENABLE_LETTERING=Enable the lettering function in the accounting +ACCOUNTING_ENABLE_LETTERING_DESC=When this options is enabled, you can define, on each accounting entry, a code so you can group different accounting movements together. In the past, when different journals was managed independently, this feature was necessary to group movement lines of different journals together. However, with Dolibarr accountancy, such a tracking code, called "%s" is already saved automatically, so an automatic lettering is already done, with no risk of error so this feature has become useless for a common usage. Manual lettering feature is provided for end users that really don't trust the computer engine making the transfer of data in accountancy. +EnablingThisFeatureIsNotNecessary=Enabling this feature is no more necessary for a rigourous accounting management. ACCOUNTING_ENABLE_AUTOLETTERING=Enable the automatic lettering when transferring to accounting +ACCOUNTING_ENABLE_AUTOLETTERING_DESC=The code for the lettering is automatically generated and incremented and not choosed by the end user OptionsAdvanced=Advanced options ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE=Activate the management of VAT reverse charge on supplier purchases +ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE_DESC=When this option is enabled, you can define that a supplier or a given vendor invoice must be transfered into accountancy differently: A additionnal debit and a credit line will generated into the accounting on 2 given accounts from the chart of account defined into the "%s" setup page. ## Export NotExportLettering=Do not export the lettering when generating the file @@ -384,7 +388,7 @@ ChartofaccountsId=Chart of accounts Id ## Tools - Init accounting account on product / service InitAccountancy=Init accountancy InitAccountancyDesc=This page can be used to initialize an accounting account on products and services that does not have accounting account defined for sales and purchases. -DefaultBindingDesc=This page can be used to set a default account to use to link transactions record about payment salaries, donation, taxes and vat when no specific accounting account were already set. +DefaultBindingDesc=This page can be used to set the default accounts (from the chart of account) to use to link business objects with an account, like payment salaries, donation, taxes and VAT, when no specific account were already set. DefaultClosureDesc=This page can be used to set parameters used for accounting closures. Options=Options OptionModeProductSell=Mode sales @@ -436,7 +440,7 @@ ConfirmMassUnletteringAuto=Bulk auto unreconcile confirmation ConfirmMassUnletteringManual=Bulk manual unreconcile confirmation ConfirmMassUnletteringQuestion=Are you sure you want to unreconcile the %s selected record(s)? ConfirmMassDeleteBookkeepingWriting=Bulk Delete confirmation -ConfirmMassDeleteBookkeepingWritingQuestion=This will delete the transaction from the accounting (all lines related to the same transaction will be deleted) Are you sure you want to delete the %s selected record(s)? +ConfirmMassDeleteBookkeepingWritingQuestion=This will delete the transaction from the accounting (all line entries related to the same transaction will be deleted). Are you sure you want to delete the %s selected entries? ## Error SomeMandatoryStepsOfSetupWereNotDone=Some mandatory steps of setup was not done, please complete them