mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-23 06:47:40 +01:00
Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
9be5d8c9e3
@ -4,6 +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.4 ())](#254-)
|
||||
- [2.5.3 (2024-08-07)](#253-2024-08-07)
|
||||
- [2.5.2 (2024-05-31)](#252-2024-05-31)
|
||||
- [2.5.1 (2024-04-24)](#251-2024-04-24)
|
||||
@ -69,6 +70,14 @@ 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.4
|
||||
### Aggiunto (Added)
|
||||
|
||||
### Modificato (Changed)
|
||||
|
||||
### Fixed
|
||||
- Corretta la modifica della descrizione di una riga articolo inserita in un contratto, ddt, attività, ordine e preventivo.
|
||||
|
||||
## 2.5.3 (2024-08-07)
|
||||
### Aggiunto (Added)
|
||||
- Aggiunto il valore delle **Vendite al banco** sul grafico del Fatturato
|
||||
|
@ -1,6 +1,15 @@
|
||||
In questo file verranno riassunte le problematiche del gestionale che sono già note alla community.
|
||||
Le problematiche saranno raggruppate per release e le relative correzioni (se applicabili) saranno riportate sotto la sezione **Soluzione**.
|
||||
|
||||
#### 2.5.3 - 07/08/2024
|
||||
|
||||
##### Problemi noti
|
||||
Non è possibile modificare la descrizione di una riga articolo inserita in un contratto, ddt, attività, ordine e preventivo.
|
||||
|
||||
##### Soluzione
|
||||
https://github.com/devcode-it/openstamanager/commit/b82efb339f8df5da4f2279e25d72904778d2a8d3
|
||||
|
||||
|
||||
#### 2.4.54 - 03/02/2024
|
||||
|
||||
##### Problemi noti
|
||||
|
@ -50,14 +50,14 @@ $(document).ready(function () {
|
||||
data = data ? data : [];
|
||||
|
||||
// Trasformazione risultati in formato leggibile
|
||||
const results = data.map(function (result) {
|
||||
return {
|
||||
label: result.badge ? result.badge : '<h4>' + result.title + '</h4>' + result.badges
|
||||
.join('').split('<br/>,').join('<br/>'),
|
||||
group: result.category,
|
||||
link: result.link,
|
||||
value: result.title
|
||||
}
|
||||
const results = data.map(result => {
|
||||
const title = result.title;
|
||||
const labels = result.labels.join('').split('<br/>,').join('<br/>');
|
||||
const label = result.label ? result.label : `<h5>${title}</h5><small>${labels}</small>`;
|
||||
const group = result.category;
|
||||
const link = result.link;
|
||||
const value = result.title;
|
||||
return { label, group, link, value };
|
||||
});
|
||||
|
||||
// Rimozione ricerca in corso
|
||||
@ -87,8 +87,8 @@ $(document).ready(function () {
|
||||
},
|
||||
render: function(item, currentValue){
|
||||
const itemElement = document.createElement("div");
|
||||
itemElement.innerHTML = item.badge;
|
||||
// <a href='" + item.link + "' title='Clicca per aprire'><b>" + item.value + "</b><br/>" + item.badge + "</a>
|
||||
itemElement.innerHTML = item.label;
|
||||
// <a href='" + item.link + "' title='Clicca per aprire'><b>" + item.value + "</b><br/>" + item.label + "</a>
|
||||
return itemElement;
|
||||
}
|
||||
});
|
||||
|
@ -322,7 +322,7 @@ function impostaCategorieAllegatiDisponibili(gestione, categorie) {
|
||||
update(results);
|
||||
},
|
||||
onSelect: function (item) {
|
||||
input.value = item.badge;
|
||||
input.value = item.label;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -75,8 +75,8 @@ foreach ($modules as $name => $values) {
|
||||
$settings = [
|
||||
'php_version' => [
|
||||
'type' => 'version',
|
||||
'description' => '8.0.x - 8.3.x',
|
||||
'minimum' => '8.0.0',
|
||||
'description' => '8.1.x - 8.3.x',
|
||||
'minimum' => '8.1.0',
|
||||
'maximum' => '8.3.99',
|
||||
],
|
||||
|
||||
|
@ -184,7 +184,7 @@ if (!empty($type) && $type != 'menu' && $type != 'custom') {
|
||||
echo '
|
||||
<div class="btn-group">
|
||||
|
||||
<button class="btn btn-primary btn-lg dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> '.tr('Azioni di gruppo').' </button>
|
||||
<button class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> '.tr('Azioni di gruppo').' </button>
|
||||
<div class="dropdown-menu dropdown-menu-right">';
|
||||
|
||||
foreach ($bulk as $key => $value) {
|
||||
|
@ -90,7 +90,7 @@ $(document).ready(function () {
|
||||
update(results);
|
||||
},
|
||||
onSelect: function (item) {
|
||||
input.value = item.badge;
|
||||
input.value = item.label;
|
||||
},
|
||||
});
|
||||
});
|
||||
|
@ -862,7 +862,7 @@ if (empty($record['deleted_at'])) {
|
||||
update(results);
|
||||
},
|
||||
onSelect: function (item) {
|
||||
input.value = item.badge;
|
||||
input.value = item.label;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ switch (post('op')) {
|
||||
|
||||
$qta = post('qta');
|
||||
|
||||
$articolo->setTranslation('title', post('descrizione'));
|
||||
$articolo->descrizione = post('descrizione');
|
||||
$articolo->note = post('note');
|
||||
$articolo->um = post('um') ?: null;
|
||||
|
||||
|
@ -165,7 +165,7 @@ switch (filter('op')) {
|
||||
$articolo->id_dettaglio_fornitore = post('id_dettaglio_fornitore') ?: null;
|
||||
}
|
||||
|
||||
$articolo->setTranslation('title', post('descrizione'));
|
||||
$articolo->descrizione = post('descrizione');
|
||||
$articolo->note = post('note');
|
||||
$articolo->um = post('um') ?: null;
|
||||
|
||||
|
@ -297,7 +297,7 @@ $query .= ' ORDER BY `title`';
|
||||
<!-- DATI INTESTAZIONE -->
|
||||
<div class="card card-primary collapsable '.(empty($espandi_dettagli) ? 'collapsed-card' : '').'">
|
||||
<div class="card-header with-border">
|
||||
<h3 class="card-title">'.tr('Dati cliente').'</h3>
|
||||
<h3 class="card-title">'.($dir == 'entrata' ? tr('Dati cliente') : tr('Dati fornitore')).'</h3>
|
||||
<div class="card-tools pull-right">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse">
|
||||
<i class="fa fa-'.(empty($espandi_dettagli) ? 'plus' : 'minus').'"></i>
|
||||
|
@ -132,9 +132,6 @@ class Fattura extends Document
|
||||
$model->idsede_partenza = $id_sede;
|
||||
}
|
||||
|
||||
// Gestione della marca da bollo predefinita
|
||||
$model->addebita_bollo = setting('Addebita marca da bollo al cliente');
|
||||
|
||||
// Ritenuta contributi predefinita
|
||||
$id_ritenuta_contributi = ($tipo_documento->dir == 'entrata') ? setting('Ritenuta previdenziale predefinita') : null;
|
||||
$model->id_ritenuta_contributi = $id_ritenuta_contributi ?: null;
|
||||
|
@ -521,7 +521,7 @@ switch (post('op')) {
|
||||
$qta = post('qta');
|
||||
|
||||
$articolo->idsede_partenza = post('idsede_partenza');
|
||||
$articolo->setTranslation('title', post('descrizione'));
|
||||
$articolo->descrizione = post('descrizione');
|
||||
$articolo->note = post('note');
|
||||
$articolo->um = post('um') ?: null;
|
||||
$articolo->idimpianto = post('id_impianto') ?: null;
|
||||
|
@ -170,7 +170,7 @@ switch (post('op')) {
|
||||
$articolo->id_dettaglio_fornitore = post('id_dettaglio_fornitore') ?: null;
|
||||
}
|
||||
|
||||
$articolo->setTranslation('title', post('descrizione'));
|
||||
$articolo->descrizione = post('descrizione');
|
||||
$articolo->note = post('note');
|
||||
$articolo->um = post('um') ?: null;
|
||||
|
||||
|
@ -195,7 +195,7 @@ switch (post('op')) {
|
||||
|
||||
$qta = post('qta');
|
||||
|
||||
$articolo->setTranslation('title', post('descrizione'));
|
||||
$articolo->descrizione = post('descrizione');
|
||||
$articolo->note = post('note');
|
||||
$articolo->um = post('um') ?: null;
|
||||
$articolo->data_evasione = post('data_evasione') ?: null;
|
||||
|
@ -197,17 +197,18 @@ switch (filter('op')) {
|
||||
case 'disabilita-widget':
|
||||
$id = filter('id');
|
||||
|
||||
$widget = $database->table('zz_widgets_lang')
|
||||
->where('id', '=', $id)
|
||||
->first();
|
||||
|
||||
// Abilitazione del widget indicato
|
||||
$database->table('zz_widgets')
|
||||
->where('id', '=', $id)
|
||||
->where('id', '=', $widget->id_record)
|
||||
->update(['enabled' => 0]);
|
||||
|
||||
// Messaggio informativo
|
||||
$widget = $database->table('zz_widgets')
|
||||
->where('id', '=', $id)
|
||||
->first();
|
||||
flash()->info(tr('Widget "_NAME_" disabilitato!', [
|
||||
'_NAME_' => $widget->getTranslation('title'),
|
||||
'_NAME_' => $widget->title,
|
||||
]));
|
||||
|
||||
echo json_encode([]);
|
||||
@ -223,11 +224,13 @@ switch (filter('op')) {
|
||||
->update(['enabled' => 1]);
|
||||
|
||||
// Messaggio informativo
|
||||
$widget = $database->table('zz_widgets')
|
||||
->where('id', '=', $id)
|
||||
$widget = $database->table('zz_widgets_lang')
|
||||
->where('id_record', '=', $id)
|
||||
->where('id_lang', '=', Models\Locale::getDefault()->id)
|
||||
->first();
|
||||
|
||||
flash()->info(tr('Widget "_NAME_" abilitato!', [
|
||||
'_NAME_' => $widget->getTranslation('title'),
|
||||
'_NAME_' => $widget->title,
|
||||
]));
|
||||
|
||||
echo json_encode([]);
|
||||
|
@ -1606,7 +1606,7 @@ class FatturaElettronica implements \Stringable
|
||||
'ImponibileImporto' => $totale,
|
||||
'Imposta' => $imposta,
|
||||
'EsigibilitaIVA' => $dati->esigibilita,
|
||||
'RiferimentoNormativo' => $dati->descrizione,
|
||||
'RiferimentoNormativo' => $dati->getTranslation('title'),
|
||||
];
|
||||
|
||||
// Con split payment EsigibilitaIVA sempre a S
|
||||
|
@ -215,7 +215,7 @@ switch ($operazione) {
|
||||
|
||||
$qta = post('qta');
|
||||
|
||||
$articolo->setTranslation('title', post('descrizione'));
|
||||
$articolo->descrizione = post('descrizione');
|
||||
$articolo->um = post('um') ?: null;
|
||||
|
||||
$articolo->costo_unitario = post('costo_unitario') ?: 0;
|
||||
|
@ -1886,7 +1886,7 @@ INSERT INTO `zz_storage_adapters` (`id`, `name`, `class`, `options`, `can_delete
|
||||
(1, 'Adattatore locale', '\\Modules\\FileAdapters\\Adapters\\LocalAdapter', '{ \"directory\":\"/files\" }', 0, 1, 1, NULL);
|
||||
|
||||
-- Modulo adattatori di archiviazione
|
||||
INSERT INTO `zz_modules` (`name`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`, `use_notes`, `use_checklists`) VALUES ('Adattatori di archiviazione', 'adattatori_archiviazione', 'SELECT |select| FROM zz_storage_adapters WHERE 1=1 HAVING 2=2', '', 'fa fa-folder', '2.5', '2.5', '2', '36', '1', '1', '0', '0');
|
||||
INSERT INTO `zz_modules` (`name`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`, `use_notes`, `use_checklists`) VALUES ('Adattatori di archiviazione', 'adattatori_archiviazione', 'SELECT |select| FROM zz_storage_adapters WHERE 1=1 HAVING 2=2', '', 'fa fa-folder', '2.5', '2.5', '2', (SELECT id FROM zz_modules m WHERE directory='adattatori_archiviazione'), '1', '1', '0', '0');
|
||||
INSERT INTO `zz_modules_lang` (`id`, `id_lang`, `id_record`, `name`, `title`) VALUES (NULL, '1', (SELECT id FROM zz_modules WHERE directory='adattatori_archiviazione'), 'Adattatori di archiviazione', 'Adattatori di archiviazione');
|
||||
|
||||
-- Viste modulo adattatori di archiviazione
|
||||
|
@ -429,7 +429,7 @@ ALTER TABLE `my_impianti` ADD `id_marca` INT NULL AFTER `idanagrafica`;
|
||||
ALTER TABLE `my_impianti` ADD `id_modello` INT NULL AFTER `id_marca`;
|
||||
|
||||
-- Modulo Marche impianto
|
||||
INSERT INTO `zz_modules` (`name`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`, `use_notes`, `use_checklists`) VALUES ('Marche impianti', 'impianti_marche', 'SELECT |select| FROM `my_impianti_marche` WHERE 1=1 HAVING 2=2', '', 'fa fa-angle-right', '2.5.1', '2.5.1', '2', '30', '1', '1', '0', '0');
|
||||
INSERT INTO `zz_modules` (`name`, `directory`, `options`, `options2`, `icon`, `version`, `compatibility`, `order`, `parent`, `default`, `enabled`, `use_notes`, `use_checklists`) VALUES ('Marche impianti', 'impianti_marche', 'SELECT |select| FROM `my_impianti_marche` WHERE 1=1 HAVING 2=2', '', 'fa fa-angle-right', '2.5.1', '2.5.1', '2', (SELECT `id` FROM `zz_modules` `m` WHERE `name`='Impianti'), '1', '1', '0', '0');
|
||||
INSERT INTO `zz_modules_lang` (`id_lang`, `id_record`, `title`) VALUES ('1', (SELECT MAX(id) FROM `zz_modules`), 'Marche impianti');
|
||||
|
||||
INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`) VALUES
|
||||
@ -633,29 +633,6 @@ UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_module
|
||||
|
||||
-- Allineamento vista Newsletter
|
||||
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`em_templates_lang`.`title`' WHERE `zz_modules`.`name` = 'Newsletter' AND `zz_views`.`name` = 'Template';
|
||||
|
||||
-- Allineamento vista Ordini cliente
|
||||
UPDATE `zz_modules` SET `options` = "
|
||||
SELECT
|
||||
|select|
|
||||
FROM
|
||||
`or_ordini`
|
||||
INNER JOIN `or_tipiordine` ON `or_ordini`.`idtipoordine` = `or_tipiordine`.`id`
|
||||
INNER JOIN `an_anagrafiche` ON `or_ordini`.`idanagrafica` = `an_anagrafiche`.`idanagrafica`
|
||||
LEFT JOIN (SELECT `idordine`, SUM(`qta` - `qta_evasa`) AS `qta_da_evadere`, SUM(`subtotale` - `sconto`) AS `totale_imponibile`, SUM(`subtotale` - `sconto` + `iva`) AS `totale` FROM `or_righe_ordini` GROUP BY `idordine`) AS righe ON `or_ordini`.`id` = `righe`.`idordine`
|
||||
LEFT JOIN (SELECT `idordine`, MIN(`data_evasione`) AS `data_evasione` FROM `or_righe_ordini` WHERE (`qta` - `qta_evasa`)>0 GROUP BY `idordine`) AS `righe_da_evadere` ON `righe`.`idordine`=`righe_da_evadere`.`idordine`
|
||||
INNER JOIN `or_statiordine` ON `or_statiordine`.`id` = `or_ordini`.`idstatoordine`
|
||||
LEFT JOIN `or_statiordine_lang` ON (`or_statiordine`.`id` = `or_statiordine_lang`.`id_record` AND `or_statiordine_lang`.|lang|)
|
||||
LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT 'Fattura ',`co_documenti`.`numero_esterno` SEPARATOR ', ') AS `info`, `co_righe_documenti`.`original_document_id` AS `idordine` FROM `co_documenti` INNER JOIN `co_righe_documenti` ON `co_documenti`.`id` = `co_righe_documenti`.`iddocumento` WHERE `original_document_type`='Modules\\Ordini\\Ordine' GROUP BY original_document_id) AS `fattura` ON `fattura`.`idordine` = `or_ordini`.`id`
|
||||
LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT 'DDT ', `dt_ddt`.`numero_esterno` SEPARATOR ', ') AS `info`, `dt_righe_ddt`.`original_document_id` AS `idddt` FROM `dt_ddt` INNER JOIN `dt_righe_ddt` ON `dt_ddt`.`id`=`dt_righe_ddt`.`idddt` WHERE `original_document_type`='Modules\\Ordini\\Ordine' GROUP BY original_document_id) AS `ddt` ON `ddt`.`idddt`=`or_ordini`.`id`
|
||||
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 `id` FROM `zz_modules` WHERE `name` = 'Ordini cliente' AND `zz_operations`.`op` = 'send-email' GROUP BY `em_emails`.`id_record`) AND `zz_operations`.`op` = 'send-email' GROUP BY id_record) AS email ON `email`.`id_record` = `or_ordini`.`id`
|
||||
WHERE
|
||||
1=1 |segment(`or_ordini`.`id_segment`)| AND `dir` = 'entrata' |date_period(`or_ordini`.`data`)|
|
||||
HAVING
|
||||
2=2
|
||||
ORDER BY
|
||||
`data` DESC,
|
||||
CAST(`numero_esterno` AS UNSIGNED) DESC" WHERE `zz_modules`.`name` = 'Ordini cliente';
|
||||
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`or_statiordine_lang`.`title`' WHERE `zz_modules`.`name` = 'Ordini cliente' AND `zz_views`.`name` = 'icon_title_Stato';
|
||||
|
||||
-- Allineamento vista Ordini fornitore
|
||||
|
@ -9,14 +9,3 @@ $has_name = database()->columnExists('zz_groups', 'name');
|
||||
if ($has_name && $has_nome) {
|
||||
$database->query('ALTER TABLE `zz_groups` DROP `name`');
|
||||
}
|
||||
|
||||
// File e cartelle deprecate
|
||||
$files = [
|
||||
'modules/interventi/src/API/v1/Articoli.php',
|
||||
];
|
||||
|
||||
foreach ($files as $key => $value) {
|
||||
$files[$key] = realpath(base_dir().'/'.$value);
|
||||
}
|
||||
|
||||
delete($files);
|
@ -136,28 +136,4 @@ INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`, `search`, `slow`,
|
||||
INSERT INTO `zz_views_lang` (`id_lang`, `id_record`, `title`) VALUES
|
||||
(1, (SELECT `id` FROM `zz_views` WHERE `id_module` = (SELECT `id` FROM `zz_modules` WHERE `name`='Giacenze sedi') AND `name` = 'Valore'), 'Valore');
|
||||
|
||||
DELETE FROM `zz_settings` WHERE `zz_settings`.`nome` = "Addebita marca da bollo al cliente"
|
||||
|
||||
-- Aggiunta API per DDT
|
||||
INSERT INTO `zz_api_resources` (`id`, `version`, `type`, `resource`, `class`, `enabled`) VALUES
|
||||
(NULL, 'v1', 'delete', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'update', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'create', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'retrieve', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'delete', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1'),
|
||||
(NULL, 'v1', 'update', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1'),
|
||||
(NULL, 'v1', 'create', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1'),
|
||||
(NULL, 'v1', 'retrieve', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1');
|
||||
|
||||
-- Modifica API righe interventi
|
||||
UPDATE `zz_api_resources` SET `resource` = 'righe_intervento', `class` = 'Modules\\Interventi\\API\\v1\\Righe' WHERE `zz_api_resources`.`resource` = 'articoli_intervento';
|
||||
UPDATE `zz_api_resources` SET `resource` = 'riga_intervento', `class` = 'Modules\\Interventi\\API\\v1\\Righe' WHERE `zz_api_resources`.`resource` = 'articolo_intervento';
|
||||
|
||||
INSERT INTO `zz_api_resources` (`id`, `version`, `type`, `resource`, `class`, `enabled`) VALUES
|
||||
(NULL, 'v1', 'update', 'riga_intervento', 'Modules\\Interventi\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'delete', 'riga_intervento', 'Modules\\Interventi\\API\\v1\\Righe', '1');
|
||||
|
||||
-- Gestione mappa in plugin attività
|
||||
INSERT INTO `zz_plugins` (`id`, `name`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`) VALUES (NULL, 'Mostra su mappa', (SELECT `id` FROM `zz_modules` WHERE `name`= 'Interventi'), (SELECT `id` FROM `zz_modules` WHERE `name`= 'Interventi'), 'tab_main', 'mappa.php', '1', '0', '0', '', '', NULL, NULL, '', '');
|
||||
|
||||
INSERT INTO `zz_plugins_lang` (`id`, `id_lang`, `id_record`, `title`) VALUES (NULL, '1', (SELECT `zz_plugins`.`id` FROM `zz_plugins` WHERE `zz_plugins`.`name`='Mostra su mappa'), 'Mostra su mappa');
|
||||
DELETE FROM `zz_settings` WHERE `zz_settings`.`nome` = "Addebita marca da bollo al cliente";
|
14
update/2_5_4.php
Normal file
14
update/2_5_4.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
include_once __DIR__.'/core.php';
|
||||
|
||||
// File e cartelle deprecate
|
||||
$files = [
|
||||
'modules/interventi/src/API/v1/Articoli.php',
|
||||
];
|
||||
|
||||
foreach ($files as $key => $value) {
|
||||
$files[$key] = realpath(base_dir().'/'.$value);
|
||||
}
|
||||
|
||||
delete($files);
|
55
update/2_5_4.sql
Normal file
55
update/2_5_4.sql
Normal file
@ -0,0 +1,55 @@
|
||||
|
||||
-- Aggiunta API per DDT
|
||||
INSERT INTO `zz_api_resources` (`id`, `version`, `type`, `resource`, `class`, `enabled`) VALUES
|
||||
(NULL, 'v1', 'delete', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'update', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'create', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'retrieve', 'righe_ddt', 'Modules\\DDT\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'delete', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1'),
|
||||
(NULL, 'v1', 'update', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1'),
|
||||
(NULL, 'v1', 'create', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1'),
|
||||
(NULL, 'v1', 'retrieve', 'ddt', 'Modules\\DDT\\API\\v1\\DDTS', '1');
|
||||
|
||||
-- Modifica API righe interventi
|
||||
UPDATE `zz_api_resources` SET `resource` = 'righe_intervento', `class` = 'Modules\\Interventi\\API\\v1\\Righe' WHERE `zz_api_resources`.`resource` = 'articoli_intervento';
|
||||
UPDATE `zz_api_resources` SET `resource` = 'riga_intervento', `class` = 'Modules\\Interventi\\API\\v1\\Righe' WHERE `zz_api_resources`.`resource` = 'articolo_intervento';
|
||||
|
||||
INSERT INTO `zz_api_resources` (`id`, `version`, `type`, `resource`, `class`, `enabled`) VALUES
|
||||
(NULL, 'v1', 'update', 'riga_intervento', 'Modules\\Interventi\\API\\v1\\Righe', '1'),
|
||||
(NULL, 'v1', 'delete', 'riga_intervento', 'Modules\\Interventi\\API\\v1\\Righe', '1');
|
||||
|
||||
-- Gestione mappa in plugin attività
|
||||
INSERT INTO `zz_plugins` (`id`, `name`, `idmodule_from`, `idmodule_to`, `position`, `script`, `enabled`, `default`, `order`, `compatibility`, `version`, `options2`, `options`, `directory`, `help`) VALUES (NULL, 'Mostra su mappa', (SELECT `id` FROM `zz_modules` WHERE `name`= 'Interventi'), (SELECT `id` FROM `zz_modules` WHERE `name`= 'Interventi'), 'tab_main', 'mappa.php', '1', '0', '0', '', '', NULL, NULL, '', '');
|
||||
|
||||
INSERT INTO `zz_plugins_lang` (`id`, `id_lang`, `id_record`, `title`) VALUES (NULL, '1', (SELECT `zz_plugins`.`id` FROM `zz_plugins` WHERE `zz_plugins`.`name`='Mostra su mappa'), 'Mostra su mappa');
|
||||
|
||||
-- Aggiunta colonna Agente in Ordini cliente
|
||||
SELECT @id_module := `id` FROM `zz_modules` WHERE `name` = 'Ordini cliente';
|
||||
INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`, `search`, `slow`, `format`, `html_format`, `search_inside`, `order_by`, `visible`, `summable`, `avg`, `default`) VALUES
|
||||
(@id_module, 'Agente', 'agente.ragione_sociale', 15, 1, 0, 0, 0, '', '', 0, 0, 0, 0);
|
||||
INSERT INTO `zz_views_lang` (`id_lang`, `id_record`, `title`) VALUES
|
||||
(1, (SELECT `id` FROM `zz_views` WHERE `name` = 'Agente' AND `id_module` = @id_module), 'Agente');
|
||||
|
||||
-- Allineamento vista Ordini cliente
|
||||
UPDATE `zz_modules` SET `options` = "
|
||||
SELECT
|
||||
|select|
|
||||
FROM
|
||||
`or_ordini`
|
||||
INNER JOIN `or_tipiordine` ON `or_ordini`.`idtipoordine` = `or_tipiordine`.`id`
|
||||
INNER JOIN `an_anagrafiche` ON `or_ordini`.`idanagrafica` = `an_anagrafiche`.`idanagrafica`
|
||||
LEFT JOIN `an_anagrafiche` AS agente ON `or_ordini`.`idagente` = `agente`.`idanagrafica`
|
||||
LEFT JOIN (SELECT `idordine`, SUM(`qta` - `qta_evasa`) AS `qta_da_evadere`, SUM(`subtotale` - `sconto`) AS `totale_imponibile`, SUM(`subtotale` - `sconto` + `iva`) AS `totale` FROM `or_righe_ordini` GROUP BY `idordine`) AS righe ON `or_ordini`.`id` = `righe`.`idordine`
|
||||
LEFT JOIN (SELECT `idordine`, MIN(`data_evasione`) AS `data_evasione` FROM `or_righe_ordini` WHERE (`qta` - `qta_evasa`)>0 GROUP BY `idordine`) AS `righe_da_evadere` ON `righe`.`idordine`=`righe_da_evadere`.`idordine`
|
||||
INNER JOIN `or_statiordine` ON `or_statiordine`.`id` = `or_ordini`.`idstatoordine`
|
||||
LEFT JOIN `or_statiordine_lang` ON (`or_statiordine`.`id` = `or_statiordine_lang`.`id_record` AND `or_statiordine_lang`.|lang|)
|
||||
LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT 'Fattura ',`co_documenti`.`numero_esterno` SEPARATOR ', ') AS `info`, `co_righe_documenti`.`original_document_id` AS `idordine` FROM `co_documenti` INNER JOIN `co_righe_documenti` ON `co_documenti`.`id` = `co_righe_documenti`.`iddocumento` WHERE `original_document_type`='Modules\Ordini\Ordine' GROUP BY original_document_id) AS `fattura` ON `fattura`.`idordine` = `or_ordini`.`id`
|
||||
LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT 'DDT ', `dt_ddt`.`numero_esterno` SEPARATOR ', ') AS `info`, `dt_righe_ddt`.`original_document_id` AS `idddt` FROM `dt_ddt` INNER JOIN `dt_righe_ddt` ON `dt_ddt`.`id`=`dt_righe_ddt`.`idddt` WHERE `original_document_type`='Modules\Ordini\Ordine' GROUP BY original_document_id) AS `ddt` ON `ddt`.`idddt`=`or_ordini`.`id`
|
||||
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 `id` FROM `zz_modules` WHERE `name` = 'Ordini cliente' AND `zz_operations`.`op` = 'send-email' GROUP BY `em_emails`.`id_record`) AND `zz_operations`.`op` = 'send-email' GROUP BY id_record) AS email ON `email`.`id_record` = `or_ordini`.`id`
|
||||
WHERE
|
||||
1=1 |segment(`or_ordini`.`id_segment`)| AND `dir` = 'entrata' |date_period(`or_ordini`.`data`)|
|
||||
HAVING
|
||||
2=2
|
||||
ORDER BY
|
||||
`data` DESC,
|
||||
CAST(`numero_esterno` AS UNSIGNED) DESC" WHERE `zz_modules`.`name` = 'Ordini cliente';
|
Loading…
x
Reference in New Issue
Block a user