diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index a87d5de3207..6b00d5243b9 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -73,6 +73,20 @@ NUSOAP: TCPDF: ------ +* Modify in tcpdf.php: make TCPDF::_out public. + (htdocs/core/lib/pdf.lib.php uses it as a public method) + + Change: + protected function _out($s) + to + public function _out($s) + + Change in method's _out phpdoc: + + * @protected + to + * @public + * Replace in tcpdf.php: if (isset($this->imagekeys)) { foreach($this->imagekeys as $file) { diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 6f36d04d7b9..8c878e1b162 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2023 Alexandre Spangaro - * Copyright (C) 2016-2018 Laurent Destailleur +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2016-2018 Laurent Destailleur * * 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 @@ -226,7 +226,9 @@ if (empty($reshook)) { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader('', $langs->trans("ListAccounts")); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans("ListAccounts"), $help_url); if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 456b1503ca7..2a0b1f5fca2 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2024 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * @@ -401,7 +401,9 @@ if ($action == 'disable_favorite') { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader(); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans("Pcg_version"), $help_url); $titre = $langs->trans($tablib[$id]); $linkback = ''; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 48d7d86e89f..2f7f90e84d0 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2020 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -215,7 +215,7 @@ $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS')); $title = $langs->trans('AccountAccounting')." - ".$langs->trans('Card'); -$help_url = 'EN:Category:Accounting'; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxheader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 014de28bcf3..899cb89ff90 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017-2022 Alexandre Spangaro + * Copyright (C) 2017-2024 Alexandre Spangaro * Copyright (C) 2022 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -113,7 +113,9 @@ if ($action == 'delete') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxheader('', $langs->trans('AccountingCategory')); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans('AccountingCategory'), $help_url); $linkback = ''.$langs->trans("BackToList").''; $titlepicto = 'setup'; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 66f411c8cca..3fa664f5421 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2021 Alexandre Spangaro +/* Copyright (C) 2004-2023 Laurent Destailleur + * Copyright (C) 2011-2024 Alexandre Spangaro * * 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 @@ -414,7 +414,9 @@ if ($action == 'disable_favorite') { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader('', $langs->trans('DictionaryAccountancyCategory')); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans('DictionaryAccountancyCategory'), $help_url); $titre = $langs->trans($tablib[$id]); $linkback = ''; diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index faf5360c984..1979b666051 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2019-2024 Alexandre Spangaro * * 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 @@ -101,7 +101,11 @@ if ($action == 'update') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader(); +$title = $langs->trans('Closure'); + +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $title, $help_url); $linkback = ''; print load_fiche_titre($langs->trans('MenuClosureAccounts'), $linkback, 'title_accountancy'); diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 48e4181b8e5..3eace908373 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -198,7 +198,9 @@ if ($action == 'setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader(); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans('MenuDefaultAccounts'), $help_url); $linkback = ''; print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy'); diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 70dd216b7c9..902b184a48c 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2022 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -134,9 +134,9 @@ if ($action == 'update') { $form = new Form($db); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $title = $langs->trans('ExportOptions'); -llxHeader('', $title); - +llxHeader('', $title, $help_url); $linkback = ''; // $linkback = '' . $langs->trans("BackToModuleList") . ''; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 4cbb6045d74..cb142948096 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2024 Alexandre Spangaro * * 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 @@ -87,7 +87,7 @@ $fiscalyearstatic = new Fiscalyear($db); $title = $langs->trans('AccountingPeriods'); -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 914bc34ccb6..ee587a31f96 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -181,7 +181,7 @@ if ($action == 'create') { $title = $langs->trans("NewFiscalYear"); } -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 918a5b22db1..39754c0345d 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2024 Alexandre Spangaro * * 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 @@ -45,7 +45,7 @@ $id = GETPOST('id', 'int'); $title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info"); -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index acff0845286..636026e526c 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,13 +1,13 @@ - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro - * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2014 Marcos García - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2017 Laurent Destailleur - * Copyright (C) 2021 Ferran Marcet +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014-2015 Ari Elbaz (elarifr) + * Copyright (C) 2014 Marcos García + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2021 Ferran Marcet * * 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 @@ -275,8 +275,8 @@ if ($action == 'setenablevatreversecharge') { $form = new Form($db); $title = $langs->trans('ConfigAccountingExpert'); - -llxHeader('', $title); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; +llxHeader('', $title, $help_url); $linkback = ''; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index c1ad8bdb0c5..5c739dbc2dd 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017-2024 Alexandre Spangaro * * 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 @@ -351,7 +351,9 @@ if ($action == $acts[1]) { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader(); +$title = $langs->trans('AccountingJournals'); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; +llxHeader('', $title, $help_url); $titre = $langs->trans("DictionarySetup"); $linkback = ''; @@ -367,7 +369,6 @@ print load_fiche_titre($titre, $linkback, $titlepicto); if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } -//var_dump($elementList); /* * Show a dictionary diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index ca5516547ec..903375f5920 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,10 +1,10 @@ - * Copyright (C) 2013-2022 Alexandre Spangaro - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Ari Elbaz (elarifr) - * Copyright (C) 2021 Gauthier VERDOL +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Ari Elbaz (elarifr) + * Copyright (C) 2021 Gauthier VERDOL * * 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 @@ -296,14 +296,14 @@ $aacompta_prodsell_export = getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_EXPORT $title = $langs->trans("ProductsBinding"); -$helpurl = ''; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $paramsCat = ''; foreach ($searchCategoryProductList as $searchCategoryProduct) { $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); } -llxHeader('', $title, $helpurl, '', 0, 0, array(), array(), $paramsCat, ''); +llxHeader('', $title, $help_url, '', 0, 0, array(), array(), $paramsCat, ''); $pcgverid = getDolGlobalString('CHARTOFACCOUNTS'); $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index 69c2f458786..fb9a61e36d0 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2020 Alexandre Spangaro - * Copyright (C) 2016-2018 Laurent Destailleur +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2016-2018 Laurent Destailleur * * 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 @@ -126,7 +126,7 @@ $form = new Form($db); // Page Header -$help_url = 'EN:Module_Double_Entry_Accounting#Setup'; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger'); llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index aaba332d2ef..2fccaceb0c3 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2023 Alexandre Spangaro + * Copyright (C) 2016-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -248,7 +248,9 @@ if ($type == 'sub') { $title_page = $langs->trans("AccountBalance"); } -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; + +llxHeader('', $title_page, $help_url); if ($action != 'export_csv') { @@ -523,6 +525,9 @@ if ($action != 'export_csv') { if ($displayed_account != "") { print ''; print ''.$langs->trans("SubTotal").':'; + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + } if (getDolGlobalString('ACCOUNTANCY_SHOW_OPENING_BALANCE')) { print ''.price($sous_total_opening_balance).''; } @@ -533,7 +538,9 @@ if ($action != 'export_csv') { } else { print ''.price(price2num($sous_total_debit - $sous_total_credit)).''; } - print "\n"; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print "\n"; + } print ''; } diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 842059eadb0..7d42cb64a00 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2017 Florian Henry - * Copyright (C) 2013-2022 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2018-2020 Frédéric France * @@ -334,8 +334,8 @@ $form = new Form($db); $formaccounting = new FormAccounting($db); $title = $langs->trans("CreateMvts"); - -llxHeader('', $title); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title, $help_url); // Confirmation to delete the command if ($action == 'delete') { diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index 0d4b02386e1..498a8ee2ed3 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2022 Lionel Vessiller * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018-2021 Frédéric France @@ -708,8 +708,9 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); // Output page // -------------------------------------------------------------------- +$help_url ='EN:Module_Double_Entry_Accounting#Exports|FR:Module_Comptabilité_en_Partie_Double#Exports'; -llxHeader('', $title_page); +llxHeader('', $title_page, $help_url); $formconfirm = ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 7a10c5d96d6..ed00a185230 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2022 Lionel Vessiller * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018-2021 Frédéric France @@ -711,8 +711,8 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); // Output page // -------------------------------------------------------------------- - -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title_page, $help_url); $formconfirm = ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 51b37ce6651..e49424b71db 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Neil Orley * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2020 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -559,8 +559,8 @@ if ($type == 'sub') { $title_page .= $langs->trans("Bookkeeping"); } $title_page .= ')'; - -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title_page, $help_url); // List $nbtotalofrecords = ''; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 637e2bc8f68..14c1bafd9a1 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2021 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2013-2021 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Ari Elbaz (elarifr) @@ -166,8 +166,6 @@ class AccountingAccount extends CommonObject */ public function __construct($db) { - global $conf; - $this->db = $db; $this->next_prev_filter = "fk_pcg_version IN (SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS')).")"; // Used to add a filter in Form::showrefnav method } @@ -866,10 +864,14 @@ class AccountingAccount extends CommonObject // Level 3 (define $code_t): Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding) if (getDolGlobalString('ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY')) { - if (!empty($buyer->code_compta_product)) { + if ($type == 'customer' && !empty($buyer->code_compta_product)) { $code_t = $buyer->code_compta_product; $suggestedid = $accountingAccount['thirdparty']; $suggestedaccountingaccountfor = 'thirdparty'; + } elseif ($type == 'supplier' && !empty($seller->code_compta_product)) { + $code_t = $seller->code_compta_product; + $suggestedid = $accountingAccount['thirdparty']; + $suggestedaccountingaccountfor = 'thirdparty'; } } diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 085c8a65e80..772d1672542 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -161,7 +161,7 @@ $formaccounting = new FormAccounting($db); $title = $langs->trans('Closure'); -$help_url ='EN:Module_Double_Entry_Accounting'; +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Cl.C3.B4ture_annuelle'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 4d29a60f1d9..3102b023015 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2021 Alexandre Spangaro +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2024 Alexandre Spangaro * * 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 @@ -84,8 +84,9 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) { /* * View */ +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader("", $langs->trans('FicheVentilation')); +llxHeader("", $langs->trans('FicheVentilation'), $help_url); if ($cancel == $langs->trans("Cancel")) { $action = ''; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 3a9eced377c..018f222daf8 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -299,8 +299,9 @@ if ($action == 'validatehistory') { /* * View */ +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader('', $langs->trans("CustomersVentilation")); +llxHeader('', $langs->trans("CustomersVentilation"), $help_url); $textprevyear = ''.img_previous().''; $textnextyear = ' '.img_next().''; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 4929b45ac67..2a08eb3986c 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -175,7 +175,9 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, fd.rowid') { $form = new Form($db); $formother = new FormOther($db); -llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched")); +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; + +llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url); print '__N__ trans(\"ErrorFailedToSendMail\", $from, $to).\'. \'.$cmail->error;__N__ }__N__}__N__?>__N____N____N____N____N__
__N__
__N__
__N__
__N__
__N__
__N__

Say Hi

__N____N__ We are happy to get in touch with you__N__
__N__
__N__
__N____N__
__N__
__N____N__
__N__ __N__
__N__
__N__
__N__
__N__

Leave a message

__N__
__N____N__
__N__ __N__ __N__ \">__N__ __N__
__N__
__N____N__
__N__ trans(\"Phone\"); ?>__N____N__ __N__
__N____N__
__N__ trans(\"Email\"); ?>__N____N__ __N____N__ trans(\"Message\"); ?>__N____N__ __N__
__N____N__
__N__ __N__
__N__ __N__
__N____N__
__N__
Weekdays
__N____N__
__N__ $day : \" .getDolGlobalString(\"MAIN_INFO_OPENINGHOURS_$day\") .\"

\"; __N__ }__N__ ?>__N__
__N____N__
Weekends
__N____N__
__N__

Saturday and Sunday

__N____N__

to be determined !

__N__
__N__
__N____N__
__N__

__N__ __N__

__N__ getFullAddress() ?>__N__

__N____N__ __N__
__N__
__N__ __N__
__N__
__N__
__N__
__N__
__N__
__N____N____N__ __N__ __N__ __N__
__N__
__N__
__N__

Reserve a table

__N____N__ __N__
__N____N__ __N__
__N__ __N__ \" />__N__ __N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__ __N__
__N__ __N__
__N__
__N____N__
__N__
__N__ __N__ __N____N__
__N____N____N____N____N__', '', 0); +INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(2__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'contact', '', 'Contact us', '', '', '', '', '1', '2022-08-16 14:40:51', '2022-11-20 14:50:10', null, '', 'page', '', '__N__email;__N__ $message = GETPOST(\'message\', \'alpha\');__N__ $cmail = new CMailFile(\'Contact from website\', $to, $from, $message);__N__ if ($cmail->sendfile()) {__N__ ?>__N__ __N__ trans(\"ErrorFailedToSendMail\", $from, $to).\'. \'.$cmail->error;__N__ }__N__}__N__?>__N____N____N____N____N__
__N__
__N__
__N__
__N__
__N__
__N__

Say Hi

__N____N__ We are happy to get in touch with you__N__
__N__
__N__
__N____N__
__N__
__N____N__
__N__ __N__
__N__
__N__
__N__
__N__

Leave a message

__N__
__N____N__
__N__ __N__ __N__ \">__N__ __N__
__N__
__N____N__
__N__ trans(\"Phone\"); ?>__N____N__ __N__
__N____N__
__N__ trans(\"Email\"); ?>__N____N__ __N____N__ trans(\"Message\"); ?>__N____N__ __N__
__N____N__
__N__ __N__
__N__ __N__
__N____N__
__N__
Weekdays
__N____N__
__N__ $day : \" .getDolGlobalString(\"MAIN_INFO_OPENINGHOURS_$day\") .\"

\"; __N__ }__N__ ?>__N__
__N____N__
Weekends
__N____N__
__N__

Saturday and Sunday

__N____N__

to be determined !

__N__
__N__
__N____N__
__N__

__N__ __N__

__N__ getFullAddress() ?>__N__

__N____N__ __N__
__N__
__N__ __N__
__N__
__N__
__N__
__N__
__N__
__N____N____N__ __N__ __N__ __N__
__N__
__N__
__N__

Reserve a table

__N____N__ __N__
__N____N__ __N__
__N__ __N__ \" />__N__ __N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__
__N____N__
__N__ __N__
__N__ __N__
__N__
__N____N__
__N__
__N__ __N__ __N____N__
__N____N____N____N____N__', '', 0); -- File generated by Dolibarr 17.0.0-beta -- 2022-11-20 14:10:56 UTC --; -- Page ID 252 -> 3__+MAX_llx_website_page__ - Aliases footer --; INSERT INTO llx_website_page(rowid, fk_page, fk_website, pageurl, aliasalt, title, description, lang, image, keywords, status, date_creation, tms, import_key, grabbed_from, type_container, htmlheader, content, author_alias, allowed_in_frames) VALUES(3__+MAX_llx_website_page__, null, __WEBSITE_ID__, 'footer', '', 'Footer', '', '', '', '', '1', '2022-11-20 12:51:50', '2022-11-20 14:07:39', null, '', 'other', '', '__N__
__N__ __N__ __N__
__N__', '', 0); diff --git a/htdocs/langs/en_US/stripe.lang b/htdocs/langs/en_US/stripe.lang index 0beab57f2e3..239c1cf0345 100644 --- a/htdocs/langs/en_US/stripe.lang +++ b/htdocs/langs/en_US/stripe.lang @@ -75,5 +75,6 @@ CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authen STRIPE_CARD_PRESENT=Card Present for Stripe Terminals TERMINAL_LOCATION=Location (address) for Stripe Terminals RequestDirectDebitWithStripe=Request Direct Debit with Stripe +RequesCreditTransferWithStripe=Request Credit Transfer with Stripe STRIPE_SEPA_DIRECT_DEBIT=Enable the Direct Debit payments through Stripe StripeConnect_Mode=Stripe Connect mode \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index b1af1d0d73d..d1c9145b52f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2183,14 +2183,25 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $toprightmenu .= $form->textwithtooltip('', $langs->trans("ModuleBuilder"), 2, 1, $text, 'login_block_elem', 2); } - // Link to print main content area + // Link to print main content area (optioncss=print) if (!getDolGlobalString('MAIN_PRINT_DISABLELINK') && !getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { $qs = dol_escape_htmltag($_SERVER["QUERY_STRING"]); if (isset($_POST) && is_array($_POST)) { foreach ($_POST as $key => $value) { - if ($key !== 'action' && $key !== 'password' && !is_array($value)) { - $qs .= '&'.$key.'='.urlencode($value); + if (in_array($key, array('action', 'massaction', 'password'))) { + continue; + } + if (!is_array($value)) { + if ($value !== '') { + $qs .= '&'.$key.'='.urlencode($value); + } + } else { + foreach ($value as $value2) { + if (($value2 !== '') && (!is_array($value2))) { + $qs .= '&'.$key.'[]='.urlencode($value2); + } + } } } } diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index fe5d5f42362..2b5e6ba6fc8 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -280,6 +280,7 @@ if ($dirins && $action == 'initmodule' && $modulename) { } // Delete dir and files that can be generated in sub tabs later if we need them (we want a minimal module first) + dol_delete_dir_recursive($destdir.'/ajax'); dol_delete_dir_recursive($destdir.'/build/doxygen'); dol_delete_dir_recursive($destdir.'/core/modules/mailings'); dol_delete_dir_recursive($destdir.'/core/modules/'.strtolower($modulename)); @@ -311,7 +312,7 @@ if ($dirins && $action == 'initmodule' && $modulename) { dol_delete_file($destdir.'/myobject_agenda.php'); dol_delete_file($destdir.'/myobject_list.php'); dol_delete_file($destdir.'/lib/'.strtolower($modulename).'_myobject.lib.php'); - dol_delete_file($destdir.'/test/phpunit/functionnal/'.$modulename.'FunctionnalTest.php'); + dol_delete_file($destdir.'/test/phpunit/functional/'.$modulename.'FunctionalTest.php'); dol_delete_file($destdir.'/test/phpunit/MyObjectTest.php'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.sql'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.sql'); diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index b35a4ae989d..e871e2bd192 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -452,7 +452,7 @@ class MyObject extends CommonObject $sql .= $this->getFieldList('t'); $sql .= " FROM ".$this->db->prefix().$this->table_element." as t"; if (isset($this->isextrafieldmanaged) && $this->isextrafieldmanaged == 1) { - $sql .= " LEFT JOIN ".$this->db->prefix().$this->table_element."_extrafields as te ON tf.fk_object = t.rowid"; + $sql .= " LEFT JOIN ".$this->db->prefix().$this->table_element."_extrafields as te ON te.fk_object = t.rowid"; } if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { $sql .= " WHERE t.entity IN (".getEntity($this->element).")"; diff --git a/htdocs/modulebuilder/template/test/phpunit/functionnal/MyModuleFunctionalTest.php b/htdocs/modulebuilder/template/test/phpunit/functional/MyModuleFunctionalTest.php similarity index 100% rename from htdocs/modulebuilder/template/test/phpunit/functionnal/MyModuleFunctionalTest.php rename to htdocs/modulebuilder/template/test/phpunit/functional/MyModuleFunctionalTest.php diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 4164a99cb6b..94c0438f71e 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('multicurrency')); +$langs->loadLangs(array('admin', 'multicurrency')); // Get Parameters $action = GETPOST('action', 'alpha'); @@ -78,7 +78,6 @@ if (!$sortorder) { $sortorder = "DESC"; } - // Initialize technical objects $object = new CurrencyRate($db); $form = new Form($db); @@ -346,7 +345,7 @@ if ($search_date_sync && $search_date_sync_end) { $sql .= natural_search('cr.date_sync', $db->idate($search_date_sync)); } if ($search_rate) { - $sql .= natural_search('cr.rate', $search_rate); + $sql .= natural_search('cr.rate', $search_rate, 1); } if ($search_code) { $sql .= natural_search('m.code', $search_code); @@ -357,7 +356,7 @@ $sql .= " WHERE m.code <> '".$db->escape($conf->currency)."'"; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql .= " GROUP BY cr.rowid, cr.date_sync, cr.rate, m.code, cr.entity, m.code, m.name"; +$sql .= " GROUP BY cr.rowid, cr.date_sync, cr.rate, cr.rate_indirect, m.code, cr.entity, m.code, m.name"; // Add fields from hooks $parameters = array(); @@ -477,6 +476,13 @@ if ($resql) { // Lines with input filters print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; + } // date if (!empty($arrayfields['cr.date_sync']['checked'])) { print ''; @@ -502,14 +508,20 @@ if ($resql) { $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - print ''; - + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; + } print ''; print ''; + // Action column + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center '); + } if (!empty($arrayfields['cr.date_sync']['checked'])) { print_liste_field_titre($arrayfields['cr.date_sync']['label'], $_SERVER["PHP_SELF"], "cr.date_sync", "", $param, "", $sortfield, $sortorder); } @@ -524,8 +536,10 @@ if ($resql) { $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + // Action column + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch center '); + } print "\n"; $i = 0; @@ -537,18 +551,41 @@ if ($resql) { // USER REQUEST UPDATE FOR THIS LINE if ($action == "updateRate" && $obj->rowid == $id_rate_selected) { - // var_dump($obj); - print ' '; + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + } + print ''; print '' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . ''; - print ' '; - - print ''; + print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + print ''; + } } else { + // Action + if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } + print 'rowid.'">'.img_picto('edit', 'edit').''; + print 'rowid.'">'.img_picto('delete', 'delete').''; + print ''; + } + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // date_sync if (!empty($arrayfields['cr.date_sync']['checked'])) { print ''; @@ -598,19 +635,21 @@ if ($resql) { print $hookmanager->resPrint; // Action - print ''; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) { - $selected = 1; + if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { + print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) { + $selected = 1; + } + print 'rowid.'">'.img_picto('edit', 'edit').''; + print 'rowid.'">'.img_picto('delete', 'delete').''; + print ''; + } + print ''; + if (!$i) { + $totalarray['nbfield']++; } - print 'rowid.'">'.img_picto('edit', 'edit').''; - print 'rowid.'">'.img_picto('delete', 'delete').''; - print ''; - } - print ''; - if (!$i) { - $totalarray['nbfield']++; } print "\n"; diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index c1f48884e84..0d6d4f52e68 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -477,14 +477,13 @@ class Productbatch extends CommonObject } if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock AS ps ON (ps.rowid = fk_product_stock)'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'stock_mouvement AS sm ON (sm.batch = t.batch AND ps.fk_entrepot=sm.fk_entrepot)'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'stock_mouvement AS sm ON (sm.batch = t.batch AND ps.fk_entrepot=sm.fk_entrepot AND sm.type_mouvement IN (0,3))'; } $sql .= " WHERE fk_product_stock=".((int) $fk_product_stock); if ($with_qty) { $sql .= " AND t.qty <> 0"; } if (getDolGlobalString('SHIPPING_DISPLAY_STOCK_ENTRY_DATE')) { - $sql .= ' AND sm.type_mouvement IN (0,3)'; $sql .= ' GROUP BY t.rowid, t.tms, t.fk_product_stock,t.sellby,t.eatby , t.batch,t.qty,t.import_key'; if ($fk_product > 0) { $sql .= ', pl.rowid, pl.eatby, pl.sellby'; diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php index 8971e1a667e..21f1a70c346 100644 --- a/htdocs/product/stock/stockatdate.php +++ b/htdocs/product/stock/stockatdate.php @@ -427,7 +427,7 @@ if (!empty($search_fk_warehouse)) { } } if ($productid > 0) { - $param .= '&productid='.$productid; + $param .= '&productid='.(int) $productid; } if (GETPOST('dateday', 'int') > 0) { $param .= '&dateday='.GETPOST('dateday', 'int'); diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 73245eb75e4..c47fdad16a2 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -342,15 +342,17 @@ print ''; print '
'; if (empty($object->description)) { - print '
'."\n"; + print '
'."\n"; +} else { + print '
'."\n"; } // show title of survey $titre = str_replace("\\", "", $object->title); -print '
'.img_picto('', 'poll', 'class="size15x paddingright"').' '.dol_htmlentities($titre).'
'; +print '
'.img_picto('', 'poll', 'class="size15x paddingright"').' '.dol_htmlentities($titre).'
'; if (!empty($object->description)) { - print '
'."\n"; + print '
'."\n"; } // show description of survey diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 4abd4485c34..9e5d578e01a 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -265,16 +265,16 @@ if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypa $PAYPAL_API_KO = $urlko; } if (empty($PAYPAL_API_USER)) { - dol_print_error('', "Paypal setup param PAYPAL_API_USER not defined"); - return -1; + print 'Paypal parameter PAYPAL_API_USER is not defined. Please complete the setup of module PayPal first.'; + exit; } if (empty($PAYPAL_API_PASSWORD)) { - dol_print_error('', "Paypal setup param PAYPAL_API_PASSWORD not defined"); - return -1; + print 'Paypal parameter PAYPAL_API_PASSWORD is not defined. Please complete the setup of module PayPal first.'; + exit; } if (empty($PAYPAL_API_SIGNATURE)) { - dol_print_error('', "Paypal setup param PAYPAL_API_SIGNATURE not defined"); - return -1; + print 'Paypal parameter PAYPAL_API_SIGNATURE is not defined. Please complete the setup of module PayPal first.'; + exit; } } if ((empty($paymentmethod) || $paymentmethod == 'paybox') && isModEnabled('paybox')) { diff --git a/htdocs/salaries/virement_request.php b/htdocs/salaries/virement_request.php index f51af45622c..463ebaa4549 100644 --- a/htdocs/salaries/virement_request.php +++ b/htdocs/salaries/virement_request.php @@ -104,7 +104,7 @@ if ($id > 0 || !empty($ref)) { $permissiontoread = $user->rights->salaries->read; $permissiontoadd = $user->rights->salaries->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles -$permissiontodelete = $user->rights->salaries->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissiontodelete = $user->rights->salaries->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_UNPAID); $moreparam = ''; if ($type == 'bank-transfer') { @@ -613,7 +613,7 @@ if ($resql) { print $withdrawreceipt->getNomUrl(1); } - if ($type != 'bank-transfer') { + if (!in_array($type, array('bank-transfer', 'salaire', 'salary'))) { if (getDolGlobalString('STRIPE_SEPA_DIRECT_DEBIT')) { $langs->load("stripe"); if ($obj->fk_prelevement_bons > 0) { @@ -627,7 +627,7 @@ if ($resql) { if ($obj->fk_prelevement_bons > 0) { print '   '; } - print 'rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("RequestDirectDebitWithStripe").''; + print 'rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("RequesCreditTransferWithStripe").''; } } print ''; diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php index bdf8d2545db..7b202daaf47 100644 --- a/htdocs/stripe/config.php +++ b/htdocs/stripe/config.php @@ -52,4 +52,4 @@ if (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha')) { \Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']); \Stripe\Stripe::setAppInfo("Dolibarr Stripe", DOL_VERSION, "https://www.dolibarr.org"); // add dolibarr version -\Stripe\Stripe::setApiVersion(!getDolGlobalString('STRIPE_FORCE_VERSION') ? "2022-11-15" : $conf->global->STRIPE_FORCE_VERSION); // force version API +\Stripe\Stripe::setApiVersion(getDolGlobalString('STRIPE_FORCE_VERSION', "2022-11-15")); // force version API diff --git a/htdocs/theme/eldy/manifest.json.php b/htdocs/theme/eldy/manifest.json.php index 2cae631d25b..0217caffb7d 100644 --- a/htdocs/theme/eldy/manifest.json.php +++ b/htdocs/theme/eldy/manifest.json.php @@ -79,7 +79,15 @@ $manifest->short_name = $manifest->name; $manifest->theme_color = getDolGlobalString('MAIN_MANIFEST_APPLI_THEME_COLOR', getDolGlobalString('THEME_ELDY_TOPMENU_BACK1', '#F05F40')); +if (!preg_match('/#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]$/', $manifest->theme_color)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $manifest->theme_color = '#'.colorArrayToHex(colorStringToArray($manifest->theme_color)); +} $manifest->background_color = getDolGlobalString('MAIN_MANIFEST_APPLI_BG_COLOR', "#ffffff"); +if (!preg_match('/#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]$/', $manifest->background_color)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $manifest->background_color = '#'.colorArrayToHex(colorStringToArray($manifest->background_color)); +} $manifest->display = getDolGlobalString('MAIN_MANIFEST_DISPLAY', "minimal-ui"); $manifest->splash_pages = null; $manifest->icons = array(); diff --git a/htdocs/theme/md/manifest.json.php b/htdocs/theme/md/manifest.json.php index dc327ddf9dc..2703fe873ea 100644 --- a/htdocs/theme/md/manifest.json.php +++ b/htdocs/theme/md/manifest.json.php @@ -77,7 +77,15 @@ if (getDolGlobalString('MAIN_APPLICATION_TITLE')) { $manifest->short_name = $manifest->name; $manifest->theme_color = getDolGlobalString('MAIN_MANIFEST_APPLI_THEME_COLOR', getDolGlobalString('THEME_ELDY_TOPMENU_BACK1', '#F05F40')); +if (!preg_match('/#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]$/', $manifest->theme_color)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $manifest->theme_color = '#'.colorArrayToHex(colorStringToArray($manifest->theme_color)); +} $manifest->background_color = getDolGlobalString('MAIN_MANIFEST_APPLI_BG_COLOR', "#ffffff"); +if (!preg_match('/#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]$/', $manifest->background_color)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $manifest->background_color = '#'.colorArrayToHex(colorStringToArray($manifest->background_color)); +} $manifest->display = getDolGlobalString('MAIN_MANIFEST_DISPLAY', "minimal-ui"); $manifest->splash_pages = null; $manifest->icons = array(); diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index e7913c9750c..cad40bcf1e5 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -175,8 +175,8 @@ if (($action == 'add' || $action == 'create') && empty($massaction) && !GETPOST( $sanit_features[$explode[0]] = $explode[1]; $tmp = new ProductCombination2ValuePair($db); - $tmp->fk_prod_attr = $explode[0]; - $tmp->fk_prod_attr_val = $explode[1]; + $tmp->fk_prod_attr = (int) $explode[0]; + $tmp->fk_prod_attr_val = (int) $explode[1]; $productCombination2ValuePairs1[] = $tmp; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index e25f1d4b2ab..700d2d0e995 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2746,6 +2746,10 @@ if ($action == 'generatesitemaps' && $usercanedit) { // Add the entry Sitemap: into the robot.txt file. $robotcontent = @file_get_contents($filerobot); + $result = preg_replace('/\n/ims', '', $robotcontent); + if ($result) { + $robotcontent = $result; + } $robotsitemap = "Sitemap: ".$domainname."/".$xmlname; $result = strpos($robotcontent, 'Sitemap: '); if ($result) {