This commit is contained in:
MatteoPistorello 2022-03-28 11:26:30 +02:00
commit dd9d1ac023
29 changed files with 828 additions and 47 deletions

View File

@ -33,7 +33,7 @@ echo '
// Quantità
echo '
<div class="col-md-4">
{[ "type": "number", "label": "'.tr('Q.tà').'", "name": "qta", "required": 1, "value": "'.abs($result['qta']).'", "decimals": "qta"'.(isset($result['max_qta']) ? ', "icon-after": "<span class=\"tip\" title=\"'.tr("L'elemento è collegato a un documento: la quantità massima ammessa è relativa allo stato di evasione dell'elemento nel documento di origine (quantità dell'elemento / quantità massima ammessa)").'\">/ '.numberFormat(abs($result['max_qta']), 'qta').' <i class=\"fa fa-question-circle-o\"></i></span>"' : '').', "min-value": "'.abs($result['qta_evasa']).'" ]}
{[ "type": "number", "label": "'.tr('Q.tà').'", "name": "qta", "required": 1, "value": "'.abs((float) $result['qta']).'", "decimals": "qta"'.(isset($result['max_qta']) ? ', "icon-after": "<span class=\"tip\" title=\"'.tr("L'elemento è collegato a un documento: la quantità massima ammessa è relativa allo stato di evasione dell'elemento nel documento di origine (quantità dell'elemento / quantità massima ammessa)").'\">/ '.numberFormat(abs((float) $result['max_qta']), 'qta').' <i class=\"fa fa-question-circle-o\"></i></span>"' : '').', "min-value": "'.abs((float) $result['qta_evasa']).'" ]}
</div>';
// Unità di misura

View File

@ -46,7 +46,7 @@ function database()
*/
function prepare($parameter)
{
return database()->prepare($parameter);
return database()->prepare((string) $parameter);
}
/**

View File

@ -185,7 +185,7 @@ if (!function_exists('replace')) {
*/
function replace($string, $array)
{
return str_replace(array_keys($array), array_values($array), $string);
return str_replace(array_keys($array), array_values($array), (string) $string);
}
}

View File

@ -114,7 +114,7 @@ if (strtotime($record['data_conclusione']) < strtotime($record['data_accettazion
</div>
<div class="col-md-6">
{[ "type": "select", "multiple": "1", "label": "<?php echo tr('Impianti'); ?>", "name": "matricolaimpianto[]", "values": "query=SELECT idanagrafica, id AS id, IF(nome = '', matricola, CONCAT(matricola, ' - ', nome)) AS descrizione FROM my_impianti WHERE idanagrafica='$idanagrafica$' ORDER BY descrizione", "value": "$idimpianti$", "icon-after": "add|<?php echo Modules::get('Impianti')['id']; ?>|||<?php echo (empty($block_edit)) ? '' : 'disabled'; ?>" ]}
{[ "type": "select", "multiple": "1", "label": "<?php echo tr('Impianti'); ?>", "name": "matricolaimpianto[]", "values": "query=SELECT idanagrafica, id AS id, IF(nome = '', matricola, CONCAT(matricola, ' - ', nome)) AS descrizione FROM my_impianti WHERE idanagrafica='$idanagrafica$' ORDER BY descrizione", "value": "$idimpianti$", "icon-after": "add|<?php echo Modules::get('Impianti')['id']; ?>|<?php echo 'id_anagrafica='.$record['idanagrafica']; ?>||<?php echo (empty($block_edit)) ? '' : 'disabled'; ?>" ]}
</div>
<div class="col-md-3">

View File

@ -0,0 +1,92 @@
<?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('nome');
$data = post('data');
$id_nazione = post('id_nazione');
$id_regione = post('id_regione');
$is_recurring = post('is_recurring');
$is_bank_holiday = post('is_recurring');
if ($dbo->fetchNum('SELECT * FROM `zz_events` WHERE `nome`='.prepare($nome).' AND `id`!='.prepare($id_record)) == 0) {
$dbo->update('zz_events', [
'nome' => $nome,
'data' => $data,
'id_nazione' =>$id_nazione,
'id_regione' => $id_regione,
'is_recurring' => $is_recurring,
'is_bank_holiday' => $is_bank_holiday,
], [
'id' => $id_record,
]);
flash()->info(tr('Salvataggio completato.'));
} else {
flash()->error(tr("E' già presente un _TYPE_ con lo stesso nome", [
'_TYPE_' => 'evento',
]));
}
break;
case 'add':
$nome = post('nome');
$id_nazione = post('id_nazione');
if ($dbo->fetchNum('SELECT * FROM `zz_events` WHERE `id_nazione` = '.prepare($id_nazione).' AND `nome`='.prepare($nome)) == 0) {
$dbo->insert('zz_events', [
'nome' => $nome,
'id_nazione' => $id_nazione,
]);
$id_record = $dbo->lastInsertedID();
if (isAjaxRequest()) {
echo json_encode(['id' => $id_record, 'text' => $nome]);
}
flash()->info(tr('Aggiunto nuovo _TYPE_', [
'_TYPE_' => 'evento',
]));
} else {
flash()->error(tr("E' già presente un _TYPE_ con lo stesso nome e nazione", [
'_TYPE_' => 'evento',
]));
}
break;
case 'delete':
$dbo->delete('zz_events', [
'id' => $id_record,
]);
flash()->info(tr('_TYPE_ eliminato con successo.', [
'_TYPE_' => 'Evento',
]));
break;
}

43
modules/eventi/add.php Normal file
View File

@ -0,0 +1,43 @@
<?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-6">
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1 ]}
</div>
<div class="col-md-6">
{[ "type": "select", "label": "<?php echo tr('Nazione'); ?>", "name": "id_nazione", "required": 1, "ajax-source": "nazioni" ]}
</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>

View File

@ -0,0 +1,35 @@
<?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 ($resource) {
case 'fasce_orarie':
$query = 'SELECT id, nome AS descrizione FROM zz_events |where| ORDER BY nome ASC';
foreach ($elements as $element) {
$filter[] = 'id='.prepare($element);
}
if (!empty($search)) {
$search_fields[] = 'nome LIKE '.prepare('%'.$search.'%');
}
break;
}

74
modules/eventi/edit.php Normal file
View File

@ -0,0 +1,74 @@
<?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/>.
*/
use Carbon\Carbon;
include_once __DIR__.'/../../core.php';
//$block_edit = $record['is_predefined'];
?>
<form action="" method="post" id="edit-form">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="update">
<!-- DATI -->
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><?php echo tr('Dati'); ?></h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1, "value": "$nome$" ]}
</div>
<div class="col-md-6">
{[ "type": "date", "label": "<?php echo tr('Data'); ?>", "name": "data", "required": 1, "value": "$data$" ]}
</div>
</div>
<div class="row">
<div class="col-md-6">
{[ "type": "select", "label": "<?php echo tr('Nazione'); ?>", "name": "id_nazione", "required": 1, "value": "$id_nazione$", "ajax-source": "nazioni" ]}
</div>
<div class="col-md-6">
{[ "type": "select", "label": "<?php echo tr('Regione'); ?>", "name": "id_regione", "value": "$id_regione$", "ajax-source": "regioni" ]}
</div>
</div>
<div class="row">
<div class="col-md-6">
{[ "type": "checkbox", "label": "<?php echo tr('Ricorrente'); ?>", "name": "is_recurring", "value": "$is_recurring$" ]}
</div>
<div class="col-md-6">
{[ "type": "checkbox", "label": "<?php echo tr('Festività'); ?>", "name": "is_bank_holiday", "value": "$is_bank_holiday$" ]}
</div>
</div>
</div>
</div>
</form>
<a class="btn btn-danger ask" data-backto="record-list">
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
</a>

24
modules/eventi/init.php Normal file
View File

@ -0,0 +1,24 @@
<?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 (isset($id_record)) {
$record = $dbo->fetchOne('SELECT * FROM `zz_events` WHERE id='.prepare($id_record));
}

View File

@ -0,0 +1,103 @@
<?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('nome');
$giorni = (array) post('giorni');
$ora_inizio = post('ora_inizio');
$ora_fine = post('ora_fine');
$include_bank_holidays = post('include_bank_holidays');
if ($dbo->fetchNum('SELECT * FROM `in_fasceorarie` WHERE `nome`='.prepare($nome).' AND `id`!='.prepare($id_record)) == 0) {
$dbo->update('in_fasceorarie', [
'nome' => $nome,
'giorni' => $giorni ? implode(',' , $giorni) : null,
'ora_inizio' =>$ora_inizio,
'ora_fine' => $ora_fine,
'include_bank_holidays' => $include_bank_holidays,
], [
'id' => $id_record,
]);
flash()->info(tr('Salvataggio completato.'));
} else {
flash()->error(tr("E' già presente una _TYPE_ con lo stesso nome", [
'_TYPE_' => 'fascia oraria',
]));
}
break;
case 'add':
$nome = post('nome');
if ($dbo->fetchNum('SELECT * FROM `in_fasceorarie` WHERE `nome`='.prepare($nome)) == 0) {
$dbo->insert('in_fasceorarie', [
'nome' => $nome,
]);
$id_record = $dbo->lastInsertedID();
if (isAjaxRequest()) {
echo json_encode(['id' => $id_record, 'text' => $nome]);
}
flash()->info(tr('Aggiunta nuova _TYPE_', [
'_TYPE_' => 'fascia oraria',
]));
} else {
flash()->error(tr("E' già presente una _TYPE_ con lo stesso nome", [
'_TYPE_' => 'fascia oraria',
]));
}
break;
case 'delete':
$tipi_interventi = $dbo->fetchNum('SELECT idtipointervento FROM in_fasceorarie_tipiintervento WHERE idfasciaoraria='.prepare($id_record));
if (isset($id_record) && empty($tipi_interventi)) {
$dbo->delete('in_fasceorarie', [
'id' => $id_record,
'can_delete' => 1,
]);
flash()->info(tr('_TYPE_ eliminata con successo.', [
'_TYPE_' => 'Fascia oraria',
]));
} else {
flash()->error(tr('Sono presenti dei tipi interventi collegate a questa fascia oraria.'));
# soft delete
/*$dbo->update('in_fasceorarie', [
'deleted_at' => date('Y-m-d H:i:s'),
], ['id' => $id_record, 'can_delete' => 1]);*/
}
break;
}

View File

@ -0,0 +1,38 @@
<?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": "nome", "required": 1 ]}
</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>

View File

@ -0,0 +1,35 @@
<?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 ($resource) {
case 'fasce_orarie':
$query = 'SELECT id, nome AS descrizione FROM in_fasceorarie |where| ORDER BY nome ASC';
foreach ($elements as $element) {
$filter[] = 'id='.prepare($element);
}
if (!empty($search)) {
$search_fields[] = 'nome LIKE '.prepare('%'.$search.'%');
}
break;
}

View File

@ -0,0 +1,182 @@
<?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';
//$block_edit = $record['is_predefined'];
?>
<form action="" method="post" id="edit-form">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="update">
<!-- DATI -->
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><?php echo tr('Dati'); ?></h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1, "value": "$nome$" ]}
</div>
<div class="col-md-6">
{[ "type": "select", "multiple":"1", "label": "<?php echo tr('Giorni'); ?>", "name": "giorni[]", "required": 0, "value": "$giorni$", "values": "list=\"1\":\"<?php echo tr('Lunedì'); ?>\", \"2\":\"<?php echo tr('Martedì'); ?>\", \"3\":\"<?php echo tr('Mercoledì'); ?>\", \"4\":\"<?php echo tr('Giovedì'); ?>\", \"5\":\"<?php echo tr('Venerdì'); ?>\", \"6\":\"<?php echo tr('Sabato'); ?>\", \"7\":\"<?php echo tr('Domenica'); ?>\"" ]}
</div>
</div>
<div class="row">
<div class="col-md-4">
{[ "type": "time", "label": "<?php echo tr('Ora inizio'); ?>", "name": "ora_inizio", "required": 1, "value": "$ora_inizio$" ]}
</div>
<div class="col-md-4">
{[ "type": "time", "label": "<?php echo tr('Ora fine'); ?>", "name": "ora_fine", "required": 1, "value": "$ora_fine$" ]}
</div>
<div class="col-md-4">
{[ "type": "checkbox", "label": "<?php echo tr('Includi festività'); ?>", "name": "include_bank_holidays", "required": 0, "value": "$include_bank_holidays$" ]}
</div>
</div>
</div>
</div>
<!-- Date aggiuntive -->
<div class="panel panel-primary hide">
<div class="panel-heading">
<h3 class="panel-title"><?php echo tr('Date aggiuntive'); ?></h3>
</div>
<div class="panel-body">
<div id="elenco-date">
<?php
$results = $dbo->fetchArray('SELECT * FROM `co_pagamenti` WHERE descrizione='.prepare($record['descrizione']).' ORDER BY `num_giorni` ASC');
$numero_data = 1;
foreach ($results as $result) {
}
?>
</div>
<div class="pull-right">
<button type="button" class="btn btn-info" onclick="aggiungiData()">
<i class="fa fa-plus"></i> <?php echo tr('Aggiungi'); ?>
</button>
<button type="submit" class="btn btn-success">
<i class="fa fa-check"></i> <?php echo tr('Salva'); ?>
</button>
</div>
</div>
</div>
</form>
<?php
echo '
<form class="hide" id="template">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">'.tr('Nuova data').'</h3>
</div>
<div class="box-body">
<input type="hidden" value="" name="id[-id-]">
<div class="row">
<div class="col-md-6">
{[ "type": "text", "label": "'.tr('Nome').'", "name": "nome[-id-]"]}
</div>
<div class="col-md-3">
{[ "type": "date", "label": "'.tr('Data').'", "name": "data[-id-]" ]}
</div>
<div class="col-md-3">
{[ "type": "checkbox", "label": "'.tr('Data ricorrente').'", "name": "data_ricorrente[-id-]", "value": "" ]}
</div>
</div>
</div>
</div>
</form>';
?>
<script>
var indice_data = "<?php echo $numero_data; ?>";
function aggiungiData() {
aggiungiContenuto("#elenco-date", "#template", {"-id-": indice_data});
indice_data++;
}
</script>
<?php
$elementi = $dbo->fetchArray('SELECT in_tipiintervento.codice, in_tipiintervento.descrizione, in_tipiintervento.idtipointervento FROM in_tipiintervento LEFT JOIN in_fasceorarie_tipiintervento ON in_tipiintervento.idtipointervento=in_fasceorarie_tipiintervento.idtipointervento WHERE in_fasceorarie_tipiintervento.idfasciaoraria='.prepare($id_record));
if (!empty($elementi)) {
echo '
<div class="box box-warning collapsable collapsed-box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Tipi interventi collegati: _NUM_', [
'_NUM_' => count($elementi),
]).'</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
</div>
</div>
<div class="box-body">
<ul>';
foreach ($elementi as $elemento) {
$descrizione = tr('_REF_ (_TIPO_INTERVENTO_)', [
'_REF_' => $elemento['descrizione'],
'_TIPO_INTERVENTO_' => $elemento['codice'],
]);
$modulo = 'Tipi di intervento';
$id = $elemento['idtipointervento'];
echo '
<li>'.Modules::link($modulo, $id, $descrizione).'</li>';
}
echo '
</ul>
</div>
</div>';
}
?>
<a class="btn btn-danger ask <?php echo (intval($record['can_delete']) ? 'disabled' : ''); ?>" data-backto="record-list">
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
</a>

View File

@ -0,0 +1,24 @@
<?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 (isset($id_record)) {
$record = $dbo->fetchOne('SELECT * FROM `in_fasceorarie` WHERE id='.prepare($id_record));
}

View File

@ -659,11 +659,16 @@ echo '
//Dich. intento collegata
if ($dir == 'entrata' && !empty($fattura->dichiarazione)){
$ive_accettate = $dbo->table('co_iva')->where('codice_natura_fe','N3.5')->get();
foreach($ive_accettate as $iva_accettata){
$descrizione_iva_accettata .= '<li>'.$iva_accettata->descrizione.'</li>';
}
if ($fattura->stato->descrizione == 'Bozza'){
echo '
echo '
<div class="alert alert-info">
<i class="fa fa-info"></i> '.tr("La fattura è collegata ad una dichiarazione d'intento con diponibilità residura pari a _MONEY_.", [ '_MONEY_' => moneyFormat(abs($diff)),]).'<br>'.tr("Per collegare una riga alla dichiarazione è sufficiente specificare come IVA _IVA_", ['_IVA_' => '"<b>'.$iva->codice.' - '.$iva->descrizione.'</b>"',]).'.</b>
<i class="fa fa-info"></i> '.tr("La fattura è collegata ad una dichiarazione d'intento con diponibilità residura pari a _MONEY_.", [ '_MONEY_' => moneyFormat(abs($diff)),]).'<br>'.tr("Per collegare una riga alla dichiarazione è sufficiente specificare come IVA <ul>_IVA_</ul>", ['_IVA_' => $descrizione_iva_accettata]).'</b>
</div>';
}

View File

@ -63,7 +63,7 @@ if (!empty($record['immagine'])) {
{[ "type": "select", "label": "<?php echo tr('Cliente'); ?>", "name": "idanagrafica", "required": 1, "value": "$idanagrafica$", "extra": "", "ajax-source": "clienti" ]}
</div>
<div class="col-md-6">
{[ "type": "select", "label": "<?php echo tr('Categoria'); ?>", "name": "id_categoria", "required": 0, "value": "$id_categoria$", "values": "query=SELECT id, nome AS descrizione FROM my_impianti_categorie" ]}
{[ "type": "select", "label": "<?php echo tr('Categoria'); ?>", "name": "id_categoria", "required": 0, "value": "$id_categoria$", "values": "query=SELECT id, nome AS descrizione FROM my_impianti_categorie", "icon-after": "add|<?php echo Modules::get('Categorie impianti')['id']; ?>" ]}
</div>
</div>
</div>

View File

@ -74,18 +74,6 @@ echo '
';
// Collegamenti diretti (numerici)
$numero_documenti = $dbo->fetchNum('SELECT id FROM co_documenti WHERE id_dichiarazione_intento='.prepare($id_record));
if (!empty($numero_documenti)) {
echo '
<div class="alert alert-danger">
'.tr('Ci sono _NUM_ documenti collegati', [
'_NUM_' => $numero_documenti,
]).'.
</div>';
}
echo '
<!-- PULSANTI -->
@ -101,3 +89,41 @@ echo '
</div>
</div>
</form>';
//Documenti collegati
$elementi = $dbo->fetchArray('SELECT `co_documenti`.`id`, `co_documenti`.`data`, `co_documenti`.`numero`, `co_documenti`.`numero_esterno`, `co_tipidocumento`.`descrizione` AS tipo_documento, `co_tipidocumento`.`dir`, NULL AS `deleted_at` FROM `co_documenti` JOIN `co_tipidocumento` ON `co_tipidocumento`.`id` = `co_documenti`.`idtipodocumento` WHERE `co_documenti`.`id_dichiarazione_intento` = '.prepare($record['id']));
if (!empty($elementi)) {
echo '
<hr>
<div class="box box-warning collapsable collapsed-box">
<div class="box-header with-border">
<h3 class="box-title"><i class="fa fa-warning"></i> '.tr('Documenti collegati: _NUM_', [
'_NUM_' => count($elementi),
]).'</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
</div>
</div>
<div class="box-body">
<ul>';
foreach ($elementi as $elemento) {
$descrizione = tr('_DOC_ _NUM_ del _DATE_ _DELETED_AT_', [
'_DOC_' => $elemento['tipo_documento'],
'_NUM_' => !empty($elemento['numero_esterno']) ? $elemento['numero_esterno'] : $elemento['numero'],
'_DATE_' => Translator::dateToLocale($elemento['data']),
'_DELETED_AT_' => (!empty($elemento['deleted_at']) ? tr('Eliminato il:').' '.Translator::dateToLocale($elemento['deleted_at']) : ''),
]);
$modulo = ($elemento['dir'] == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto';
$id = $elemento['id'];
echo '
<li>'.Modules::link($modulo, $id, $descrizione).'</li>';
}
echo '
</ul>
</div>
</div>';
}

View File

@ -74,17 +74,15 @@ class Dichiarazione extends Model
$righe = collect();
$fatture = $this->fatture;
$totale = 0;
foreach ($fatture as $fattura) {
$righe = $righe->merge($fattura->getRighe());
foreach( $fattura->getRighe() as $riga){
if( $riga->aliquota->codice_natura_fe == 'N3.5' ){
$totale += ($fattura->tipo->reversed ? -$riga->totale_imponibile : $riga->totale_imponibile);
}
}
}
// Filtro delle righe per IVA
$id_iva = setting("Iva per lettere d'intento");
$righe_dichiarazione = $righe->filter(function ($item, $key) use ($id_iva) {
return $item->aliquota != null && $item->aliquota->id == $id_iva;
});
$totale = $righe_dichiarazione->sum('totale_imponibile') ?: 0;
$this->totale = $totale;
}

View File

@ -1443,9 +1443,14 @@ class FatturaElettronica
// Dichiarazione d'intento
//Il numero di protocollo della dichiarazione dintento, rilevabile dalla ricevuta telematica rilasciata dallAgenzia delle entrate, è composto da 2 parti 17+6 (protocollo di ricezione della dichiarazione dintento e il suo progressivo)
//$id_iva_dichiarazione = setting("Iva per lettere d'intento");
$dichiarazione = $documento->dichiarazione;
$id_iva_dichiarazione = setting("Iva per lettere d'intento");
if (!empty($dichiarazione) && $riga->aliquota->id == $id_iva_dichiarazione) {
$ive_accettate = [];
$rs = $dbo->table('co_iva')->where('codice_natura_fe','N3.5')->get();
foreach($rs as $r){
$ive_accettate[] = $r->id;
}
if (!empty($dichiarazione) && in_array($riga->aliquota->id, $ive_accettate) ) {
$dettaglio[]['AltriDatiGestionali'] = [
'TipoDato' => 'INTENTO',
'RiferimentoTesto' => $dichiarazione->numero_protocollo,

View File

@ -390,7 +390,7 @@ class Database extends Util\Singleton
*/
public function prepare($parameter)
{
return $this->getPDO()->quote($parameter);
return $this->getPDO()->quote((string) $parameter);
}
/**

View File

@ -421,18 +421,16 @@ class Formatter
*/
public function formatDate($value)
{
if (!empty($value)){
$object = DateTime::createFromFormat(static::$standards['date'], $value);
$object = DateTime::createFromFormat(static::$standards['date'], (string) $value);
// Fallback per la gestione dei timestamp
$object = !is_object($object) ? DateTime::createFromFormat(static::$standards['timestamp'], $value) : $object;
// Fallback per la gestione dei timestamp
$object = !is_object($object) ? DateTime::createFromFormat(static::$standards['timestamp'], (string) $value) : $object;
$result = is_object($object) ? $object->format($this->getDatePattern()) : false;
$result = is_object($object) ? $object->format($this->getDatePattern()) : false;
return $result;
}else{
return true;
}
return $result;
}
/**

View File

@ -122,7 +122,7 @@ class Generator
$pattern = str_replace(array_keys($replaces), array_values($values), $pattern);
// Individuazione dei valori
preg_match('/^'.$pattern.'/', $string, $m);
preg_match('/^'.$pattern.'/', (string) $string, $m);
return array_filter($m, 'is_string', ARRAY_FILTER_USE_KEY);
}

View File

@ -79,7 +79,7 @@ class Query
$user = Auth::user();
// Sostituzione periodi temporali
preg_match('|date_period\((.+?)\)|', $query, $matches);
preg_match('|date_period\((.+?)\)|', (string) $query, $matches);
$date_query = $date_filter = null;
if (!empty($matches)) {
$dates = explode(',', $matches[1]);
@ -102,7 +102,7 @@ class Query
}
// Sostituzione periodi temporali
preg_match('|segment\((.+?)\)|', $query, $matches);
preg_match('|segment\((.+?)\)|', (string) $query, $matches);
$segment_name = !empty($matches[1]) ? $matches[1] : 'id_segment';
$segment_filter = !empty($matches[0]) ? $matches[0] : 'segment';

View File

@ -26,14 +26,12 @@ $files = [
'templates\scadenzario\scadenzario.html',
'templates\registro_iva\pdfgen.registro_iva.php',
'templates\registro_iva\registroiva_body.html',
'templates\registro_iva\header.php',
'templates\registro_iva\body.php',
'templates\preventivi_cons\body.php',
'templates\contratti_cons\body.php',
'templates\magazzino_inventario\pdfgen.magazzino_inventario.php',
'templates\magazzino_inventario\magazzino_inventario_body.html',
'templates\magazzino_inventario\magazzino_inventario.html',
'modules\contratti\modutil.php',
'modules\contratti\plugins\contratti.ordiniservizio.interventi.php',
'modules\contratti\plugins\contratti.ordiniservizio.php',
'modules\interventi\src\TipoSessione.php',

View File

@ -62,8 +62,8 @@ CREATE TABLE IF NOT EXISTS `mg_articolo_attributo` (
ALTER TABLE `mg_articoli` ADD `id_combinazione` int(11), ADD FOREIGN KEY (`id_combinazione`) REFERENCES `mg_combinazioni`(`id`);
INSERT INTO `zz_modules` (`id`, `name`, `title`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`) VALUES
(NULL, 'Attributi Combinazioni', 'Attributi Combinazioni', 'attributi_combinazioni', 'SELECT |select| FROM mg_attributi WHERE mg_attributi.deleted_at IS NULL AND 1=1 HAVING 2=2', NULL, 'fa fa-angle-right', '1.0', '2.*', '100', '20', '1', '1'),
(NULL, 'Combinazioni', 'Combinazioni', 'combinazioni_articoli', 'SELECT |select| FROM mg_combinazioni WHERE mg_combinazioni.deleted_at IS NULL AND 1=1 HAVING 2=2', NULL, 'fa fa-angle-right', '1.0', '2.*', '100', '20', '1', '1');
(NULL, 'Attributi Combinazioni', 'Attributi Combinazioni', 'attributi_combinazioni', 'SELECT |select| FROM mg_attributi WHERE mg_attributi.deleted_at IS NULL AND 1=1 HAVING 2=2', NULL, 'fa fa-angle-right', '1.0', '2.*', '100', (SELECT id FROM zz_modules t WHERE t.name = 'Magazzino'), '1', '1'),
(NULL, 'Combinazioni', 'Combinazioni', 'combinazioni_articoli', 'SELECT |select| FROM mg_combinazioni WHERE mg_combinazioni.deleted_at IS NULL AND 1=1 HAVING 2=2', NULL, 'fa fa-angle-right', '1.0', '2.*', '100', (SELECT id FROM zz_modules t WHERE t.name = 'Magazzino'), '1', '1');
INSERT INTO `zz_plugins` (`id`, `name`, `title`, `idmodule_from`, `idmodule_to`, `position`, `directory`, `options`) VALUES
(NULL, 'Varianti Articolo', 'Varianti Articolo', (SELECT `id` FROM `zz_modules` WHERE `name`='Articoli'), (SELECT `id` FROM `zz_modules` WHERE `name`='Articoli'), 'tab', 'varianti_articolo', 'custom');

View File

@ -9,4 +9,7 @@ UPDATE `zz_settings` SET `tipo` = 'list[mese,settimana,giorno,agenda]' WHERE `zz
-- Aggiunta colonna Impianti in Attività
UPDATE `zz_modules` SET `options` = 'SELECT |select| FROM `in_interventi`\nINNER JOIN `an_anagrafiche` ON `in_interventi`.`idanagrafica` = `an_anagrafiche`.`idanagrafica`\nLEFT JOIN `in_interventi_tecnici` ON `in_interventi_tecnici`.`idintervento` = `in_interventi`.`id`\nLEFT JOIN `in_interventi_tecnici_assegnati` ON `in_interventi_tecnici_assegnati`.`id_intervento` = `in_interventi`.`id`\nLEFT JOIN `in_statiintervento` ON `in_interventi`.`idstatointervento`=`in_statiintervento`.`idstatointervento`\nLEFT JOIN (\n 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\n) AS sede_destinazione ON sede_destinazione.id = in_interventi.idsede_destinazione\nLEFT JOIN (\n SELECT co_righe_documenti.idintervento, CONCAT(\'Fatt. \', co_documenti.numero_esterno, \' del \', DATE_FORMAT(co_documenti.data, \'%d/%m/%Y\')) AS info FROM co_documenti INNER JOIN co_righe_documenti ON co_documenti.id = co_righe_documenti.iddocumento\n) AS fattura ON fattura.idintervento = in_interventi.id\nLEFT JOIN (SELECT `zz_operations`.`id_email`, `zz_operations`.`id_record`\n FROM `zz_operations`\n INNER JOIN `em_emails` ON `zz_operations`.`id_email` = `em_emails`.`id`\n INNER JOIN `em_templates` ON `em_emails`.`id_template` = `em_templates`.`id`\n INNER JOIN `zz_modules` ON `zz_operations`.`id_module` = `zz_modules`.`id` \n WHERE `zz_modules`.`name` = \'Interventi\' AND `zz_operations`.`op` = \'send-email\' \n GROUP BY `zz_operations`.`id_record`) AS email ON email.id_record=in_interventi.id\nLEFT JOIN (\n SELECT GROUP_CONCAT(CONCAT(matricola, IF(nome != \'\', CONCAT(\' - \', nome), \'\')) SEPARATOR \'<br>\') AS descrizione, my_impianti_interventi.idintervento\n FROM my_impianti\n INNER JOIN my_impianti_interventi ON my_impianti.id = my_impianti_interventi.idimpianto\n GROUP BY my_impianti_interventi.idintervento\n) AS impianti ON impianti.idintervento = in_interventi.id\nWHERE 1=1 |date_period(`orario_inizio`,`data_richiesta`)|\nGROUP BY `in_interventi`.`id`\nHAVING 2=2\nORDER BY IFNULL(`orario_fine`, `data_richiesta`) DESC' WHERE `zz_modules`.`name` = 'Interventi';
INSERT INTO `zz_views` (`id`, `id_module`, `name`, `query`, `order`, `search`, `slow`, `format`, `html_format`, `search_inside`, `order_by`, `visible`, `summable`, `default`) VALUES (NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Interventi'), 'Impianti', 'impianti.descrizione', '16', '1', '0', '0', '1', NULL, NULL, '0', '0', '1');
INSERT INTO `zz_views` (`id`, `id_module`, `name`, `query`, `order`, `search`, `slow`, `format`, `html_format`, `search_inside`, `order_by`, `visible`, `summable`, `default`) VALUES (NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Interventi'), 'Impianti', 'impianti.descrizione', '16', '1', '0', '0', '1', NULL, NULL, '0', '0', '1');
-- Allineamento totali dichiaranzione d'intento
UPDATE `co_dichiarazioni_intento` INNER JOIN (SELECT `co_documenti`.`id_dichiarazione_intento`, SUM(IF(`co_tipidocumento`.`reversed`=1, (-(`co_righe_documenti`.`subtotale`-`co_righe_documenti`.`sconto`)), (`co_righe_documenti`.`subtotale`-`co_righe_documenti`.`sconto`))) AS `totale` FROM `co_righe_documenti` INNER JOIN `co_documenti` ON `co_documenti`.`id`=`co_righe_documenti`.`iddocumento` INNER JOIN `co_tipidocumento` ON `co_tipidocumento`.`id`=`co_documenti`.`idtipodocumento` INNER JOIN `co_iva` ON `co_iva`.`id`=`co_righe_documenti`.`idiva` WHERE `co_iva`.`codice_natura_fe`='N3.5' GROUP BY `co_documenti`.`id_dichiarazione_intento`) AS `righe` ON `righe`.`id_dichiarazione_intento`=`co_dichiarazioni_intento`.`id` SET `co_dichiarazioni_intento`.`totale`=`righe`.`totale`;

25
update/2_4_33.php Normal file
View File

@ -0,0 +1,25 @@
<?php
$fascie_orarie = $database->fetchArray('SELECT * FROM in_fasceorarie');
$tipi_intervento = $database->fetchArray('SELECT * FROM in_tipiintervento');
foreach ($fascie_orarie as $fascia_oraria) {
foreach ($tipi_intervento as $tipo_intervento) {
$database->insert('in_fasceorarie_tipiintervento', [
'idfasciaoraria' => $fascia_oraria['id'],
'idtipointervento' => $tipo_intervento['idtipointervento'],
'costo_orario' => $tipo_intervento['costo_orario'],
'costo_km' => $tipo_intervento['costo_km'],
'costo_diritto_chiamata' => $tipo_intervento['costo_diritto_chiamata'],
'costo_orario_tecnico' => $tipo_intervento['costo_orario_tecnico'],
'costo_km_tecnico' => $tipo_intervento['costo_km_tecnico'],
'costo_diritto_chiamata_tecnico' => $tipo_intervento['costo_km_tecnico'],
]);
}
}
?>

70
update/2_4_33.sql Normal file
View File

@ -0,0 +1,70 @@
-- Nuovo modulo "Fasce orarie"
CREATE TABLE IF NOT EXISTS `in_fasceorarie` (
`id` int NOT NULL AUTO_INCREMENT,
`nome` varchar(255) NOT NULL,
`giorni` varchar(255) DEFAULT NULL,
`ora_inizio` time DEFAULT NULL,
`ora_fine` time DEFAULT NULL,
`can_delete` BOOLEAN NOT NULL DEFAULT TRUE,
`include_bank_holidays` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
INSERT INTO `zz_modules` (`id`, `name`, `title`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`, `use_notes`, `use_checklists`) VALUES (NULL, 'Fasce orarie', 'Fasce orarie', 'fasce_orarie', 'SELECT |select| FROM `in_fasceorarie` WHERE 1=1 HAVING 2=2', '', 'fa fa-angle-right', '2.4.32', '2.4.32', '1', (SELECT id FROM zz_modules t WHERE t.name = 'Interventi'), '1', '1', '0', '0');
INSERT INTO `zz_views` (`id`, `id_module`, `name`, `query`, `order`, `visible`, `format`, `default`) VALUES
(NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Fasce orarie'), 'id', 'in_fasceorarie.id', 1, 1, 0, 1),
(NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Fasce orarie'), 'Nome', 'in_fasceorarie.nome', 2, 1, 0, 1),
(NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Fasce orarie'), 'Festività', 'IF(in_fasceorarie.include_bank_holidays, ''S&igrave;'', ''No'')', 3, 1, 0, 1);
-- Fascia oraria "Ordinaria"
INSERT INTO `in_fasceorarie` (`id`, `nome`, `giorni`, `ora_inizio`, `ora_fine`, `can_delete`) VALUES (NULL, 'Ordinario', '1,2,3,4,5,6,7', '00:00', '23:59', '0');
-- Relazione fasca oraria / tipo intervento
CREATE TABLE IF NOT EXISTS `in_fasceorarie_tipiintervento` (
`idfasciaoraria` int NOT NULL,
`idtipointervento` int NOT NULL,
`costo_orario` decimal(12,6) NOT NULL,
`costo_km` decimal(12,6) NOT NULL,
`costo_diritto_chiamata` decimal(12,6) NOT NULL,
`costo_orario_tecnico` decimal(12,6) NOT NULL,
`costo_km_tecnico` decimal(12,6) NOT NULL,
`costo_diritto_chiamata_tecnico` decimal(12,6) NOT NULL,
PRIMARY KEY (`idfasciaoraria`,`idtipointervento`),
FOREIGN KEY (`idfasciaoraria`) REFERENCES `in_fasceorarie` (`id`),
FOREIGN KEY (`idtipointervento`) REFERENCES `in_tipiintervento` (`idtipointervento`),
KEY `idtipointervento` (`idtipointervento`)
) ENGINE=InnoDB;
-- Nuovo modulo "Eventi"
CREATE TABLE IF NOT EXISTS `zz_events` (
`id` int NOT NULL AUTO_INCREMENT,
`nome` varchar(255) NOT NULL,
`data` date NOT NULL,
`id_nazione` int NOT NULL,
`id_regione` int DEFAULT NULL,
`is_recurring` tinyint(1) NOT NULL DEFAULT '0',
`is_bank_holiday` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
FOREIGN KEY (`id_nazione`) REFERENCES `an_nazioni` (`id`)
) ENGINE=InnoDB;
INSERT INTO `zz_modules` (`id`, `name`, `title`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`, `use_notes`, `use_checklists`) VALUES (NULL, 'Eventi', 'Eventi', 'eventi', 'SELECT |select| FROM `zz_events` INNER JOIN `an_nazioni` ON `an_nazioni`.id = `zz_events`.id_nazione WHERE 1=1 HAVING 2=2', '', 'fa fa-angle-right', '2.4.32', '2.4.32', '1', (SELECT id FROM zz_modules t WHERE t.name = 'Tabelle'), '1', '1', '0', '0');
INSERT INTO `zz_views` (`id`, `id_module`, `name`, `query`, `order`, `visible`, `format`, `default`) VALUES
(NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Eventi'), 'id', 'zz_events.id', 1, 0, 0, 1),
(NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Eventi'), 'Nome', 'zz_events.nome', 2, 1, 0, 1),
(NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Eventi'), 'Nazione', 'an_nazioni.nome', 3, 1, 0, 1),
(NULL, (SELECT `id` FROM `zz_modules` WHERE `name` = 'Eventi'), 'Data', 'zz_events.data', 4, 1, 1, 1);
-- Natale
INSERT INTO `zz_events` (`id`, `nome`, `data`, `id_nazione`, `id_regione`, `is_recurring`, `is_bank_holiday`) VALUES (NULL, 'Natale', '2022-12-25', (SELECT id FROM an_nazioni WHERE nome = 'Italia'), NULL, '1', '1');
-- Fix ordine colonne Conto dare e Conto avere in Prima nota
UPDATE `zz_views` SET `order` = '8' WHERE `zz_views`.`name` = 'Conto dare';
UPDATE `zz_views` SET `order` = '9' WHERE `zz_views`.`name` = 'Conto avere';
UPDATE `zz_views` SET `order` = '20' WHERE `zz_views`.`name` = '_print_';

View File

@ -82,6 +82,8 @@ return [
'in_tariffe',
'in_tipiintervento',
'in_vociservizio',
'in_fasceorarie',
'in_fasceorarie_tipiintervento',
'mg_articoli',
'mg_fornitore_articolo',
'mg_categorie',
@ -118,6 +120,7 @@ return [
'zz_checklist_items',
'zz_documenti',
'zz_documenti_categorie',
'zz_events',
'zz_field_record',
'zz_fields',
'zz_files',