diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index b436d3ce5d3a9..36791e8dce027 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -8196,12 +8196,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 14 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$from might not be defined\.$#' identifier: variable.undefined @@ -8220,12 +8214,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$month might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$newlang in empty\(\) always exists and is always falsy\.$#' identifier: empty.variable @@ -8256,12 +8244,6 @@ parameters: count: 1 path: ../../htdocs/core/actions_massactions.inc.php - - - message: '#^Variable \$year might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/core/actions_massactions.inc.php - - message: '#^Variable \$classfile might not be defined\.$#' identifier: variable.undefined @@ -17394,18 +17376,6 @@ parameters: count: 4 path: ../../htdocs/cron/class/cronjob.class.php - - - message: '#^Variable \$ExecTimeLimit in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/cron/class/cronjob.class.php - - - - message: '#^Variable \$MemoryLimit in empty\(\) always exists and is always falsy\.$#' - identifier: empty.variable - count: 1 - path: ../../htdocs/cron/class/cronjob.class.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -27816,12 +27786,6 @@ parameters: count: 2 path: ../../htdocs/projet/tasks.php - - - message: '#^Variable \$param might not be defined\.$#' - identifier: variable.undefined - count: 17 - path: ../../htdocs/projet/tasks.php - - message: '#^Variable \$permissiontodelete might not be defined\.$#' identifier: variable.undefined diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 376120d7981de..01cb2c58f1cc3 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -545,9 +545,9 @@ print getTitleFieldOfList($langs->trans('Action'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '')."\n"; print getTitleFieldOfList($langs->trans('Ref'), 0, $_SERVER["PHP_SELF"], 'ref_object', '', $param, '', $sortfield, $sortorder, '')."\n"; print getTitleFieldOfList($langs->trans('Amount'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ')."\n"; -print getTitleFieldOfList($langs->trans('DataOfArchivedEvent'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ', 0, $langs->trans('DataOfArchivedEventHelp').'
'.$langs->trans('DataOfArchivedEventHelp2'), 1)."\n"; +print getTitleFieldOfList($langs->trans('DataOfArchivedEvent'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ', 0, $langs->trans('DataOfArchivedEventHelp'), 1)."\n"; print getTitleFieldOfList($langs->trans('Fingerprint'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '')."\n"; -print getTitleFieldOfList($langs->trans('Status'), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; +print getTitleFieldOfList($form->textwithpicto($langs->trans('Status'), $langs->trans('DataOfArchivedEventHelp2')), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; //print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, '')."\n"; // Action column @@ -671,6 +671,8 @@ } else { //print $form->textwithpicto('', $langs->trans('KoCheckFingerprintValidity')); } + } else { + //print $form->textwithpicto('', $langs->trans('DataOfArchivedEventHelp2')); } if (getDolGlobalString('BLOCKEDLOG_USE_REMOTE_AUTHORITY') && getDolGlobalString('BLOCKEDLOG_AUTHORITY_URL')) { diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index b970612e1c544..eafe04365f765 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -543,7 +543,13 @@ public function setObjectData(&$object, $action, $amounts, $fuser = null) $lineid++; foreach ($tmpline as $keyline => $valueline) { if (!in_array($keyline, array( - 'ref', 'multicurrency_code', 'multicurrency_total_ht', 'multicurrency_total_tva', 'multicurrency_total_ttc', 'qty', 'product_type', 'product_label', 'vat_src_code', 'tva_tx', 'info_bits', 'localtax1_tx', 'localtax2_tx', 'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2' + 'ref', 'product_type', 'product_label', + 'qty', + 'subprice', + 'vat_src_code', 'tva_tx', 'localtax1_tx', 'localtax2_tx', + 'total_ht', 'total_tva', 'total_ttc', 'total_localtax1', 'total_localtax2', + 'multicurrency_code', 'multicurrency_total_ht', 'multicurrency_total_tva', 'multicurrency_total_ttc', + 'info_bits', 'special_code', ))) { continue; // Discard if not into a dedicated list } diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 94964dfae8e68..82a25fd2678c2 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -55,10 +55,13 @@ * @var ?string $objectlabel * @var ?string $option * @var ?int $deliveryreceipt + * @var string $action * @var string $massaction * @var string $objectclass * @var string $uploaddir * @var string $confirm + * @var string $month + * @var string $year * @var int $error */ ' diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 8c7524cd1a20e..b7f6f705ece29 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1387,7 +1387,7 @@ public function list_of_documents($filearray, $object, $modulepart, $param = '', // Show title of list of existing files $morehtmlright = ''; if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) { - $tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click(); }'; + $tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click();}void(0);'; $morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $permtoeditline); } @@ -2221,7 +2221,7 @@ public function listOfLinks($object, $permissiontodelete = 1, $action = null, $s $morehtmlright = ''; if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) { - $morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle();', '', $permissiontoedit); + $morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle(); void(0);', '', $permissiontoedit); } // Show list of associated links diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php index 3e6af0c8a20af..d79d844484cb2 100644 --- a/htdocs/core/tpl/list_print_total.tpl.php +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -23,6 +23,46 @@ */ '@phan-var-force array{nbfield:int,type?:array,pos?:array,val?:array} $totalarray'; +if (!function_exists('printTotalValCell')) { // allow two list with total on same screen + + /** print a total cell value according to its type + * + * @param string $type of field (duration, string..) + * @param string $val the value to display + * + * @return void (direct print) + */ + function printTotalValCell($type, $val) + { + // if $totalarray['type'] not present we consider it as number + if (empty($type)) { + $type = 'real'; + } + switch ($type) { + case 'duration': + print ''; + print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0); + print ''; + break; + case 'string': // This type is no more used. type is now varchar(x) + print ''; + print(!empty($val) ? $val : ''); + print ''; + break; + case 'stock': + print ''; + print price2num(!empty($val) ? $val : 0, 'MS'); + print ''; + break; + default: + print ''; + print price(!empty($val) ? $val : 0); + print ''; + break; + } + } +} + // Move fields of totalizable into the common array pos and val if (!empty($totalarray['totalizable']) && is_array($totalarray['totalizable'])) { foreach ($totalarray['totalizable'] as $keytotalizable => $valtotalizable) { @@ -107,40 +147,3 @@ } //print ''; } - -/** print a total cell value according to its type - * - * @param string $type of field (duration, string..) - * @param string $val the value to display - * - * @return void (direct print) - */ -function printTotalValCell($type, $val) -{ - // if $totalarray['type'] not present we consider it as number - if (empty($type)) { - $type = 'real'; - } - switch ($type) { - case 'duration': - print ''; - print(!empty($val) ? convertSecondToTime((int) $val, 'allhourmin') : 0); - print ''; - break; - case 'string': // This type is no more used. type is now varchar(x) - print ''; - print(!empty($val) ? $val : ''); - print ''; - break; - case 'stock': - print ''; - print price2num(!empty($val) ? $val : 0, 'MS'); - print ''; - break; - default: - print ''; - print price(!empty($val) ? $val : 0); - print ''; - break; - } -} diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index f7bb85395c8b1..b814567f71002 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1223,7 +1223,7 @@ public function run_jobs(string $userlogin) dol_syslog(get_class($this)."::run_jobs jobtype=".$this->jobtype." userlogin=".$userlogin, LOG_DEBUG); // Increase limit of time. Works only if we are not in safe mode - $ExecTimeLimit = 600; + $ExecTimeLimit = getDolGlobalInt('MAIN_CRON_EXEC_TIME_LIMIT', 600); if (!empty($ExecTimeLimit)) { $err = error_reporting(); error_reporting(0); // Disable all errors @@ -1231,7 +1231,7 @@ public function run_jobs(string $userlogin) @set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64 error_reporting($err); } - $MemoryLimit = 0; + $MemoryLimit = getDolGlobalString('MAIN_CRON_MEMORY_LIMIT'); if (!empty($MemoryLimit)) { @ini_set('memory_limit', $MemoryLimit); } diff --git a/htdocs/langs/en_US/blockedlog.lang b/htdocs/langs/en_US/blockedlog.lang index 9b74b8a787cfa..3b399063ad276 100644 --- a/htdocs/langs/en_US/blockedlog.lang +++ b/htdocs/langs/en_US/blockedlog.lang @@ -18,9 +18,9 @@ BlockedlogInfoDialog=Log Details ListOfTrackedEvents=List of tracked events Fingerprint=Fingerprint DownloadLogCSV=Export archived logs (CSV) -DataOfArchivedEvent=Full data of archived event -DataOfArchivedEventHelp=This field contains the unalterable and structured data that was archived on real time. Even if some parent business event could have been purged or modified, the data archived here is the original data, and it can't be modified. -DataOfArchivedEventHelp2=Its integrity is guaranteed if the status of the line is OK +DataOfArchivedEvent=Complementary data of archived event +DataOfArchivedEventHelp=This field contains the complementary data that was archived on real time. Even if some parent business event could have been purged or modified, the data archived here is the original data, and it can't be modified. +DataOfArchivedEventHelp2=The integrity of data on each lines is guaranteed if the status of the line is OK ImpossibleToReloadObject=Original object (type %s, id %s) not linked (see 'Full datas' column to get unalterable saved data) BlockedLogAreRequiredByYourCountryLegislation=Unalterable Logs module may be required by the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they can not be validated by a tax audit. BlockedLogActivatedBecauseRequiredByYourCountryLegislation=Unalterable Logs module was activated because of the legislation of your country. Disabling this module may render any future transactions invalid with respect to the law and the use of legal software as they cannot be validated by a tax audit. diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 6df3685b01a50..7d41c983205fa 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -448,6 +448,7 @@ llxHeader("", $title, $help_url, '', 0, 0, '', '', '', 'mod-project page-card_tasks'); $arrayofselected = is_array($toselect) ? $toselect : array(); +$param = ''; if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref);