diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e54a954b..71deac966 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@ Tutti i maggiori cambiamenti di questo progetto saranno documentati in questo fi
Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://keepachangelog.com/), e il progetto segue il [Semantic Versioning](http://semver.org/) per definire le versioni delle release.
+- [2.4.24 (2021-00-00)](#2424-2021-00-00)
- [2.4.23 (2021-05-18)](#2423-2021-05-18)
- [2.4.22 (2021-03-01)](#2422-2021-03-01)
- [2.4.21 (2021-01-14)](#2421-2021-01-14)
@@ -34,6 +35,14 @@ Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://k
- [2.2 (2016-11-10)](#22-2016-11-10)
- [2.1 (2015-04-02)](#21-2015-04-02)
+## 2.4.24 (2021-00-00)
+
+### Aggiunto (Added)
+ - Aggiunta nel calendario della Dashboard visualizzazione dei preventivi pianificabili in corrispondenza alla data di accettazione e conclusione.
+
+### Fixed
+ -
+
## 2.4.23 (2021-05-18)
### Aggiunto (Added)
diff --git a/modules/dashboard/actions.php b/modules/dashboard/actions.php
index 47482a0b9..fd81aa61f 100755
--- a/modules/dashboard/actions.php
+++ b/modules/dashboard/actions.php
@@ -20,6 +20,7 @@
include_once __DIR__.'/../../core.php';
$modulo_interventi = Modules::get('Interventi');
+$modulo_preventivi = Modules::get('Preventivi');
if (!isset($user['idanagrafica'])) {
$user['idanagrafica'] = '';
@@ -107,6 +108,59 @@ switch (filter('op')) {
];
}
+ $query = 'SELECT
+ co_preventivi.id,
+ co_preventivi.nome,
+ co_preventivi.numero,
+ co_preventivi.data_accettazione,
+ co_preventivi.data_conclusione,
+ (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica = co_preventivi.idanagrafica) AS cliente,
+ (SELECT id FROM zz_files WHERE id_record = co_preventivi.id AND id_module = '.prepare($modulo_preventivi->id).' LIMIT 1) AS have_attachments
+ FROM co_preventivi
+ LEFT JOIN co_statipreventivi ON co_preventivi.idstato = co_statipreventivi.id
+ WHERE
+ (
+ (co_preventivi.data_accettazione >= '.prepare($start).' AND co_preventivi.data_accettazione <= '.prepare($end).')
+ OR (co_preventivi.data_conclusione >= '.prepare($start).' AND co_preventivi.data_conclusione <= '.prepare($end).')
+ )
+ AND
+ co_statipreventivi.is_pianificabile=1';
+ $sessioni = $dbo->fetchArray($query);
+
+ foreach ($sessioni as $sessione) {
+ if(!empty($sessione['data_accettazione']) && $sessione['data_accettazione']!='0000-00-00'){
+ $results[] = [
+ 'id' => $sessione['id'],
+ 'idintervento' => $sessione['id'],
+ 'idtecnico' => "",
+ 'title' => 'Prev. '.$sessione['numero'].' '.$sessione['nome'].''.(($sessione['have_attachments']) ? '' : '').'
'.tr('Cliente').': '.$sessione['cliente'],
+ 'start' => $sessione['data_accettazione'],
+ 'end' => $sessione['data_accettazione'],
+ 'url' => base_path().'/editor.php?id_module='.$modulo_preventivi->id.'&id_record='.$sessione['id'],
+ 'backgroundColor' => "#ff7f50",
+ 'textColor' => color_inverse("#ff7f50"),
+ 'borderColor' => "#ff7f50",
+ 'allDay' => true,
+ ];
+ }
+
+ if($sessione['data_accettazione'] != $sessione['data_conclusione'] && $sessione['data_conclusione']!='0000-00-00' && !empty($sessione['data_conclusione']) ){
+ $results[] = [
+ 'id' => $sessione['id'],
+ 'idintervento' => $sessione['id'],
+ 'idtecnico' => "",
+ 'title' => 'Prev. '.$sessione['numero'].' '.$sessione['nome'].''.(($sessione['have_attachments']) ? '' : '').'
'.tr('Cliente').': '.$sessione['cliente'],
+ 'start' => $sessione['data_conclusione'],
+ 'end' => $sessione['data_conclusione'],
+ 'url' => base_path().'/editor.php?id_module='.$modulo_preventivi->id.'&id_record='.$sessione['id'],
+ 'backgroundColor' => "#ff7f50",
+ 'textColor' => color_inverse("#ff7f50"),
+ 'borderColor' => "#ff7f50",
+ 'allDay' => true,
+ ];
+ }
+ }
+
echo json_encode($results);
break;
diff --git a/modules/dashboard/edit.php b/modules/dashboard/edit.php
index f7436294b..a6c1f97c6 100755
--- a/modules/dashboard/edit.php
+++ b/modules/dashboard/edit.php
@@ -518,7 +518,7 @@ echo '
lazyFetching: true,
selectMirror: true,
eventLimit: false, // allow "more" link when too many events
- allDaySlot: false,
+ allDaySlot: true,
loading: function (isLoading, view) {
if (isLoading) {