Compare commits

..

7 Commits

Author SHA1 Message Date
Pek5892 432d781ce2 Fix update campi in viste 2024-05-03 14:51:07 +02:00
Pek5892 063337f9cb Fix stato intervento 2024-05-03 14:45:21 +02:00
Pek5892 dac7d5f5cd Fix query vista Attività 2024-05-03 14:42:56 +02:00
Pek5892 bcf6c7a142 Fix caricamento allegati in interventi 2024-05-03 14:42:39 +02:00
Pek5892 8fc4ccc7be Fix ddt 2024-05-03 12:15:09 +02:00
Pek5892 cf917bd94f Aggiunta Tags in Attività 2024-05-03 11:06:25 +02:00
Pek5892 07e326bd9f Fix attività 2024-05-03 09:50:33 +02:00
24 changed files with 347 additions and 78 deletions

View File

@ -27,7 +27,7 @@ echo '
<p>'.tr('Trascina le colonne per ordinare la struttura della tabella principale, seleziona e deseleziona le colonne per renderle visibili o meno').'.</p>
<div class="sortable">';
$fields = $dbo->fetchArray('SELECT *, (SELECT GROUP_CONCAT(`zz_groups_lang`.`title`) FROM `zz_group_view` INNER JOIN `zz_groups` ON `zz_group_view`.`id_gruppo` = `zz_groups`.`id` LEFT JOIN `zz_groups_lang` ON (`zz_groups`.`id` = `zz_groups_lang`.`id_record` AND `zz_groups_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `zz_group_view`.`id_vista` = `zz_views`.`id`) AS gruppi_con_accesso FROM `zz_views` LEFT JOIN `zz_views_lang` ON (`zz_views`.`id` = `zz_views_lang`.`id_record` AND `zz_views_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `id_module`='.prepare($id_module).' ORDER BY `order` ASC');
$fields = $dbo->fetchArray('SELECT `zz_views`.*, (SELECT GROUP_CONCAT(`zz_groups_lang`.`title`) FROM `zz_group_view` INNER JOIN `zz_groups` ON `zz_group_view`.`id_gruppo` = `zz_groups`.`id` LEFT JOIN `zz_groups_lang` ON (`zz_groups`.`id` = `zz_groups_lang`.`id_record` AND `zz_groups_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `zz_group_view`.`id_vista` = `zz_views`.`id`) AS gruppi_con_accesso FROM `zz_views` LEFT JOIN `zz_views_lang` ON (`zz_views`.`id` = `zz_views_lang`.`id_record` AND `zz_views_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `id_module`='.prepare($id_module).' ORDER BY `order` ASC');
foreach ($fields as $field) {
echo '
<div class="panel panel-default clickable col-md-4" data-id="'.$field['id'].'">

View File

@ -799,7 +799,7 @@ if (!empty($elementi)) {
} elseif (in_array($elemento['tipo_documento'], ['Ordine cliente', 'Ordine fornitore'])) {
$modulo = ($elemento['dir'] == 'entrata') ? 'Ordini cliente' : 'Ordini fornitore';
} elseif (in_array($elemento['tipo_documento'], ['Ddt in uscita', 'Ddt in entrata'])) {
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt di vendita' : 'Ddt di acquisto';
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt in uscita' : 'Ddt in entrata';
} else {
$modulo = ($elemento['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto';
}

View File

@ -48,7 +48,7 @@ $id_anagrafica = $documento_finale->idanagrafica;
echo '
<div class="row">
<div class="col-md-12">
{[ "type": "select", "label": "'.tr('Ddt').'", "name": "id_documento", "values": "query=SELECT `dt_ddt`.`id`, CONCAT(IF(`numero_esterno` != \'\', `numero_esterno`, `numero`), \' del \', DATE_FORMAT(`data`, \'%d-%m-%Y\')) AS descrizione FROM `dt_ddt` INNER JOIN `dt_statiddt` ON `ddt`.`idstato` = `dt_statiddt`.`id` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') INNER JOIN `dt_tipiddt` ON `dt_ddt`.`idtipoddt` = `dt_tipiddt`.`id` INNER JOIN `dt_righe_ddt` ON `dt_ddt`.`id` = `dt_righe_ddt`.`idddt` WHERE `dt_statiddt_lang`.`title` IN("Evaso", "Parzialmente evaso", "Parzialmente fatturato") AND `dt_tipiddt`.`dir`=\''.($dir == 'entrata' ? 'uscita' : 'entrata').'\' AND (`dt_righe_ddt`.`qta` - `dt_righe_ddt`.`qta_evasa`) > 0 ORDER BY `data` DESC, `numero` DESC" ]}
{[ "type": "select", "label": "'.tr('Ddt').'", "name": "id_documento", "values": "query=SELECT `dt_ddt`.`id`, CONCAT(IF(`numero_esterno` != \'\', `numero_esterno`, `numero`), \' del \', DATE_FORMAT(`data`, \'%d-%m-%Y\')) AS descrizione FROM `dt_ddt` INNER JOIN `dt_statiddt` ON `dt_ddt`.`idstatoddt` = `dt_statiddt`.`id` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') INNER JOIN `dt_tipiddt` ON `dt_ddt`.`idtipoddt` = `dt_tipiddt`.`id` INNER JOIN `dt_righe_ddt` ON `dt_ddt`.`id` = `dt_righe_ddt`.`idddt` WHERE `dt_statiddt_lang`.`title` IN(\'Evaso\', \'Parzialmente evaso\', \'Parzialmente fatturato\') AND `dt_tipiddt`.`dir`='.prepare($dir == "entrata" ? "uscita" : "entrata").' AND (`dt_righe_ddt`.`qta` - `dt_righe_ddt`.`qta_evasa`) > 0 ORDER BY `data` DESC, `numero` DESC" ]}
</div>
</div>

View File

@ -45,7 +45,7 @@ $rs = $dbo->fetchArray($query);
foreach ($rs as $r) {
$result = [];
$module = ($r['dir'] == 'uscita') ? 'Ddt di acquisto' : 'Ddt di vendita';
$module = ($r['dir'] == 'uscita') ? 'Ddt in entrata' : 'Ddt in uscita';
$link_id = (new Module())->getByField('title', $module, Models\Locale::getPredefined()->id);
$numero = empty($r['numero_esterno']) ? $r['numero'] : $r['numero_esterno'];

View File

@ -27,6 +27,8 @@ include_once __DIR__.'/../../core.php';
$block_edit = $record['flag_completato'];
$id_segment = $record['id_segment'];
if ($dir == 'entrata') {
$numero_previsto = verifica_numero_ddt($ddt, $id_segment);
if (!empty($numero_previsto)) {

View File

@ -114,7 +114,7 @@ class DDT extends Document
*/
public function getModuleAttribute()
{
return $this->direzione == 'entrata' ? 'Ddt di vendita' : 'DDT di acquisto';
return $this->direzione == 'entrata' ? 'Ddt in uscita' : 'DDT in entrata';
}
public function getDirezioneAttribute()

View File

@ -50,7 +50,7 @@ $id_anagrafica = $documento_finale->idanagrafica;
echo '
<div class="row">
<div class="col-md-12">
{[ "type": "select", "label": "'.tr('Ddt').'", "name": "id_documento", "values": "query=SELECT `dt_ddt`.`id`, CONCAT(\'DDT num. \', IF(`numero_esterno` != \'\', `numero_esterno`, `numero`), \' del \', DATE_FORMAT(`data`, \'%d-%m-%Y\'), \' [\', `dt_statiddt_lang`.`title`, \']\') AS descrizione FROM `dt_ddt` LEFT JOIN `dt_causalet` ON `dt_causalet`.`id` = `dt_ddt`.`idcausalet` INNER JOIN `dt_statiddt` ON `dt_ddt`.`idstato` = `dt_statiddt`.`id` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') INNER JOIN `dt_tipiddt` ON `dt_ddt`.`idtipoddt` = `dt_tipiddt`.`id` INNER JOIN `dt_righe_ddt ON `dt_ddt`.`id` = `dt_righe_ddt`.`idddt` WHERE `idanagrafica`='.prepare($id_anagrafica).' AND `dt_statiddt_lang`.`title` IN("Evaso", "Parzialmente evaso", "Parzialmente fatturato") AND `dt_tipiddt`.`dir`=\''.prepare($dir).'\' AND `dt_causalet`.`is_importabile` = 1 AND (`dt_righe_ddt`.`qta` - `dt_righe_ddt`.`qta_evasa`) > 0 ORDER BY `data` DESC, `numero` DESC" ]}
{[ "type": "select", "label": "'.tr('Ddt').'", "name": "id_documento", "values": "query=SELECT `dt_ddt`.`id`, CONCAT(\'DDT num. \', IF(`numero_esterno` != \'\', `numero_esterno`, `numero`), \' del \', DATE_FORMAT(`data`, \'%d-%m-%Y\'), \' [\', `dt_statiddt_lang`.`title`, \']\') AS descrizione FROM `dt_ddt` LEFT JOIN `dt_causalet` ON `dt_causalet`.`id` = `dt_ddt`.`idcausalet` INNER JOIN `dt_statiddt` ON `dt_ddt`.`idstatoddt` = `dt_statiddt`.`id` LEFT JOIN `dt_statiddt_lang` ON (`dt_statiddt`.`id` = `dt_statiddt_lang`.`id_record` AND `dt_statiddt_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') INNER JOIN `dt_tipiddt` ON `dt_ddt`.`idtipoddt` = `dt_tipiddt`.`id` INNER JOIN `dt_righe_ddt ON `dt_ddt`.`id` = `dt_righe_ddt`.`idddt` WHERE `idanagrafica`='.prepare($id_anagrafica).' AND `dt_statiddt_lang`.`title` IN("Evaso", "Parzialmente evaso", "Parzialmente fatturato") AND `dt_tipiddt`.`dir`='.prepare($dir).' AND `dt_causalet`.`is_importabile` = 1 AND (`dt_righe_ddt`.`qta` - `dt_righe_ddt`.`qta_evasa`) > 0 ORDER BY `data` DESC, `numero` DESC" ]}
</div>
</div>

View File

@ -68,7 +68,7 @@ $data = [
// Individuazione delle tabelle interessate
if (in_array($module->getTranslation('title'), ['Fatture di vendita', 'Fatture di acquisto'])) {
$modulo = 'fat';
} elseif (in_array($module->getTranslation('title'), ['Ddt di vendita', 'Ddt di acquisto'])) {
} elseif (in_array($module->getTranslation('title'), ['Ddt in uscita', 'Ddt in entrata'])) {
$modulo = 'ddt';
$ddt = DDT::find($id_record);
$is_rientrabile = $database->fetchOne('SELECT * FROM `dt_causalet` WHERE `id` = '.prepare($ddt->idcausalet))['is_rientrabile'];
@ -153,7 +153,7 @@ if ($dir == 'entrata') {
$modulo = 'Interventi';
$pos = 'int';
} elseif (!empty($res[0]['id_riga_ddt'])) {
$modulo = 'Ddt di vendita';
$modulo = 'Ddt in uscita';
$pos = 'ddt';
} elseif (!empty($res[0]['id_riga_documento'])) {
$modulo = 'Fatture di vendita';

View File

@ -82,6 +82,27 @@ switch (post('op')) {
$intervento->codice_cig = post('codice_cig');
$intervento->save();
$tags = $dbo->select('in_interventi_tags', 'id_tag', [], ['id_intervento' => $intervento->id]);
$tags_presenti = [];
foreach ($tags as $tag) {
$tags_presenti[] = $tag['id_tag'];
}
$tags = post('tags');
$tags_presenti = [];
foreach ($tags as $tag) {
$tags_presenti[]= $tag;
}
// Assegnazione dei tecnici all'intervento
$dbo->sync('in_interventi_tags', [
'id_intervento' => $id_record,
], [
'id_tag' => $tags_presenti,
]);
$tecnici_presenti_array = $dbo->select('in_interventi_tecnici_assegnati', 'id_tecnico', [], ['id_intervento' => $intervento->id]);
$tecnici_presenti = [];

View File

@ -41,7 +41,7 @@ if (get('documento') == 'fattura') {
$op = 'add_documento';
$tipo_documento_finale = Ordine::class;
} else {
$final_module = 'Ddt di vendita';
$final_module = 'Ddt in uscita';
$op = 'add_documento';
$tipo_documento_finale = DDT::class;
}

View File

@ -60,6 +60,10 @@ if ($next) {
'.tr('Successivo').' <i class="fa fa-arrow-circle-right"></i>
</a>';
}
$tags = $database->fetchArray('SELECT `id_tag` FROM `in_interventi_tags` WHERE id_intervento = '.prepare($id_record));
$tags = $tags ? array_column($tags, 'id_tag') : [];
echo '
</div>
</div>
@ -69,6 +73,14 @@ echo '
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="id_record" value="'.$id_record.'">
<div class="row">
<div class="col-md-4">
{[ "type": "select", "label": "'.tr('Tags').'", "multiple": "1", "name": "tags[]", "values": "query=SELECT `id`, `name` as descrizione FROM `in_tags` ORDER BY `name`", "value": "'.implode(',', $tags).'", "icon-after": "add|'.(new Module())->getByField('title', 'Tags').'|" ]}
</div>
<div class="col-md-4 col-md-offset-4">
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatointervento", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` ='.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "value": "$idstatointervento$", "class": "unblockable" ]}
</div>
</div>
<div class="row">
<div class="col-md-12">
<!-- DATI CLIENTE -->

View File

@ -26,6 +26,8 @@ use Modules\Anagrafiche\Sede;
use Modules\Contratti\Contratto;
use Modules\Interventi\Intervento;
use Modules\Scadenzario\Scadenza;
use Modules\Preventivi\Preventivo;
use Modules\Ordini\Ordine;
// Anagrafica
$anagrafica = $intervento->anagrafica;
@ -53,7 +55,7 @@ if ($intervento->id_contratto) {
$contratto = Contratto::find($intervento->id_contratto);
$ore_erogate = $contratto->interventi->sum('ore_totali');
$ore_previste = $contratto->getRighe()->where('um', 'ore')->sum('qta');
$perc_ore = ($ore_erogate * 100) / $ore_previste;
$perc_ore = $ore_previste != 0 ? ($ore_erogate * 100) / $ore_previste : 0;
if ($perc_ore < 75) {
$color = 'success';
} elseif ($perc_ore <= 100) {
@ -61,6 +63,17 @@ if ($intervento->id_contratto) {
}
}
// Preventivo
$preventivo = null;
if ($intervento->id_preventivo) {
$preventivo = Preventivo::find($intervento->id_preventivo);
}
// Ordine
$ordine = null;
if ($intervento->id_ordine) {
$ordine = Ordine::find($intervento->id_ordine);
}
// Altre attività
$interventi_programmati = Intervento::select('in_interventi.*')
@ -89,7 +102,7 @@ echo '
// Cliente
echo '
<div class="col-md-4">
<div class="col-md-3">
<h4 style="margin:4px 0;"><b>'.$anagrafica->ragione_sociale.'</b></h4>
<p style="margin:3px 0;">
@ -110,42 +123,56 @@ echo '
// Panoramica
echo '
<div class="col-md-4">
<div class="box box-default">
<div class="box box-info">
<div class="box-header">
<h3 class="box-title"><i class="fa fa-map"></i> '.tr('Panoramica').'</h3>
</div>
<div class="box-body">
<p style="margin:3px 0;"><i class="fa fa-'.($insoluti ? 'check text-success' : 'times text-danger').'"></i>
<b>'.tr('Insoluti').'</b>
<p style="margin:3px 0;"><i class="fa fa-'.($insoluti ? 'warning text-danger' : 'check text-success').'"></i>
'.($insoluti ? tr('Sono presenti insoluti') : tr('Non sono presenti insoluti')).'
</p>
<p style="margin:3px 0;"><i class="fa '.(count($interventi_programmati) == 0 ? 'fa-check text-success' : 'fa-clock-o text-warning').'"></i> <b>'.tr('Altre attività programmate').'</b>';
if (count($interventi_programmati) == 0) {
echo ': <span class="text-muted">'.tr('nessuna').'</span>';
} else {
<p style="margin:3px 0;"><i class="fa '.(count($interventi_programmati) == 0 ? 'fa-clock-o text-success' : 'fa-clock-o text-warning').'"></i> '.(count($interventi_programmati) == 0 ? tr('Non sono presenti altre attività programmate') : 'Sono presenti altre attività programmate');
if (count($interventi_programmati) != 0) {
foreach ($interventi_programmati as $intervento_programmato) {
echo ' <a class="btn btn-default btn-xs" href="'.base_path().'/editor.php?id_module='.Modules::get('Interventi')['id'].'&id_record='.$intervento_programmato->id.'" target="_blank">'.$intervento_programmato->codice.'</a>';
}
}
echo '
</p>
<p style="margin:3px 0;"><i class="fa fa-'.($contratto ? 'check text-success' : 'times text-danger').'"></i>
<b>'.tr('Contratto attivo').'</b> '.($contratto ? '<a class="btn btn-default btn-xs" href="'.base_path().'/editor.php?id_module='.Modules::get('Contratti')['id'].'&id_record='.$contratto->id.'" target="_blank">'.$contratto->numero.'</a>' : '').'
</p>';
// Contratto
if ($contratto) {
echo'
<p style="margin:3px 0;"><i class="fa fa-book text-info"></i>
'.tr('Contratto collegato').':</b> <a class="btn btn-default btn-xs" href="'.base_path().'/editor.php?id_module='.(new Module())->getByField('title', 'Contratti').'&id_record='.$contratto->id.'" target="_blank">'.$contratto->numero.'</a>';
if ($ore_previste > 0) {
echo '
- '. tr('Ore erogate').':</b> '.$ore_erogate.'/'.$ore_previste.'<br>
if ($ore_previste > 0) {
echo '
<div style="margin:3px 0 6px; width:300px;">
<b>'.tr('Ore erogate').':</b> '.$ore_erogate.'/'.$ore_previste.'<br>
<div class="progress" style="margin:0; height:8px;">
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ore.'%"></div>
</div>
</div>';
<div class="progress" style="margin:0; height:8px;">
<div class="progress-bar progress-bar-'.$color.'" style="width:'.$perc_ore.'%"></div>
</div>
</p>';
}
}
echo '
// Preventivo
if ($preventivo) {
echo '
<p style="margin:3px 0;"><i class="fa fa-book text-info"></i>
'.tr('Preventivo collegato').':</b> <a class="btn btn-default btn-xs" href="'.base_path().'/editor.php?id_module='.(new Module())->getByField('title', 'Preventivi').'&id_record='.$preventivo->id.'" target="_blank">'.$preventivo->numero.'</a>
</p>';
}
// Ordine
if($ordine) {
echo '
<p style="margin:3px 0;"><i class="fa fa-book text-info"></i>
<b>'.tr('Ordine collegato').':</b> <a class="btn btn-default btn-xs" href="'.base_path().'/editor.php?id_module='.(new Module())->getByField('title', 'Ordini cliente').'&id_record='.$ordine->id.'" target="_blank">'.$ordine->numero.'</a>
</p>';
}
echo'
</div>
</div>
</div>';
@ -161,8 +188,8 @@ $anagrafica_azienda = Anagrafica::find(setting('Azienda predefinita'));
$sede_azienda = $anagrafica_azienda->sedeLegale;
echo '
<div class="col-md-3">
<div class="box box-default">
<div class="col-md-4">
<div class="box box-info">
<div class="box-header">
<h3 class="box-title"><i class="fa fa-map"></i> '.tr('Geolocalizzazione').'</h3>
</div>
@ -216,11 +243,6 @@ if (!empty($sede_cliente->gaddress) || (!empty($sede_cliente->lat) && !empty($se
echo '
</div>
</div>
<div class="row">
<div class="col-md-12">
{[ "type": "select", "label": "'.tr('Stato').'", "name": "idstatointervento", "required": 1, "values": "query=SELECT `in_statiintervento`.`id`, `title` as descrizione, `colore` AS _bgcolor_ FROM `in_statiintervento` LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento`.`id` = `in_statiintervento_lang`.`id_record` AND `in_statiintervento_lang`.`id_lang` ='.prepare(Models\Locale::getDefault()->id).') WHERE `deleted_at` IS NULL ORDER BY `title`", "value": "$id$", "class": "unblockable" ]}
</div>
</div>
</div>
</div>

View File

@ -42,7 +42,7 @@ if (get('documento') == 'fattura') {
$op = $module->getTranslation('title', Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'add_documento' : 'add_intervento';
$tipo_documento_finale = Intervento::class;
} else {
$final_module = $module->getTranslation('title', Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'Ddt di vendita' : 'Ddt di acquisto';
$final_module = $module->getTranslation('title', Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'Ddt in uscita' : 'Ddt in entrata';
$op = 'add_ordine';
$tipo_documento_finale = DDT::class;
}

View File

@ -549,7 +549,7 @@ if (!empty($elementi)) {
if (!in_array($elemento['tipo_documento'], ['Ddt in uscita', 'Ddt in entrata'])) {
$modulo = ($elemento['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto';
} else {
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt di vendita' : 'Ddt di acquisto';
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt in uscita' : 'Ddt in entrata';
}
$id = $elemento['id'];

View File

@ -262,7 +262,7 @@ echo '
} elseif (in_array($elemento['tipo_documento'], ['Ordine cliente', 'Ordine fornitore'])) {
$modulo = ($elemento['dir'] == 'entrata') ? 'Ordini cliente' : 'Ordini fornitore';
} elseif (in_array($elemento['tipo_documento'], ['Ddt in uscita', 'Ddt in entrata'])) {
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt di vendita' : 'Ddt di acquisto';
$modulo = ($elemento['dir'] == 'entrata') ? 'Ddt in uscita' : 'Ddt in entrata';
} else {
$modulo = ($elemento['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto';
}

View File

@ -500,7 +500,7 @@ $elementi = $dbo->fetchArray('
`dt_ddt`.`numero`,
`dt_ddt`.`numero_esterno`,
`dt_tipiddt_lang`.`title`,
IF(`dt_tipiddt`.`dir` = \'entrata\', \'Ddt di vendita\', \'Ddt di acquisto\')
IF(`dt_tipiddt`.`dir` = \'entrata\', \'Ddt in uscita\', \'Ddt in entrata\')
FROM `dt_ddt`
JOIN `dt_righe_ddt` ON `dt_righe_ddt`.`idddt` = `dt_ddt`.`id`
INNER JOIN `dt_tipiddt` ON `dt_tipiddt`.`id` = `dt_ddt`.`idtipoddt`

65
modules/tags/actions.php Normal file
View File

@ -0,0 +1,65 @@
<?php
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
* Copyright (C) DevCode s.r.l.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include_once __DIR__.'/../../core.php';
switch (post('op')) {
case 'update':
$nome = post('name');
$tag_new = $dbo->fetchOne('SELECT * FROM `in_tags` WHERE `in_tags`.`name`='.prepare($nome));
if (!empty($tag_new) && $tag_new['id'] != $id_record) {
flash()->error(tr('Tag _NAME_ già esistente!', [
'_NAME_' => $nome,
]));
} else {
$record->nome = $nome;
$record->save();
flash()->info(tr('Informazioni salvate correttamente!'));
}
break;
case 'add':
$nome = post('name');
$tag_new = $dbo->fetchOne('SELECT * FROM `in_tags` WHERE `in_tags`.`name`='.prepare($nome));
if (!empty($tag_new) && $tag_new['id'] != $id_record) {
flash()->error(tr('Tag _NAME_ già esistente!', [
'_NAME_' => $nome,
]));
} else {
$record = $dbo->insert('in_tags', [
'name' => $nome,
]);
$id_record = $dbo->lastInsertedID();
flash()->info(tr('Nuovo tag aggiunto!'));
}
break;
case 'delete':
$dbo->query('DELETE `in_tags` WHERE `in_tags`.`id`='.prepare($id_record));
flash()->info(tr('Tag eliminato!'));
break;
}

41
modules/tags/add.php Normal file
View File

@ -0,0 +1,41 @@
<?php
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
* Copyright (C) DevCode s.r.l.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include_once __DIR__.'/../../core.php';
?><form action="" method="post" id="add-form">
<input type="hidden" name="op" value="add">
<input type="hidden" name="backto" value="record-edit">
<div class="row">
<div class="col-md-12">
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "name", "required": 1, "value": "", "extra": "" ]}
</div>
</div>
<!-- PULSANTI -->
<div class="row">
<div class="col-md-12 text-right">
<button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> <?php echo tr('Aggiungi'); ?></button>
</div>
</div>
</form>

31
modules/tags/edit.php Normal file
View File

@ -0,0 +1,31 @@
<?php
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
* Copyright (C) DevCode s.r.l.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include_once __DIR__.'/../../core.php';
?><form action="" method="post" id="edit-form">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="update">
<div class="row">
<div class="col-md-9">
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "name", "required": 1, "value": "$name$" ]}
</div>
</div>
</form>

26
modules/tags/init.php Normal file
View File

@ -0,0 +1,26 @@
<?php
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
* Copyright (C) DevCode s.r.l.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include_once __DIR__.'/../../core.php';
if (!empty($id_record)) {
$record = $dbo->fetchOne('SELECT * FROM `in_tags` WHERE `in_tags`.`id`='.prepare($id_record));
}

View File

@ -51,6 +51,7 @@ switch (filter('op')) {
foreach ($queries as $c => $query) {
if (check_query($query)) {
$array = [
'name' => post('name')[$c],
'query' => $query,
'visible' => post('visible')[$c],
'search' => post('search')[$c],
@ -63,7 +64,7 @@ switch (filter('op')) {
'id_module' => $id_record,
];
$name = post('name')[$c];
$title = post('name')[$c];
if (!empty(post('id')[$c]) && !empty($query)) {
$id = post('id')[$c];
@ -77,7 +78,7 @@ switch (filter('op')) {
// Aggiornamento traduzione nome campo
$vista = View::find($id);
$vista->setTranslation('title', $name);
$vista->setTranslation('title', $title);
// Aggiornamento dei permessi relativi
$dbo->sync('zz_group_view', ['id_vista' => $id], ['id_gruppo' => (array) post('gruppi')[$c]]);

View File

@ -500,39 +500,6 @@ UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_module
-- Allineamento vista Aspetto beni
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`dt_aspettobeni_lang`.`title`' WHERE `zz_modules`.`name` = 'Aspetto beni' AND `zz_views`.`name` = 'Descrizione';
-- Allineamento vista Attività
UPDATE `zz_modules` SET `options` = "
SELECT
|select|
FROM
`in_interventi`
LEFT JOIN `an_anagrafiche` ON `in_interventi`.`idanagrafica` = `an_anagrafiche`.`idanagrafica`
LEFT JOIN `in_interventi_tecnici` ON `in_interventi_tecnici`.`idintervento` = `in_interventi`.`id`
LEFT JOIN `in_interventi_tecnici_assegnati` ON `in_interventi_tecnici_assegnati`.`id_intervento` = `in_interventi`.`id`
LEFT JOIN (SELECT `idintervento`, SUM(`prezzo_unitario`*`qta`-`sconto`) AS `ricavo_righe`, SUM(`costo_unitario`*`qta`) AS `costo_righe` FROM `in_righe_interventi` GROUP BY `idintervento`) AS `righe` ON `righe`.`idintervento` = `in_interventi`.`id`
INNER JOIN `in_statiintervento` ON `in_interventi`.`idstatointervento`=`in_statiintervento`.`id`
LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento_lang`.`id_record` = `in_statiintervento`.`id` AND `in_statiintervento_lang`.|lang|)
LEFT JOIN `an_referenti` ON `in_interventi`.`idreferente` = `an_referenti`.`id`
LEFT JOIN (SELECT `an_sedi`.`id`, CONCAT(`an_sedi`.`nomesede`, '<br />',IF(`an_sedi`.`telefono`!='',CONCAT(`an_sedi`.`telefono`,'<br />'),''),IF(`an_sedi`.`cellulare`!='',CONCAT(`an_sedi`.`cellulare`,'<br />'),''),`an_sedi`.`citta`,IF(`an_sedi`.`indirizzo`!='',CONCAT(' - ',`an_sedi`.`indirizzo`),'')) AS `info` FROM `an_sedi`) AS `sede_destinazione` ON `sede_destinazione`.`id` = `in_interventi`.`idsede_destinazione`
LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT `co_documenti`.`numero_esterno` SEPARATOR ', ') AS `info`, `co_righe_documenti`.`original_document_id` AS `idintervento` FROM `co_documenti` INNER JOIN `co_righe_documenti` ON `co_documenti`.`id` = `co_righe_documenti`.`iddocumento` WHERE `original_document_type` = 'Modules\\Interventi\\Intervento' GROUP BY `idintervento`, `original_document_id`) AS `fattura` ON `fattura`.`idintervento` = `in_interventi`.`id`
LEFT JOIN (SELECT `in_interventi_tecnici_assegnati`.`id_intervento`, GROUP_CONCAT( DISTINCT `ragione_sociale` SEPARATOR ', ') AS `nomi` FROM `an_anagrafiche` INNER JOIN `in_interventi_tecnici_assegnati` ON `in_interventi_tecnici_assegnati`.`id_tecnico` = `an_anagrafiche`.`idanagrafica` GROUP BY `id_intervento`) AS `tecnici_assegnati` ON `in_interventi`.`id` = `tecnici_assegnati`.`id_intervento`
LEFT JOIN (SELECT `in_interventi_tecnici`.`idintervento`, GROUP_CONCAT( DISTINCT `ragione_sociale` SEPARATOR ', ') AS `nomi` FROM `an_anagrafiche` INNER JOIN `in_interventi_tecnici` ON `in_interventi_tecnici`.`idtecnico` = `an_anagrafiche`.`idanagrafica` GROUP BY `idintervento`) AS `tecnici` ON `in_interventi`.`id` = `tecnici`.`idintervento`
LEFT JOIN (SELECT COUNT(`id`) as emails, `em_emails`.`id_record` FROM `em_emails` INNER JOIN `zz_operations` ON `zz_operations`.`id_email` = `em_emails`.`id` WHERE `id_module` IN (SELECT `zz_modules`.`id` FROM `zz_modules` WHERE `name` = 'Interventi' AND `zz_operations`.`op` = 'send-email' GROUP BY `em_emails`.`id_record`) AND `zz_operations`.`op` = 'send-email' GROUP BY `em_emails`.`id_record`) AS `email` ON `email`.`id_record` = `in_interventi`.`id`
LEFT JOIN (SELECT GROUP_CONCAT(CONCAT(`matricola`, IF(`nome` != '', CONCAT(' - ', `nome`), '')) SEPARATOR '<br />') AS `descrizione`, `my_impianti_interventi`.`idintervento` FROM `my_impianti` INNER JOIN `my_impianti_interventi` ON `my_impianti`.`id` = `my_impianti_interventi`.`idimpianto` GROUP BY `my_impianti_interventi`.`idintervento`) AS `impianti` ON `impianti`.`idintervento` = `in_interventi`.`id`
LEFT JOIN (SELECT `co_contratti`.`id`, CONCAT(`co_contratti`.`numero`, ' del ', DATE_FORMAT(`data_bozza`, '%d/%m/%Y')) AS `info` FROM `co_contratti`) AS `contratto` ON `contratto`.`id` = `in_interventi`.`id_contratto`
LEFT JOIN (SELECT `co_preventivi`.`id`, CONCAT(`co_preventivi`.`numero`, ' del ', DATE_FORMAT(`data_bozza`, '%d/%m/%Y')) AS `info` FROM `co_preventivi`) AS `preventivo` ON `preventivo`.`id` = `in_interventi`.`id_preventivo`
LEFT JOIN (SELECT `or_ordini`.`id`, CONCAT(`or_ordini`.`numero`, ' del ', DATE_FORMAT(`data`, '%d/%m/%Y')) AS `info` FROM `or_ordini`) AS `ordine` ON `ordine`.`id` = `in_interventi`.`id_ordine`
INNER JOIN `in_tipiintervento` ON `in_interventi`.`idtipointervento` = `in_tipiintervento`.`id`
LEFT JOIN `in_tipiintervento_lang` ON (`in_tipiintervento_lang`.`id_record` = `in_tipiintervento`.`id` AND `in_tipiintervento_lang`.|lang|)
LEFT JOIN (SELECT `zz_files`.* FROM `zz_files` INNER JOIN `zz_modules` ON `zz_files`.`id_module` = `zz_modules`.`id` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.|lang|) WHERE `zz_modules`.`name` = 'Interventi') AS zz_files ON `zz_files`.`id_record` = `in_interventi`.`id`
WHERE
1=1 |segment(`in_interventi`.`id_segment`)| |date_period(`orario_inizio`,`data_richiesta`)|
GROUP BY
`in_interventi`.`id`
HAVING
2=2
ORDER BY
IFNULL(`orario_fine`, `data_richiesta`) DESC" WHERE `zz_modules`.`name` = 'Interventi';
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`in_statiintervento_lang`.`title`' WHERE `zz_modules`.`name` = 'Interventi' AND `zz_views`.`name` = 'Stato';
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`in_tipiintervento_lang`.`title`' WHERE `zz_modules`.`name` = 'Interventi' AND `zz_views`.`name` = 'Tipo';

79
update/2_5_2.sql Normal file
View File

@ -0,0 +1,79 @@
-- Aggiunta tabella in_tags
CREATE TABLE `in_tags` (
`id` int NOT NULL,
`name` varchar(255) NOT NULL
);
ALTER TABLE `in_tags`
ADD PRIMARY KEY (`id`);
ALTER TABLE `in_tags`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
-- Aggiunta modulo Tags
INSERT INTO `zz_modules` (`name`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`, `use_notes`, `use_checklists`) VALUES ('Tags', 'tags', 'SELECT |select| FROM `in_tags` WHERE 1=1 HAVING 2=2', '', 'fa fa-angle-right', '2.5.2', '2.5.2', '2', (SELECT `id` FROM `zz_modules` as b WHERE `name` = 'Interventi'), '1', '1', '1', '0');
INSERT INTO `zz_modules_lang` (`id_lang`, `id_record`, `title`) VALUES ('1', (SELECT MAX(id) FROM `zz_modules`), 'Tags');
-- Aggiunta viste Tags
INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`) VALUES
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Tags'), 'id', 'id', 1),
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Tags'), 'Nome','name', 1);
INSERT INTO `zz_views_lang` (`id_lang`, `id_record`, `title`) VALUES
(1, (SELECT MAX(`id`)-1 FROM `zz_views` ), 'id'),
(1, (SELECT MAX(`id`) FROM `zz_views` ), 'Nome');
-- Aggiunta tabella in_interventi_tags
CREATE TABLE `in_interventi_tags` (
`id` int NOT NULL,
`id_intervento` int NOT NULL,
`id_tag`int NOT NULL
);
ALTER TABLE `in_interventi_tags`
ADD PRIMARY KEY (`id`);
ALTER TABLE `in_interventi_tags`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
-- Allineamento vista Attività
UPDATE `zz_modules` SET `options` = "
SELECT
|select|
FROM
`in_interventi`
LEFT JOIN `an_anagrafiche` ON `in_interventi`.`idanagrafica` = `an_anagrafiche`.`idanagrafica`
LEFT JOIN `in_interventi_tecnici` ON `in_interventi_tecnici`.`idintervento` = `in_interventi`.`id`
LEFT JOIN `in_interventi_tecnici_assegnati` ON `in_interventi_tecnici_assegnati`.`id_intervento` = `in_interventi`.`id`
LEFT JOIN (SELECT `idintervento`, SUM(`prezzo_unitario`*`qta`-`sconto`) AS `ricavo_righe`, SUM(`costo_unitario`*`qta`) AS `costo_righe` FROM `in_righe_interventi` GROUP BY `idintervento`) AS `righe` ON `righe`.`idintervento` = `in_interventi`.`id`
INNER JOIN `in_statiintervento` ON `in_interventi`.`idstatointervento`=`in_statiintervento`.`id`
LEFT JOIN `in_statiintervento_lang` ON (`in_statiintervento_lang`.`id_record` = `in_statiintervento`.`id` AND `in_statiintervento_lang`.|lang|)
LEFT JOIN `an_referenti` ON `in_interventi`.`idreferente` = `an_referenti`.`id`
LEFT JOIN (SELECT `an_sedi`.`id`, CONCAT(`an_sedi`.`nomesede`, '<br />',IF(`an_sedi`.`telefono`!='',CONCAT(`an_sedi`.`telefono`,'<br />'),''),IF(`an_sedi`.`cellulare`!='',CONCAT(`an_sedi`.`cellulare`,'<br />'),''),`an_sedi`.`citta`,IF(`an_sedi`.`indirizzo`!='',CONCAT(' - ',`an_sedi`.`indirizzo`),'')) AS `info` FROM `an_sedi`) AS `sede_destinazione` ON `sede_destinazione`.`id` = `in_interventi`.`idsede_destinazione`
LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT `co_documenti`.`numero_esterno` SEPARATOR ', ') AS `info`, `co_righe_documenti`.`original_document_id` AS `idintervento` FROM `co_documenti` INNER JOIN `co_righe_documenti` ON `co_documenti`.`id` = `co_righe_documenti`.`iddocumento` WHERE `original_document_type` = 'Modules\\Interventi\\Intervento' GROUP BY `idintervento`, `original_document_id`) AS `fattura` ON `fattura`.`idintervento` = `in_interventi`.`id`
LEFT JOIN (SELECT `in_interventi_tecnici_assegnati`.`id_intervento`, GROUP_CONCAT( DISTINCT `ragione_sociale` SEPARATOR ', ') AS `nomi` FROM `an_anagrafiche` INNER JOIN `in_interventi_tecnici_assegnati` ON `in_interventi_tecnici_assegnati`.`id_tecnico` = `an_anagrafiche`.`idanagrafica` GROUP BY `id_intervento`) AS `tecnici_assegnati` ON `in_interventi`.`id` = `tecnici_assegnati`.`id_intervento`
LEFT JOIN (SELECT `in_interventi_tecnici`.`idintervento`, GROUP_CONCAT( DISTINCT `ragione_sociale` SEPARATOR ', ') AS `nomi` FROM `an_anagrafiche` INNER JOIN `in_interventi_tecnici` ON `in_interventi_tecnici`.`idtecnico` = `an_anagrafiche`.`idanagrafica` GROUP BY `idintervento`) AS `tecnici` ON `in_interventi`.`id` = `tecnici`.`idintervento`
LEFT JOIN (SELECT COUNT(`id`) as emails, `em_emails`.`id_record` FROM `em_emails` INNER JOIN `zz_operations` ON `zz_operations`.`id_email` = `em_emails`.`id` WHERE `id_module` IN (SELECT `zz_modules`.`id` FROM `zz_modules` WHERE `name` = 'Interventi' AND `zz_operations`.`op` = 'send-email' GROUP BY `em_emails`.`id_record`) AND `zz_operations`.`op` = 'send-email' GROUP BY `em_emails`.`id_record`) AS `email` ON `email`.`id_record` = `in_interventi`.`id`
LEFT JOIN (SELECT GROUP_CONCAT(CONCAT(`matricola`, IF(`nome` != '', CONCAT(' - ', `nome`), '')) SEPARATOR '<br />') AS `descrizione`, `my_impianti_interventi`.`idintervento` FROM `my_impianti` INNER JOIN `my_impianti_interventi` ON `my_impianti`.`id` = `my_impianti_interventi`.`idimpianto` GROUP BY `my_impianti_interventi`.`idintervento`) AS `impianti` ON `impianti`.`idintervento` = `in_interventi`.`id`
LEFT JOIN (SELECT `co_contratti`.`id`, CONCAT(`co_contratti`.`numero`, ' del ', DATE_FORMAT(`data_bozza`, '%d/%m/%Y')) AS `info` FROM `co_contratti`) AS `contratto` ON `contratto`.`id` = `in_interventi`.`id_contratto`
LEFT JOIN (SELECT `co_preventivi`.`id`, CONCAT(`co_preventivi`.`numero`, ' del ', DATE_FORMAT(`data_bozza`, '%d/%m/%Y')) AS `info` FROM `co_preventivi`) AS `preventivo` ON `preventivo`.`id` = `in_interventi`.`id_preventivo`
LEFT JOIN (SELECT `or_ordini`.`id`, CONCAT(`or_ordini`.`numero`, ' del ', DATE_FORMAT(`data`, '%d/%m/%Y')) AS `info` FROM `or_ordini`) AS `ordine` ON `ordine`.`id` = `in_interventi`.`id_ordine`
INNER JOIN `in_tipiintervento` ON `in_interventi`.`idtipointervento` = `in_tipiintervento`.`id`
LEFT JOIN `in_tipiintervento_lang` ON (`in_tipiintervento_lang`.`id_record` = `in_tipiintervento`.`id` AND `in_tipiintervento_lang`.|lang|)
LEFT JOIN (SELECT GROUP_CONCAT(' ', `zz_files`.`name`) as name, `zz_files`.`id_record` FROM `zz_files` INNER JOIN `zz_modules` ON `zz_files`.`id_module` = `zz_modules`.`id` LEFT JOIN `zz_modules_lang` ON (`zz_modules_lang`.`id_record` = `zz_modules`.`id` AND `zz_modules_lang`.|lang|) WHERE `zz_modules`.`name` = 'Interventi' GROUP BY id_record) AS files ON `files`.`id_record` = `in_interventi`.`id`
LEFT JOIN `in_interventi_tags` ON `in_interventi_tags`.`id_intervento` = `in_interventi`.`id`
LEFT JOIN (SELECT `in_interventi_tags`.`id_intervento`, GROUP_CONCAT( DISTINCT `name` SEPARATOR ', ') AS `nomi` FROM `in_tags` INNER JOIN `in_interventi_tags` ON `in_interventi_tags`.`id_tag` = `in_tags`.`id`) AS `tags` ON `in_interventi`.`id` = `tags`.`id_intervento`
WHERE
1=1 |segment(`in_interventi`.`id_segment`)| |date_period(`orario_inizio`,`data_richiesta`)|
GROUP BY
`in_interventi`.`id`
HAVING
2=2
ORDER BY
IFNULL(`orario_fine`, `data_richiesta`) DESC" WHERE `zz_modules`.`name` = 'Interventi';
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = 'IF(`files`.`name` != '', `files`.`name`, 'No')' WHERE `zz_modules`.`name` = 'Interventi' AND `zz_views`.`name` = 'Allegati';
-- Aggiunta colonna Tags in Attività
INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`) VALUES
((SELECT `id` FROM `zz_modules` WHERE `name` = 'Interventi'), 'Tags', 'tags.nomi', 10);
INSERT INTO `zz_views_lang` (`id_lang`, `id_record`, `title`) VALUES
(1, (SELECT MAX(`id`) FROM `zz_views` ), 'Tags');

View File

@ -108,12 +108,14 @@ return [
'fe_tipo_cassa',
'fe_tipi_ritenuta',
'in_interventi',
'in_interventi_tags',
'in_interventi_tecnici',
'in_interventi_tecnici_assegnati',
'in_righe_interventi',
'in_righe_tipiinterventi',
'in_statiintervento',
'in_statiintervento_lang',
'in_tags',
'in_tariffe',
'in_tipiintervento',
'in_tipiintervento_lang',