diff --git a/CHANGELOG.md b/CHANGELOG.md index 115e980be..0d424d1eb 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,9 @@ Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://k - Aggiunto controllo file di servizio - Aggiunta email tecnici assegnati nel template Notifica intervento - Aggiunta azione di gruppo invio mail da Attività +- Aggiunte opzioni per connessione al Database +- Aggiunto controllo plugin duplicati per i moduli +- Aggiunto controllo per Anagrafiche con codici REA non validi ### Modificato(Changed) - Miglioria gestione prezzi - Ottimizzate query viste per aumentare la velocità di caricamento dei moduli principali diff --git a/src/API/App/v1/Interventi.php b/src/API/App/v1/Interventi.php index 7204f5adb..170b6cdf5 100644 --- a/src/API/App/v1/Interventi.php +++ b/src/API/App/v1/Interventi.php @@ -36,7 +36,7 @@ class Interventi extends AppResource $today = new Carbon(); $mesi_precedenti = intval(setting('Mesi per lo storico delle Attività')); $start = $today->copy()->subMonths($mesi_precedenti); - $end = $today->copy()->addMonth(1); + $end = $today->copy()->addMonth(); return [ 'today' => $today, diff --git a/src/API/App/v1/RigheInterventi.php b/src/API/App/v1/RigheInterventi.php index 621381890..a2afdc921 100644 --- a/src/API/App/v1/RigheInterventi.php +++ b/src/API/App/v1/RigheInterventi.php @@ -38,7 +38,7 @@ class RigheInterventi extends AppResource // Periodo per selezionare interventi $today = new Carbon(); $start = $today->copy()->subMonths(2); - $end = $today->copy()->addMonth(1); + $end = $today->copy()->addMonth(); // Informazioni sull'utente $user = Auth::user(); @@ -72,7 +72,7 @@ class RigheInterventi extends AppResource // Periodo per selezionare interventi $today = new Carbon(); $start = $today->copy()->subMonths(2); - $end = $today->copy()->addMonth(1); + $end = $today->copy()->addMonth(); // Informazioni sull'utente $user = Auth::user(); diff --git a/src/API/App/v1/SessioniInterventi.php b/src/API/App/v1/SessioniInterventi.php index 25a3817fb..664cab200 100644 --- a/src/API/App/v1/SessioniInterventi.php +++ b/src/API/App/v1/SessioniInterventi.php @@ -34,7 +34,7 @@ class SessioniInterventi extends AppResource $mesi_precedenti = intval(setting('Mesi per lo storico delle Attività')); $today = new Carbon(); $start = $today->copy()->subMonths($mesi_precedenti); - $end = $today->copy()->addMonth(1); + $end = $today->copy()->addMonth(); // Informazioni sull'utente $user = Auth::user(); @@ -73,7 +73,7 @@ class SessioniInterventi extends AppResource $mesi_precedenti = intval(setting('Mesi per lo storico delle Attività')); $today = new Carbon(); $start = $today->copy()->subMonths($mesi_precedenti); - $end = $today->copy()->addMonth(1); + $end = $today->copy()->addMonth(); // Informazioni sull'utente $user = Auth::user(); diff --git a/src/Util/Zip.php b/src/Util/Zip.php index a1ca7a7ec..f4742bddd 100755 --- a/src/Util/Zip.php +++ b/src/Util/Zip.php @@ -116,8 +116,9 @@ class Zip */ public static function check($path) { - $errno = zip_open($path); - zip_close($errno); + $zip = new ZipArchive; + $errno = $zip->open($path); + $errno = $zip->close(); if (!is_resource($errno)) { // using constant name as a string to make this function PHP4 compatible diff --git a/templates/liquidazione_iva/init.php b/templates/liquidazione_iva/init.php index e3cf73e32..5e3749b30 100644 --- a/templates/liquidazione_iva/init.php +++ b/templates/liquidazione_iva/init.php @@ -28,11 +28,11 @@ $anno_precedente_end = (new Carbon($date_end))->subYears(1)->format('Y-m-d'); $periodo = $dbo->fetchOne('SELECT valore FROM zz_settings WHERE nome="Liquidazione iva"'); if ($periodo['valore'] == 'Mensile') { - $periodo_precedente_start = (new Carbon($date_start))->subMonth(1)->format('Y-m-d'); - $periodo_precedente_end = (new Carbon($date_end))->subMonth(1)->format('Y-m-d'); + $periodo_precedente_start = (new Carbon($date_start))->subMonth()->format('Y-m-d'); + $periodo_precedente_end = (new Carbon($date_end))->subMonth()->format('Y-m-d'); } else { - $periodo_precedente_start = (new Carbon($date_start))->subMonth(3)->format('Y-m-d'); - $periodo_precedente_end = (new Carbon($date_end))->subMonth(3)->format('Y-m-d'); + $periodo_precedente_start = (new Carbon($date_start))->subMonths(3)->format('Y-m-d'); + $periodo_precedente_end = (new Carbon($date_end))->subMonths(3)->format('Y-m-d'); } $maggiorazione = 0;