mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-18 04:20:50 +01:00
Aggiunta visualizzazione all day per i preventivi in dashboard
This commit is contained in:
parent
992227d838
commit
41a7d98f5e
@ -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.
|
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.23 (2021-05-18)](#2423-2021-05-18)
|
||||||
- [2.4.22 (2021-03-01)](#2422-2021-03-01)
|
- [2.4.22 (2021-03-01)](#2422-2021-03-01)
|
||||||
- [2.4.21 (2021-01-14)](#2421-2021-01-14)
|
- [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.2 (2016-11-10)](#22-2016-11-10)
|
||||||
- [2.1 (2015-04-02)](#21-2015-04-02)
|
- [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)
|
## 2.4.23 (2021-05-18)
|
||||||
|
|
||||||
### Aggiunto (Added)
|
### Aggiunto (Added)
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
|
||||||
$modulo_interventi = Modules::get('Interventi');
|
$modulo_interventi = Modules::get('Interventi');
|
||||||
|
$modulo_preventivi = Modules::get('Preventivi');
|
||||||
|
|
||||||
if (!isset($user['idanagrafica'])) {
|
if (!isset($user['idanagrafica'])) {
|
||||||
$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' => '<b>Prev. '.$sessione['numero'].'</b> '.$sessione['nome'].''.(($sessione['have_attachments']) ? '<i class="fa fa-paperclip" aria-hidden="true"></i>' : '').'<br><b>'.tr('Cliente').':</b> '.$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' => '<b>Prev. '.$sessione['numero'].'</b> '.$sessione['nome'].''.(($sessione['have_attachments']) ? '<i class="fa fa-paperclip" aria-hidden="true"></i>' : '').'<br><b>'.tr('Cliente').':</b> '.$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);
|
echo json_encode($results);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -518,7 +518,7 @@ echo '
|
|||||||
lazyFetching: true,
|
lazyFetching: true,
|
||||||
selectMirror: true,
|
selectMirror: true,
|
||||||
eventLimit: false, // allow "more" link when too many events
|
eventLimit: false, // allow "more" link when too many events
|
||||||
allDaySlot: false,
|
allDaySlot: true,
|
||||||
|
|
||||||
loading: function (isLoading, view) {
|
loading: function (isLoading, view) {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user