From 3d5b322d9866987e5188bc85d02ede84509e063f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 May 2022 16:27:42 +0200 Subject: [PATCH] Debug v16 --- htdocs/comm/action/list.php | 19 ++++++++++--------- htdocs/core/modules/action/rapport.pdf.php | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 2e80a92acd1..34dd94664e7 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -276,6 +276,10 @@ $form = new Form($db); $userstatic = new User($db); $formactions = new FormActions($db); +$actionstatic = new ActionComm($db); +$societestatic = new Societe($db); +$contactstatic = new Contact($db); + $nav = ''; $nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); $nav .= ' '; @@ -597,12 +601,6 @@ if (!$resql) { $num = $db->num_rows($resql); - -$actionstatic = new ActionComm($db); -$societestatic = new Societe($db); - -$num = $db->num_rows($resql); - $arrayofselected = is_array($toselect) ? $toselect : array(); // Local calendar @@ -864,18 +862,21 @@ print $hookmanager->resPrint; if (!empty($arrayfields['a.datec']['checked'])) { print_liste_field_titre($arrayfields['a.datec']['label'], $_SERVER["PHP_SELF"], "a.datec,a.id", $param, "", 'align="center"', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['a.tms']['checked'])) { print_liste_field_titre($arrayfields['a.tms']['label'], $_SERVER["PHP_SELF"], "a.tms,a.id", $param, "", 'align="center"', $sortfield, $sortorder); + $totalarray['nbfield']++; } if (!empty($arrayfields['a.percent']['checked'])) { print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "a.percent", $param, "", 'align="center"', $sortfield, $sortorder); + $totalarray['nbfield']++; } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); +$totalarray['nbfield']++; print "\n"; -$contactstatic = new Contact($db); $now = dol_now(); $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60; @@ -895,10 +896,10 @@ while ($i < $imaxinloop) { if (empty($obj)) { break; // Should not happen } - + // Store properties in $object $object->setVarsFromFetchObj($obj); - + // Discard auto action if option is on if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->type_code == 'AC_OTH_AUTO') { $i++; diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php index 3626b36d7e3..2b4ec29c880 100644 --- a/htdocs/core/modules/action/rapport.pdf.php +++ b/htdocs/core/modules/action/rapport.pdf.php @@ -133,7 +133,7 @@ class CommActionRapport $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products")); $dir = $conf->agenda->dir_temp."/"; - $file = $dir."actions-".$this->month."-".$this->year.".pdf"; + $file = $dir."actions-".sprintf("%02d", $this->month)."-".sprintf("%04d", $this->year).".pdf"; if (!file_exists($dir)) { if (dol_mkdir($dir) < 0) {