From eebe5e2ddd30e06472781fbc819a9e182a8c4114 Mon Sep 17 00:00:00 2001 From: pek5892 Date: Thu, 6 Jun 2024 11:20:30 +0200 Subject: [PATCH] Fix widget stampa calendario --- templates/dashboard/body.php | 8 +++++--- templates/dashboard_settimanale/body.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/templates/dashboard/body.php b/templates/dashboard/body.php index ed8d3512c..1caca482c 100755 --- a/templates/dashboard/body.php +++ b/templates/dashboard/body.php @@ -78,7 +78,8 @@ $stati = (array) $calendar['idstatiintervento']; $tipi = (array) $calendar['idtipiintervento']; $tecnici = (array) $calendar['idtecnici']; -$query = "SELECT +$query = " + SELECT DATE(`orario_inizio`) AS data, `an_anagrafiche`.`ragione_sociale` AS anagrafica, GROUP_CONCAT(DISTINCT `tecnico`.`ragione_sociale` SEPARATOR ', ') AS tecnico @@ -86,7 +87,7 @@ $query = "SELECT `in_interventi_tecnici` INNER JOIN `in_interventi` ON `in_interventi_tecnici`.`idintervento`=`in_interventi`.`id` INNER JOIN `an_anagrafiche` ON `in_interventi`.`idanagrafica`=`an_anagrafiche`.`idanagrafica` - LEFT JOIN `an_anagrafiche AS tecnico ON `in_interventi_tecnici`.`idtecnico`=`tecnico`.`idanagrafica` + LEFT JOIN `an_anagrafiche` AS tecnico ON `in_interventi_tecnici`.`idtecnico`=`tecnico`.`idanagrafica` INNER JOIN `in_statiintervento` ON `in_interventi`.`idstatointervento`=`in_statiintervento`.`id` WHERE ".$where.' @@ -95,6 +96,7 @@ $query = "SELECT `in_interventi_tecnici`.`idtipointervento` IN('.implode(',', $tipi).') '.Modules::getAdditionalsQuery('Interventi').' GROUP BY `in_interventi`.`id`, data'; + $sessioni = $dbo->fetchArray($query); $sessioni = collect($sessioni)->groupBy('data'); @@ -154,7 +156,7 @@ for ($i = 0; $i < $count; $i = $i + 7) { $element = $list[$i + $c]; echo ' - '.ucfirst($element['date']->isoFormat('MMMM YYYY')).''; + '.ucfirst($element['date']->translatedFormat('d/m')).''; } echo ' diff --git a/templates/dashboard_settimanale/body.php b/templates/dashboard_settimanale/body.php index 2a246463a..3d98baaf2 100644 --- a/templates/dashboard_settimanale/body.php +++ b/templates/dashboard_settimanale/body.php @@ -125,7 +125,7 @@ for ($i = 0; $i < $count; $i = $i + 7) { $element = $list[$i + $c]; echo ' -
'.ucfirst($element['date']->isoFormat('MMMM YYYY')).'
'; +
'.ucfirst($element['date']->translatedFormat('d')).'
'; } echo '