Skip to content

Commit

Permalink
Aggiornamento CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
Pek5892 committed Mar 28, 2024
1 parent cd1cb11 commit ab2f83f
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +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.5 (2024-03-27)](#25-2024-03-27)
- [2.5 (2024-03-28)](#25-2024-03-28)
- [2.4.54 (2024-02-02)](#2454-2024-02-02)
- [2.4.53 (2024-01-05)](#2453-2024-01-05)
- [2.4.52 (2023-12-08)](#2452-2023-12-08)
Expand Down Expand Up @@ -66,7 +66,7 @@ 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.5 (2024-03-27)
## 2.5 (2024-03-28)
### Aggiunto (Added)
- Aggiunte le tabelle '_lang' per la gestione delle traduzioni dei dati presenti a database
- Aggiunta log rimozione sessioni per velocizzare la sincronizzazione dell'app
Expand Down
10 changes: 5 additions & 5 deletions include/common/importa.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
use Modules\Contratti\Stato as StatoContratto;
use Modules\DDT\Stato;
use Modules\Fatture\Stato as StatoFattura;
use Modules\Fatture\Tipo as Tipofattura;
use Modules\Ordini\Stato as StatoOrdine;
use Plugins\ListinoFornitori\DettaglioFornitore;
use Modules\Fatture\Tipo as Tipofattura;

// Inizializzazione
$documento = $options['documento'];
Expand All @@ -45,8 +45,8 @@

$righe_totali = $documento->getRighe();

$id_module_interventi = (new Module)->getByField('name', 'Interventi', Models\Locale::getPredefined()->id);
$id_module_ordini_f = (new Module)->getByField('name', 'Ordini fornitore', Models\Locale::getPredefined()->id);
$id_module_interventi = (new Module())->getByField('name', 'Interventi', Models\Locale::getPredefined()->id);
$id_module_ordini_f = (new Module())->getByField('name', 'Ordini fornitore', Models\Locale::getPredefined()->id);
if ($final_module->id == $id_module_interventi) {
$righe = $righe_totali->where('is_descrizione', '=', 0)
->where('qta_rimanente', '>', 0);
Expand Down Expand Up @@ -102,8 +102,8 @@
$id_module_ddt_acquisto = (new Module())->getByField('name', 'Ddt di acquisto', Models\Locale::getPredefined()->id);
if (in_array($final_module->id, [$id_module_fatt_vendita, $id_module_fatt_acquisto])) {
$stato_predefinito = (new StatoFattura())->getByField('name', 'Bozza', Models\Locale::getPredefined()->id);
$fatt_differita_acquisto = (new TipoFattura())->getByField('name', 'Fattura differita di acquisto', Models\Locale::getPredefined()->id);
$fatt_differita_vendita = (new TipoFattura())->getByField('name', 'Fattura differita di vendita', Models\Locale::getPredefined()->id);
$fatt_differita_acquisto = (new Tipofattura())->getByField('name', 'Fattura differita di acquisto', Models\Locale::getPredefined()->id);
$fatt_differita_vendita = (new Tipofattura())->getByField('name', 'Fattura differita di vendita', Models\Locale::getPredefined()->id);

if (!empty($options['reversed'])) {
$idtipodocumento = database()->fetchOne('SELECT `co_tipidocumento`.`id` FROM `co_tipidocumento` LEFT JOIN `co_tipidocumento_lang` ON (`co_tipidocumento_lang`.`id_record` = `co_tipidocumento`.`id` AND `co_tipidocumento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).') WHERE `name` = "Nota di credito" AND `dir` = \''.$dir.'\'')['id'];
Expand Down
4 changes: 2 additions & 2 deletions include/init/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
$has_azienda = $dbo->fetchNum('SELECT `an_anagrafiche`.`idanagrafica` FROM `an_anagrafiche`
LEFT JOIN `an_tipianagrafiche_anagrafiche` ON `an_anagrafiche`.`idanagrafica`=`an_tipianagrafiche_anagrafiche`.`idanagrafica`
LEFT JOIN `an_tipianagrafiche` ON `an_tipianagrafiche`.`id`=`an_tipianagrafiche_anagrafiche`.`idtipoanagrafica`
LEFT JOIN `an_tipianagrafiche_lang` ON (`an_tipianagrafiche`.`id`=`an_tipianagrafiche_lang`.`id_record` AND `an_tipianagrafiche_lang`.`id_lang`='.prepare(Models\Locale::getDefault()->id).")
WHERE `an_tipianagrafiche`.`id` = ".$id_tipo_azienda." AND `an_anagrafiche`.`deleted_at` IS NULL") != 0;
LEFT JOIN `an_tipianagrafiche_lang` ON (`an_tipianagrafiche`.`id`=`an_tipianagrafiche_lang`.`id_record` AND `an_tipianagrafiche_lang`.`id_lang`='.prepare(Models\Locale::getDefault()->id).')
WHERE `an_tipianagrafiche`.`id` = '.$id_tipo_azienda.' AND `an_anagrafiche`.`deleted_at` IS NULL') != 0;
$has_user = $dbo->fetchNum('SELECT `id` FROM `zz_users`') != 0;

$settings = [
Expand Down
2 changes: 1 addition & 1 deletion modules/anagrafiche/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$rs = Tipo::get();

foreach ($rs as $riga) {
${'id_'.strtolower($riga->getTranslation('name', \Models\Locale::getPredefined()->id))} = $riga->id;
${'id_'.strtolower($riga->getTranslation('name', Models\Locale::getPredefined()->id))} = $riga->id;
}

if (!empty($id_record)) {
Expand Down
2 changes: 1 addition & 1 deletion modules/fatture/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

$module = Module::find($id_module);
$op = post('op');
if ($module->getTranslation('name', \Models\Locale::getPredefined()->id) == 'Fatture di vendita') {
if ($module->getTranslation('name', Models\Locale::getPredefined()->id) == 'Fatture di vendita') {
$dir = 'entrata';
} else {
$dir = 'uscita';
Expand Down
34 changes: 17 additions & 17 deletions modules/fatture/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@
use Models\Module;
use Models\Plugin;
use Modules\Anagrafiche\Anagrafica;
use Modules\DDT\Stato as StatoDDT;
use Modules\Fatture\Fattura;
use Modules\Fatture\Gestori\Bollo;
use Modules\Fatture\Stato as StatoFattura;
use Modules\Interventi\Intervento;
use Modules\Iva\Aliquota;
use Plugins\ExportFE\Interaction;
use Modules\Fatture\Stato as StatoFattura;
use Modules\DDT\Stato as StatoDDT;
use Modules\Ordini\Stato as StatoOrdine;
use Plugins\ExportFE\Interaction;

include_once __DIR__.'/../../core.php';

$anagrafica_azienda = Anagrafica::find(setting('Azienda predefinita'));

$id_stato_bozza = (new StatoFattura())->getByField('name', 'Bozza', \Models\Locale::getPredefined()->id);
$id_stato_emessa = (new StatoFattura())->getByField('name', 'Emessa', \Models\Locale::getPredefined()->id);
$id_stato_pagato = (new StatoFattura())->getByField('name', 'Pagato', \Models\Locale::getPredefined()->id);
$id_stato_parz_pagato = (new StatoFattura())->getByField('name', 'Parzialmente pagato', \Models\Locale::getPredefined()->id);
$id_stato_non_valida = (new StatoFattura())->getByField('name', 'Non valida', \Models\Locale::getPredefined()->id);
$id_stato_annullata = (new StatoFattura())->getByField('name', 'Annullata', \Models\Locale::getPredefined()->id);
$id_stato_bozza = (new StatoFattura())->getByField('name', 'Bozza', Models\Locale::getPredefined()->id);
$id_stato_emessa = (new StatoFattura())->getByField('name', 'Emessa', Models\Locale::getPredefined()->id);
$id_stato_pagato = (new StatoFattura())->getByField('name', 'Pagato', Models\Locale::getPredefined()->id);
$id_stato_parz_pagato = (new StatoFattura())->getByField('name', 'Parzialmente pagato', Models\Locale::getPredefined()->id);
$id_stato_non_valida = (new StatoFattura())->getByField('name', 'Non valida', Models\Locale::getPredefined()->id);
$id_stato_annullata = (new StatoFattura())->getByField('name', 'Annullata', Models\Locale::getPredefined()->id);

$block_edit = !empty($note_accredito) || in_array($fattura->stato->id, [$id_stato_parz_pagato, $id_stato_pagato, $id_stato_emessa]) || !$abilita_genera;

Expand Down Expand Up @@ -296,7 +296,7 @@
}
// Forzo il passaggio della fattura da Bozza ad Emessa per il corretto calcolo del numero.
elseif ($fattura->stato->id == $id_stato_bozza) {
$query .= " WHERE `co_statidocumento`.`id` IN (".$id_stato_emessa.", ".$id_stato_bozza.")";
$query .= ' WHERE `co_statidocumento`.`id` IN ('.$id_stato_emessa.', '.$id_stato_bozza.')';
}

$query .= ' ORDER BY `name`';
Expand Down Expand Up @@ -817,9 +817,9 @@
$contratti = $dbo->fetchArray($contr_query)[0]['tot'];
}

$id_stato_evaso = (new StatoDDT())->getByField('name', 'Evaso', \Models\Locale::getPredefined()->id);
$id_stato_parz_evaso = (new StatoDDT())->getByField('name', 'Parziale evaso', \Models\Locale::getPredefined()->id);
$id_stato_parz_fatt = (new StatoDDT())->getByField('name', 'Parziale fatturato', \Models\Locale::getPredefined()->id);
$id_stato_evaso = (new StatoDDT())->getByField('name', 'Evaso', Models\Locale::getPredefined()->id);
$id_stato_parz_evaso = (new StatoDDT())->getByField('name', 'Parziale evaso', Models\Locale::getPredefined()->id);
$id_stato_parz_fatt = (new StatoDDT())->getByField('name', 'Parziale fatturato', Models\Locale::getPredefined()->id);

// Lettura ddt (entrata o uscita)
$ddt_query = 'SELECT
Expand All @@ -840,10 +840,10 @@
$ddt = $dbo->fetchArray($ddt_query)[0]['tot'];

// Lettura ordini (cliente o fornitore)
$id_stato_accettato = (new StatoOrdine())->getByField('name', 'Accettato', \Models\Locale::getPredefined()->id);
$id_stato_evaso = (new StatoOrdine())->getByField('name', 'Evaso', \Models\Locale::getPredefined()->id);
$id_stato_parz_evaso = (new StatoOrdine())->getByField('name', 'Parziale evaso', \Models\Locale::getPredefined()->id);
$id_stato_parz_fatt = (new StatoOrdine())->getByField('name', 'Parziale fatturato', \Models\Locale::getPredefined()->id);
$id_stato_accettato = (new StatoOrdine())->getByField('name', 'Accettato', Models\Locale::getPredefined()->id);
$id_stato_evaso = (new StatoOrdine())->getByField('name', 'Evaso', Models\Locale::getPredefined()->id);
$id_stato_parz_evaso = (new StatoOrdine())->getByField('name', 'Parziale evaso', Models\Locale::getPredefined()->id);
$id_stato_parz_fatt = (new StatoOrdine())->getByField('name', 'Parziale fatturato', Models\Locale::getPredefined()->id);

$ordini_query = 'SELECT
COUNT(*) AS tot
Expand Down
2 changes: 1 addition & 1 deletion modules/ordini/add.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

$module = Module::find($id_module);

if ($module->getTranslation('name', \Models\Locale::getPredefined()->id) == 'Ordini cliente') {
if ($module->getTranslation('name', Models\Locale::getPredefined()->id) == 'Ordini cliente') {
$dir = 'entrata';

$tipo_anagrafica = 'Cliente';
Expand Down
6 changes: 3 additions & 3 deletions modules/ordini/crea_documento.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$module = Module::find((new Module())->getByField('name', $documento->module, Models\Locale::getPredefined()->id));

if (get('documento') == 'fattura') {
$final_module = $module->getTranslation('name', \Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'Fatture di vendita' : 'Fatture di acquisto';
$final_module = $module->getTranslation('name', Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'Fatture di vendita' : 'Fatture di acquisto';
$op = 'add_documento';
$tipo_documento_finale = Fattura::class;
} elseif (get('documento') == 'ordine_fornitore') {
Expand All @@ -39,10 +39,10 @@
$tipo_documento_finale = Ordine::class;
} elseif (get('documento') == 'intervento') {
$final_module = 'Interventi';
$op = $module->getTranslation('name', \Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'add_documento' : 'add_intervento';
$op = $module->getTranslation('name', Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'add_documento' : 'add_intervento';
$tipo_documento_finale = Intervento::class;
} else {
$final_module = $module->getTranslation('name', \Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'Ddt di vendita' : 'Ddt di acquisto';
$final_module = $module->getTranslation('name', Models\Locale::getPredefined()->id) == 'Ordini cliente' ? 'Ddt di vendita' : 'Ddt di acquisto';
$op = 'add_ordine';
$tipo_documento_finale = DDT::class;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ordini/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$block_edit = $record['flag_completato'];
$module = Module::find($id_module);

if ($module->getTranslation('name', \Models\Locale::getPredefined()->id) == 'Ordini cliente') {
if ($module->getTranslation('name', Models\Locale::getPredefined()->id) == 'Ordini cliente') {
$dir = 'entrata';
} else {
$dir = 'uscita';
Expand Down
2 changes: 1 addition & 1 deletion modules/preventivi/src/Preventivo.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function triggerEvasione(Component $trigger)
$qta = $righe->sum('qta');
$parziale = $qta != $qta_evasa;
$stato = $this->stato;

// Impostazione del nuovo stato
if ($qta_evasa == 0) {
$descrizione = 'In lavorazione';
Expand Down
2 changes: 1 addition & 1 deletion src/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public static function link($modulo, $id_record = null, $testo = null, $alternat
$testo = $testo.' <i class="fa fa-external-link"></i>';
}

$module = self::get((new Module())->getByField('name', $modulo, \Models\Locale::getPredefined()->id));
$module = self::get((new Module())->getByField('name', $modulo, Models\Locale::getPredefined()->id));

$extra .= !empty($blank) ? ' target="_blank"' : '';

Expand Down

0 comments on commit ab2f83f

Please sign in to comment.