diff --git a/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php b/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php index af8165d..9a9cd0f 100644 --- a/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php +++ b/core/modules/dolisirh/dolisirhdocuments/certificatedocument/doc_certificatedocument_odt.modules.php @@ -35,17 +35,6 @@ */ class doc_certificatedocument_odt extends SaturneDocumentModel { - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = [7, 4]; - - /** - * @var string Dolibarr version of the loaded document. - */ - public string $version = 'dolibarr'; - /** * @var string Module. */ diff --git a/core/modules/dolisirh/dolisirhdocuments/projectdocument/doc_projectdocument_odt.modules.php b/core/modules/dolisirh/dolisirhdocuments/projectdocument/doc_projectdocument_odt.modules.php index 120f968..89c11d0 100644 --- a/core/modules/dolisirh/dolisirhdocuments/projectdocument/doc_projectdocument_odt.modules.php +++ b/core/modules/dolisirh/dolisirhdocuments/projectdocument/doc_projectdocument_odt.modules.php @@ -43,17 +43,6 @@ */ class doc_projectdocument_odt extends SaturneDocumentModel { - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = [7, 4]; - - /** - * @var string Dolibarr version of the loaded document. - */ - public string $version = 'dolibarr'; - /** * @var string Module. */ @@ -126,7 +115,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('projectUsers'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; $listLines = ''; @@ -172,7 +161,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('projectTasks'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; $listLines = ''; @@ -204,7 +193,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('projectTaskTimespents'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; $listLines = ''; @@ -250,7 +239,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('projectExtrafields'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; $listLines = ''; diff --git a/core/modules/dolisirh/dolisirhdocuments/timesheetdocument/doc_timesheetdocument_odt.modules.php b/core/modules/dolisirh/dolisirhdocuments/timesheetdocument/doc_timesheetdocument_odt.modules.php index c29c231..144aebd 100644 --- a/core/modules/dolisirh/dolisirhdocuments/timesheetdocument/doc_timesheetdocument_odt.modules.php +++ b/core/modules/dolisirh/dolisirhdocuments/timesheetdocument/doc_timesheetdocument_odt.modules.php @@ -41,17 +41,6 @@ */ class doc_timesheetdocument_odt extends SaturneDocumentModel { - /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = [7, 4]; - - /** - * @var string Dolibarr version of the loaded document. - */ - public string $version = 'dolibarr'; - /** * @var string Module. */ @@ -137,7 +126,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('days'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; $listLines = ''; @@ -163,7 +152,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('times'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; $listLines = ''; @@ -218,7 +207,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment($segment[0][$i]); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; dol_syslog($e->getMessage()); @@ -246,7 +235,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('totalrhs'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; dol_syslog($e->getMessage()); @@ -270,7 +259,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('totaltimes'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; dol_syslog($e->getMessage()); @@ -295,7 +284,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('totaltpss'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; dol_syslog($e->getMessage()); @@ -321,7 +310,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('tas'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; dol_syslog($e->getMessage()); @@ -347,7 +336,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('diffs'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; dol_syslog($e->getMessage()); @@ -372,7 +361,7 @@ public function fillTagsLines(Odf $odfHandler, Translate $outputLangs, array $mo $foundTagForLines = 1; try { $listLines = $odfHandler->setSegment('timesheetdet'); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template. $foundTagForLines = 0; dol_syslog($e->getMessage()); diff --git a/view/workinghours_card.php b/view/workinghours_card.php index ba188dd..57950e9 100644 --- a/view/workinghours_card.php +++ b/view/workinghours_card.php @@ -254,6 +254,7 @@ print ''; // Buid current user hierarchy +$usertmphierarchy = []; if ($usertmp->fk_user > 0) { $usertmphierarchy = array($usertmp->fk_user); $usertmpboss = new User($object->db);