Try fix CI

This commit is contained in:
ldestailleur
2025-07-29 11:04:32 +02:00
parent 5cf504fa90
commit d34e0b5305
3 changed files with 27 additions and 16 deletions

View File

@@ -23,9 +23,10 @@
* \brief Page to make custom reports. Page can also be used alone or as a tab among other tabs of an object
*
* To include this tool into another PHP page:
*
* define('USE_CUSTOM_REPORT_AS_INCLUDE', 1);
* define('MAIN_DO_NOT_USE_JQUERY_MULTISELECT', 1);
* define('MAIN_CUSTOM_REPORT_KEEP_GRAPH_ONLY', 1); // TODO Use a variable
* define('MAIN_CUSTOM_REPORT_KEEP_GRAPH_ONLY', 1); // TODO Use a variable
* $SHOWLEGEND = 0;
* $search_xaxis = array('t.column');
* $customreportkey='abc';
@@ -39,10 +40,11 @@
* @var Translate $langs
* @var User $user
*
* @var ?int[] $toselect Items selected on page, only used to see if not empty here
* @var ?int $SHOWLEGEND Show legend or not
* @var string $customreportkey Custom report key
* @var string $customsql Custom SQL
* @var ?int[] $toselect Items selected on page, only used to see if not empty here
* @var ?int $SHOWLEGEND Show legend or not
* @var string $customreportkey Custom report key
* @var string $customsql Custom SQL
* @var ?string[] $search_groupby Array with the third dimension
*/
'
@phan-var-force ?int[] $toselect
@@ -597,11 +599,11 @@ if (count($search_groupby)) {
//var_dump($arrayofvaluesforgroupby);exit;
$tmparray = dol_getdate(dol_now());
$endyear = $tmparray['year'];
$endmonth = $tmparray['mon'];
$datelastday = dol_get_last_day($endyear, $endmonth, 1);
$startyear = $endyear - 2;
//$tmparray = dol_getdate(dol_now());
//$endyear = $tmparray['year'];
//$endmonth = $tmparray['mon'];
//$datelastday = dol_get_last_day($endyear, $endmonth, 1);
//$startyear = $endyear - 2;
$param = '';
@@ -924,6 +926,7 @@ if (!empty($search_measures) && !empty($search_xaxis)) {
// Add LEFT JOIN for all tables mentioned into filter
if (!empty($search_component_params_hidden)) {
// Get all fields used into the filter
$matches = array();
preg_match_all('/\b(t[\w]*_[\w]*)\.(\w+(-\w+)?)/', $search_component_params_hidden, $matches);
$fieldsUsedInFilter = array_unique($matches[0]);

View File

@@ -52,6 +52,18 @@ if (!file_exists($conffile)) {
print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/index.php" instead of "/install/upgrade.php").';
}
require_once $conffile;
/**
* @var Conf $conf
* @var Translate $langs
*
* @var string $dolibarr_main_db_type
* @var string $dolibarr_main_db_host
* @var string $dolibarr_main_db_port
* @var string $dolibarr_main_db_name
* @var string $dolibarr_main_db_user
* @var string $dolibarr_main_db_pass
* @var string $dolibarr_main_document_root
*/
require_once $dolibarr_main_document_root.'/compta/facture/class/facture.class.php';
require_once $dolibarr_main_document_root.'/comm/propal/class/propal.class.php';
require_once $dolibarr_main_document_root.'/contrat/class/contrat.class.php';
@@ -64,13 +76,7 @@ require_once $dolibarr_main_document_root.'/core/lib/files.lib.php';
global $langs;
/**
* @var Conf $conf
* @var Translate $langs
*/
$grant_query = '';
$step = 2;
$error = 0;

View File

@@ -73,6 +73,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
* @var HookManager $hookmanager
* @var Societe $mysoc
* @var Translate $langs
*
* @var string $dolibarr_main_db_pass
*/
// Check parameters