Rimozione modulo Voci di servizio
This commit is contained in:
parent
cafb43878d
commit
2f78d4f555
|
@ -1,47 +0,0 @@
|
||||||
<?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':
|
|
||||||
$descrizione = post('descrizione');
|
|
||||||
$categoria = post('categoria');
|
|
||||||
|
|
||||||
$dbo->query('UPDATE in_vociservizio SET descrizione='.prepare($descrizione).', categoria='.prepare($categoria).' WHERE id='.prepare($id_record));
|
|
||||||
|
|
||||||
flash()->info(tr('Informazioni salvate correttamente!'));
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'add':
|
|
||||||
$descrizione = post('descrizione');
|
|
||||||
$categoria = post('categoria');
|
|
||||||
|
|
||||||
$dbo->query('INSERT INTO in_vociservizio(descrizione, categoria) VALUES ('.prepare($descrizione).', '.prepare($categoria).')');
|
|
||||||
$id_record = $dbo->lastInsertedID();
|
|
||||||
|
|
||||||
flash()->info(tr('Nuova voce di servizio aggiunta!'));
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'delete':
|
|
||||||
$dbo->query('DELETE FROM in_vociservizio WHERE id='.prepare($id_record));
|
|
||||||
break;
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
<?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-4">
|
|
||||||
{[ "type": "text", "label": "<?php echo tr('Categoria'); ?>", "name": "categoria", "required": 1 ]}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-8">
|
|
||||||
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "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>
|
|
|
@ -1,40 +0,0 @@
|
||||||
<?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="edit-form">
|
|
||||||
<input type="hidden" name="op" value="update">
|
|
||||||
<input type="hidden" name="backto" value="record-edit">
|
|
||||||
<input type="hidden" name="id_record" value="<?php echo $id_record; ?>">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
{[ "type": "text", "label": "<?php echo tr('Categoria'); ?>", "name": "categoria", "required": 1, "value": "$categoria$" ]}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-8">
|
|
||||||
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "required": 1, "value": "$descrizione$" ]}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<a class="btn btn-danger ask" data-backto="record-list">
|
|
||||||
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
|
|
||||||
</a>
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?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_vociservizio WHERE id='.prepare($id_record));
|
|
||||||
}
|
|
|
@ -5,7 +5,8 @@ include __DIR__.'/../config.inc.php';
|
||||||
// File e cartelle deprecate
|
// File e cartelle deprecate
|
||||||
$files = [
|
$files = [
|
||||||
'assets/src/js/wacom/sigCaptDialog/libs/',
|
'assets/src/js/wacom/sigCaptDialog/libs/',
|
||||||
'modules/impianti/plugins/'
|
'modules/impianti/plugins/',
|
||||||
|
'modules/voci_servizio/'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($files as $key => $value) {
|
foreach ($files as $key => $value) {
|
||||||
|
|
|
@ -1929,4 +1929,9 @@ ORDER BY
|
||||||
`dt_ddt`.`created_at` DESC" WHERE `zz_modules`.`id` = (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = 'Ddt di vendita');
|
`dt_ddt`.`created_at` DESC" WHERE `zz_modules`.`id` = (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = 'Ddt di vendita');
|
||||||
|
|
||||||
-- Fix plugin Ddt del cliente
|
-- Fix plugin Ddt del cliente
|
||||||
UPDATE `zz_plugins` SET `options` = '{ \"main_query\": [ { \"type\": \"table\", \"fields\": \"Numero, Data, Descrizione, Qtà\", \"query\": \"SELECT dt_ddt.id, IF(dt_tipiddt.dir = \'entrata\', (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = \'Ddt di vendita\'), (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = \'Ddt di acquisto\')) AS _link_module_, dt_ddt.id AS _link_record_, IF(dt_ddt.numero_esterno = \'\', dt_ddt.numero, dt_ddt.numero_esterno) AS Numero, DATE_FORMAT(dt_ddt.data, \'%d/%m/%Y\') AS Data, dt_righe_ddt.descrizione AS `Descrizione`, REPLACE(REPLACE(REPLACE(FORMAT(dt_righe_ddt.qta, 2), \',\', \'#\'), \'.\', \',\'), \'#\', \'.\') AS `Qtà` FROM dt_ddt LEFT JOIN dt_righe_ddt ON dt_ddt.id=dt_righe_ddt.idddt JOIN dt_tipiddt ON dt_ddt.idtipoddt = dt_tipiddt.id WHERE dt_ddt.idanagrafica=|id_parent| HAVING 2=2 ORDER BY dt_ddt.id DESC\"} ]}' WHERE `zz_plugins`.`id` = (SELECT `id_record` FROM `zz_plugins_lang` WHERE `name` = 'Ddt del cliente');
|
UPDATE `zz_plugins` SET `options` = '{ \"main_query\": [ { \"type\": \"table\", \"fields\": \"Numero, Data, Descrizione, Qtà\", \"query\": \"SELECT dt_ddt.id, IF(dt_tipiddt.dir = \'entrata\', (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = \'Ddt di vendita\'), (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = \'Ddt di acquisto\')) AS _link_module_, dt_ddt.id AS _link_record_, IF(dt_ddt.numero_esterno = \'\', dt_ddt.numero, dt_ddt.numero_esterno) AS Numero, DATE_FORMAT(dt_ddt.data, \'%d/%m/%Y\') AS Data, dt_righe_ddt.descrizione AS `Descrizione`, REPLACE(REPLACE(REPLACE(FORMAT(dt_righe_ddt.qta, 2), \',\', \'#\'), \'.\', \',\'), \'#\', \'.\') AS `Qtà` FROM dt_ddt LEFT JOIN dt_righe_ddt ON dt_ddt.id=dt_righe_ddt.idddt JOIN dt_tipiddt ON dt_ddt.idtipoddt = dt_tipiddt.id WHERE dt_ddt.idanagrafica=|id_parent| HAVING 2=2 ORDER BY dt_ddt.id DESC\"} ]}' WHERE `zz_plugins`.`id` = (SELECT `id_record` FROM `zz_plugins_lang` WHERE `name` = 'Ddt del cliente');
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `in_vociservizio`;
|
||||||
|
|
||||||
|
DELETE FROM `zz_modules` WHERE `id` = (SELECT `id_record` FROM `zz_modules_lang` WHERE `name` = 'Voci di servizio');
|
||||||
|
DELETE FROM `zz_modules_lang` WHERE `name` = 'Voci di servizio';
|
Loading…
Reference in New Issue