Compare commits
8 Commits
6bf644e45d
...
025dc5dcd3
Author | SHA1 | Date |
---|---|---|
Pek5892 | 025dc5dcd3 | |
Pek5892 | 2700b0c0f8 | |
Pek5892 | 4da98e49d0 | |
Pek5892 | 5ac04f4a01 | |
Pek5892 | 982f029f43 | |
Pek5892 | bc43765546 | |
Pek5892 | fedf455b1f | |
Pek5892 | 6c6fb4fd24 |
|
@ -63,7 +63,7 @@ L'installazione del gestionale richiede la presenza di un server web con abilita
|
|||
|
||||
| PHP | EOL | Supportato |
|
||||
|-----|-----|:----------:|
|
||||
| 8.1 | 25/11/2024 | ❌ |
|
||||
| 8.1 | 25/11/2024 | ✔️ |
|
||||
| 8.0 | 26/11/2023 | ✔️ |
|
||||
| 7.4 | 28/11/2022 | ✔️ |
|
||||
| 7.3 | 06/12/2021 | ✔️ |
|
||||
|
@ -74,7 +74,10 @@ L'installazione del gestionale richiede la presenza di un server web con abilita
|
|||
|
||||
| MYSQL | EOL | Supportato |
|
||||
|-----|-----|:----------:|
|
||||
| 8.0 | 01/04/2026 | ✔️ |
|
||||
| 8.3 | 30/04/2024 | ✔️ |
|
||||
| 8.2 | 31/01/2024 | ✔️ |
|
||||
| 8.1 | 25/10/2023 | ✔️ |
|
||||
| 8.0 | 30/04/2026 | ✔️ |
|
||||
| 5.7 | 21/10/2023 | ✔️ |
|
||||
| 5.6 | 05/02/2021 | ❌ |
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
"willdurand/geocoder": "^4.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.10.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.53",
|
||||
"rector/rector": "^1.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
|
|
@ -93,7 +93,7 @@ echo '
|
|||
</div>
|
||||
</div>';
|
||||
|
||||
redirectOperation($id_module, isset($id_parent) ? $id_parent : $id_record);
|
||||
redirectOperation($id_module, !empty($id_parent) ? $id_parent : $id_record);
|
||||
|
||||
// Interfaccia per la modifica dell'ordine e della visibilità delle colonne (Amministratore)
|
||||
if ($user->is_admin && string_contains($module['option'], '|select|')) {
|
||||
|
|
|
@ -17,8 +17,6 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$result['id'] ??= null;
|
||||
|
||||
// Form di inserimento riga documento
|
||||
echo '
|
||||
<form action="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post" id="submit-form">
|
||||
|
|
|
@ -106,7 +106,7 @@ $settings = [
|
|||
'type' => 'version',
|
||||
'description' => '7.3.x - 8.0.x, consigliato almeno 7.4.x',
|
||||
'minimum' => '7.3.0',
|
||||
'maximum' => '8.0.99',
|
||||
'maximum' => '8.1.99',
|
||||
],
|
||||
|
||||
'zip' => [
|
||||
|
@ -251,7 +251,7 @@ if ($database->isInstalled()) {
|
|||
'warning' => $database->isMySQL() ? false : true,
|
||||
'description' => $database->isMySQL() ? '5.7.x - 8.0.x' : '10.x',
|
||||
'minimum' => $database->isMySQL() ? '5.7.0' : '10.1.0',
|
||||
'maximum' => $database->isMySQL() ? '8.0.99' : '10.6.99',
|
||||
'maximum' => $database->isMySQL() ? '8.3.99' : '10.6.99',
|
||||
],
|
||||
|
||||
'sort_buffer_size' => [
|
||||
|
|
|
@ -297,7 +297,7 @@ function slashes($string)
|
|||
*/
|
||||
function isAjaxRequest()
|
||||
{
|
||||
return Whoops\Util\Misc::isAjaxRequest() && filter('ajax') !== null;
|
||||
return Whoops\Util\Misc::isAjaxRequest() && filter('ajax') !== null && filter('op') !== '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -242,9 +242,13 @@ switch (post('op')) {
|
|||
echo json_encode(['id' => $id_record, 'text' => $anagrafica->ragione_sociale]);
|
||||
}
|
||||
|
||||
$descrizioni_tipi = $anagrafica->tipi()->get()->pluck('name')->toArray();
|
||||
$descrizioni_tipi = $anagrafica->tipi()->get();
|
||||
foreach ($descrizioni_tipi as $tipo) {
|
||||
$tipi[] = $tipo->getTranslation('name');
|
||||
}
|
||||
|
||||
flash()->info(tr('Aggiunta nuova anagrafica di tipo _TYPE_', [
|
||||
'_TYPE_' => '"'.implode(', ', $descrizioni_tipi).'"',
|
||||
'_TYPE_' => '"'.implode(', ', $tipi).'"',
|
||||
]));
|
||||
|
||||
// Controllo che il Codice Fiscale non sia già presente
|
||||
|
|
|
@ -32,19 +32,19 @@ if (!function_exists('aggiorna_sedi_movimenti')) {
|
|||
|
||||
$idsede = ($rs[0]['dir'] == 'uscita') ? $rs[0]['idsede_destinazione'] : $rs[0]['idsede_partenza'];
|
||||
|
||||
$dbo->query('UPDATE `mg_movimenti` SET `idsede`='.prepare($idsede).' WHERE `reference_type`='.prepare(\Modules\DDT\DDT::class).' AND `reference_id`='.prepare($id));
|
||||
$dbo->query('UPDATE `mg_movimenti` SET `idsede`='.prepare($idsede).' WHERE `reference_type`='.prepare(Modules\DDT\DDT::class).' AND `reference_id`='.prepare($id));
|
||||
} elseif ($module == 'documenti') {
|
||||
$rs = $dbo->fetchArray('SELECT `idsede_partenza`, `idsede_destinazione`, `dir` FROM `co_documenti` INNER JOIN `co_tipidocumento` ON `co_tipidocumento`.`id` = `co_documenti`.`idtipodocumento` WHERE `co_documenti`.`id`='.prepare($id));
|
||||
|
||||
$idsede = ($rs[0]['dir'] == 'uscita') ? $rs[0]['idsede_destinazione'] : $rs[0]['idsede_partenza'];
|
||||
|
||||
$dbo->query('UPDATE mg_movimenti SET idsede='.prepare($idsede).' WHERE reference_type='.prepare(\Modules\Fatture\Fattura::class).' AND reference_id='.prepare($id));
|
||||
$dbo->query('UPDATE mg_movimenti SET idsede='.prepare($idsede).' WHERE reference_type='.prepare(Modules\Fatture\Fattura::class).' AND reference_id='.prepare($id));
|
||||
} elseif ($module == 'interventi') {
|
||||
$rs = $dbo->fetchArray('SELECT idsede_partenza, idsede_destinazione FROM in_interventi WHERE in_interventi.id='.prepare($id));
|
||||
|
||||
$idsede = $rs[0]['idsede_partenza'];
|
||||
|
||||
$dbo->query('UPDATE mg_movimenti SET idsede='.prepare($idsede).' WHERE reference_type='.prepare(\Modules\Interventi\Intervento::class).' AND reference_id='.prepare($id));
|
||||
$dbo->query('UPDATE mg_movimenti SET idsede='.prepare($idsede).' WHERE reference_type='.prepare(Modules\Interventi\Intervento::class).' AND reference_id='.prepare($id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ if ($fattura) {
|
|||
$stato_fe = $dbo->fetchOne('SELECT codice_stato_fe FROM co_documenti WHERE id = '.$fattura->id);
|
||||
}
|
||||
|
||||
|
||||
$ops = ['update', 'add_intervento', 'manage_documento_fe', 'manage_riga_fe', 'manage_articolo', 'manage_sconto', 'manage_riga', 'manage_descrizione', 'unlink_intervento', 'delete_riga', 'copy_riga', 'add_serial', 'add_articolo', 'edit-price'];
|
||||
|
||||
if ($dir === 'entrata' && in_array($stato_fe['codice_stato_fe'], ['WAIT', 'RC', 'MC', 'QUEUE', 'DT', 'EC01', 'NE']) && Interaction::isEnabled() && in_array($op, $ops)) {
|
||||
|
|
|
@ -626,11 +626,11 @@ switch (post('op')) {
|
|||
$intervento->idreferente = $documento->idreferente;
|
||||
$intervento->idagente = $documento->idagente;
|
||||
|
||||
if ($class == \Modules\Preventivi\Preventivo::class) {
|
||||
if ($class == Modules\Preventivi\Preventivo::class) {
|
||||
$intervento->id_preventivo = $documento->id;
|
||||
$intervento->richiesta = 'Attività creata da preventivo num. '.$documento->numero.'<br>'.$documento->nome;
|
||||
}
|
||||
if ($class == \Modules\Ordini\Ordine::class) {
|
||||
if ($class == Modules\Ordini\Ordine::class) {
|
||||
$intervento->id_ordine = $documento->id;
|
||||
$intervento->richiesta = 'Attività creata da ordine num. '.$documento->numero_esterno;
|
||||
}
|
||||
|
|
|
@ -19,10 +19,8 @@
|
|||
|
||||
namespace Modules\Pagamenti;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Common\SimpleModelTrait;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Modules\Fatture\Fattura;
|
||||
use Traits\RecordTrait;
|
||||
|
||||
class PagamentoLang extends Model
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
use PHPSQLParser\PHPSQLParser;
|
||||
|
||||
if (isset($id_record)) {
|
||||
$record = $dbo->fetchOne('SELECT
|
||||
`zz_segments`.*,
|
||||
|
@ -44,5 +45,4 @@ if (isset($id_record)) {
|
|||
} else {
|
||||
$tot = 0;
|
||||
}
|
||||
|
||||
}
|
|
@ -267,7 +267,7 @@ echo '
|
|||
</div>';
|
||||
|
||||
// Articoli più venduti
|
||||
$articoli = $dbo->fetchArray("SELECT
|
||||
$articoli = $dbo->fetchArray('SELECT
|
||||
SUM(IF(`reversed`=1, -`co_righe_documenti`.`qta`, `co_righe_documenti`.`qta`)) AS qta,
|
||||
SUM(IF(`reversed`=1, -(`co_righe_documenti`.`subtotale` - `co_righe_documenti`.`sconto`), (`co_righe_documenti`.`subtotale` - `co_righe_documenti`.`sconto`))) AS totale,
|
||||
`mg_articoli`.`id`,
|
||||
|
@ -277,29 +277,29 @@ $articoli = $dbo->fetchArray("SELECT
|
|||
FROM
|
||||
`co_documenti`
|
||||
INNER JOIN `co_statidocumento` ON `co_statidocumento`.`id` = `co_documenti`.`idstatodocumento`
|
||||
LEFT JOIN `co_statidocumento_lang` ON `co_statidocumento_lang`.`id_record` = `co_statidocumento`.`id` AND `co_statidocumento_lang`.`id_lang` = ".prepare(Models\Locale::getDefault()->id)."
|
||||
LEFT JOIN `co_statidocumento_lang` ON `co_statidocumento_lang`.`id_record` = `co_statidocumento`.`id` AND `co_statidocumento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).'
|
||||
INNER JOIN `co_tipidocumento` ON `co_documenti`.`idtipodocumento`=`co_tipidocumento`.`id`
|
||||
INNER JOIN `co_righe_documenti` ON `co_righe_documenti`.`iddocumento`=`co_documenti`.`id`
|
||||
INNER JOIN `mg_articoli` ON `mg_articoli`.`id`=`co_righe_documenti`.`idarticolo`
|
||||
LEFT JOIN `mg_articoli_lang` ON (`mg_articoli_lang`.`id_record`=`mg_articoli`.`id` AND `mg_articoli_lang`.`id_lang` = ".prepare(Models\Locale::getDefault()->id).")
|
||||
LEFT JOIN `mg_articoli_lang` ON (`mg_articoli_lang`.`id_record`=`mg_articoli`.`id` AND `mg_articoli_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id).")
|
||||
INNER JOIN `zz_segments` ON `co_documenti`.`id_segment`=`zz_segments`.`id`
|
||||
WHERE
|
||||
`co_tipidocumento`.`dir`='entrata'
|
||||
AND `co_statidocumento_lang`.`name` IN ('Pagato', 'Parzialmente pagato', 'Emessa')
|
||||
AND `co_documenti`.`data` BETWEEN ".prepare($start)." AND ".prepare($end)."
|
||||
AND `co_documenti`.`data` BETWEEN ".prepare($start).' AND '.prepare($end).'
|
||||
AND `zz_segments`.`autofatture`=0
|
||||
GROUP BY
|
||||
`co_righe_documenti`.`idarticolo`
|
||||
ORDER BY
|
||||
`qta` DESC LIMIT 20");
|
||||
`qta` DESC LIMIT 20');
|
||||
|
||||
$totale = $dbo->fetchArray("SELECT
|
||||
$totale = $dbo->fetchArray('SELECT
|
||||
SUM(IF(`reversed`=1, - `co_righe_documenti`.`qta`, `co_righe_documenti`.`qta`)) AS totale_qta,
|
||||
SUM(IF(`reversed`=1, - (`co_righe_documenti`.`subtotale` - `co_righe_documenti`.`sconto`), (`co_righe_documenti`.`subtotale` - `co_righe_documenti`.`sconto`))) AS totale
|
||||
FROM
|
||||
`co_documenti`
|
||||
INNER JOIN `co_statidocumento` ON `co_statidocumento`.`id` = `co_documenti`.`idstatodocumento`
|
||||
LEFT JOIN `co_statidocumento_lang` ON `co_statidocumento_lang`.`id_record` = `co_statidocumento`.`id` AND `co_statidocumento_lang`.`id_lang` = ".prepare(Models\Locale::getDefault()->id)."
|
||||
LEFT JOIN `co_statidocumento_lang` ON `co_statidocumento_lang`.`id_record` = `co_statidocumento`.`id` AND `co_statidocumento_lang`.`id_lang` = '.prepare(Models\Locale::getDefault()->id)."
|
||||
INNER JOIN `co_tipidocumento` ON `co_documenti`.`idtipodocumento`=`co_tipidocumento`.`id`
|
||||
INNER JOIN `co_righe_documenti` ON `co_righe_documenti`.`iddocumento`=`co_documenti`.`id`
|
||||
INNER JOIN `mg_articoli` ON `mg_articoli`.`id`=`co_righe_documenti`.`idarticolo`
|
||||
|
@ -307,8 +307,8 @@ $totale = $dbo->fetchArray("SELECT
|
|||
WHERE
|
||||
`co_tipidocumento`.`dir`='entrata'
|
||||
AND `co_statidocumento_lang`.name IN ('Pagato', 'Parzialmente pagato', 'Emessa')
|
||||
AND `co_documenti`.`data` BETWEEN ".prepare($start)." AND ".prepare($end)."
|
||||
AND `zz_segments`.`autofatture`=0");
|
||||
AND `co_documenti`.`data` BETWEEN ".prepare($start).' AND '.prepare($end).'
|
||||
AND `zz_segments`.`autofatture`=0');
|
||||
|
||||
echo '
|
||||
<div class="col-md-6">
|
||||
|
|
|
@ -64,7 +64,7 @@ foreach ($gruppi as $modulo => $hooks) {
|
|||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
'.Translator::timestampToLocale($hook->processing_at).'
|
||||
'.!empty($hook->processing_at) ? Translator::timestampToLocale($hook->processing_at) : ''.'
|
||||
</td>
|
||||
|
||||
<td class="text-center">';
|
||||
|
|
|
@ -39,7 +39,7 @@ foreach ($fields as $key => $field) {
|
|||
<div class="box collapsed-box box-'.($field->visible ? 'success' : 'danger').'">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">'.
|
||||
$field->getTranslation('name').' <small class="text-muted tip" title="'.(new \Carbon\Carbon($field->updated_at))->format('d/m/Y H:i').'">'.(new \Carbon\Carbon($field->updated_at))->diffForHumans().'</small>
|
||||
$field->getTranslation('name').' <small class="text-muted tip" title="'.(new Carbon\Carbon($field->updated_at))->format('d/m/Y H:i').'">'.(new Carbon\Carbon($field->updated_at))->diffForHumans().'</small>
|
||||
</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
|
|
|
@ -24,6 +24,6 @@ return static function (RectorConfig $rectorConfig): void {
|
|||
|
||||
// define sets of rules
|
||||
$rectorConfig->sets([
|
||||
LevelSetList::UP_TO_PHP_81
|
||||
LevelSetList::UP_TO_PHP_81,
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -168,7 +168,7 @@ class Auth extends Util\Singleton
|
|||
|
||||
// Salvataggio dello stato corrente
|
||||
$log['stato'] = self::getStatus()[$status]['code'];
|
||||
$log['user_agent'] = \Filter::getPurifier()->purify($_SERVER['HTTP_USER_AGENT']);
|
||||
$log['user_agent'] = Filter::getPurifier()->purify($_SERVER['HTTP_USER_AGENT']);
|
||||
$this->current_status = $status;
|
||||
|
||||
// Salvataggio del tentativo nel database
|
||||
|
|
|
@ -210,7 +210,7 @@ class Update
|
|||
// Normalizzazione di charset e collation
|
||||
self::normalizeDatabase($database->getDatabaseName());
|
||||
|
||||
if (class_exists(\Models\Cache::class)) {
|
||||
if (class_exists(Cache::class)) {
|
||||
Cache::find((new Cache())->getByField('name', 'Ultima versione di OpenSTAManager disponibile', Models\Locale::getPredefined()->id))->set(null);
|
||||
}
|
||||
|
||||
|
@ -424,7 +424,11 @@ class Update
|
|||
|
||||
public static function getSettings()
|
||||
{
|
||||
$settings = Setting::get()->toArray();
|
||||
$settings_all = Setting::all();
|
||||
|
||||
foreach ($settings_all as $setting) {
|
||||
$settings[$setting->nome] = $setting->tipo;
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
|
|
@ -1016,3 +1016,7 @@ foreach ($traduzioni as $traduzione) {
|
|||
$database->query('UPDATE '.$traduzione[0].' SET `help` = '.prepare($traduzione[3]).' WHERE `title` = '.prepare($traduzione[2]).' AND `id_lang` = 2');
|
||||
$database->query('UPDATE '.$traduzione[0].' SET `title` = '.prepare($traduzione[1]).' WHERE `title` = '.prepare($traduzione[2]).' AND `id_lang` = 2');
|
||||
}
|
||||
|
||||
$database->query('INSERT INTO `mg_articoli_lang` (`id`, `id_lang`, `id_record`, `name`) SELECT NULL, (SELECT `id` FROM `zz_langs` WHERE `predefined` = 1), `id`, `descrizione` FROM `mg_articoli`');
|
||||
$database->query('ALTER TABLE `mg_articoli`
|
||||
DROP `descrizione`;');
|
||||
|
|
|
@ -1259,11 +1259,6 @@ ALTER TABLE `mg_articoli_lang`
|
|||
ALTER TABLE `mg_articoli_lang`
|
||||
MODIFY `id` int NOT NULL AUTO_INCREMENT;
|
||||
|
||||
INSERT INTO `mg_articoli_lang` (`id`, `id_lang`, `id_record`, `name`) SELECT NULL, (SELECT `id` FROM `zz_langs` WHERE `predefined` = 1), `id`, `descrizione` FROM `mg_articoli`;
|
||||
|
||||
ALTER TABLE `mg_articoli`
|
||||
DROP `descrizione`;
|
||||
|
||||
ALTER TABLE `mg_articoli_lang` ADD CONSTRAINT `mg_articoli_lang_ibfk_1` FOREIGN KEY (`id_record`) REFERENCES `mg_articoli`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
|
||||
|
||||
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`mg_articoli_lang`.`name`' WHERE `zz_modules`.`name` = 'Articoli' AND `zz_views`.`name` = 'Descrizione';
|
||||
|
|
|
@ -133,7 +133,7 @@ HAVING
|
|||
|
||||
|
||||
-- Rinomino plugin Sedi in Anagrafica
|
||||
UPDATE `zz_plugins_lang` SET `title` = 'Sedi aggiuntive' WHERE `zz_plugins_lang`.`id_lang` = (SELECT id FROM zz_langs WHERE iso_code = 'it') AND `name` = 'Sedi';
|
||||
UPDATE `zz_plugins_lang` SET `title` = 'Sedi aggiuntive' WHERE `zz_plugins_lang`.`id_lang` = (SELECT `id` FROM `zz_langs` WHERE `predefined` = 1) AND `name` = 'Sedi';
|
||||
|
||||
-- Aggiunte chiavi esterne con zz_langs
|
||||
ALTER TABLE `an_nazioni_lang` ADD CONSTRAINT `an_nazioni_lang_ibfk_2` FOREIGN KEY (`id_lang`) REFERENCES `zz_langs`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT;
|
||||
|
|
Loading…
Reference in New Issue