mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-03-30 19:10:14 +02:00
Fix tempo_standard tipi intervento
This commit is contained in:
parent
a854477448
commit
d0cf8f4146
@ -10,7 +10,9 @@ echo '
|
||||
<!-- DATI -->
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">'.tr('Valori della sezione').': '.$records[0]['sezione'].'</h3>
|
||||
<h3 class="panel-title">'.tr('Impostazioni _SEZIONE_', [
|
||||
'_SEZIONE_' => $records[0]['sezione'],
|
||||
]).'</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">';
|
||||
|
@ -4,7 +4,7 @@ include_once __DIR__.'/../../../core.php';
|
||||
|
||||
switch ($resource) {
|
||||
case 'tipiintervento':
|
||||
$query = 'SELECT idtipointervento AS id, IF(tempo_standard <= 0, descrizione, CONCAT(descrizione, \' (\', REPLACE(FORMAT(tempo_standard, 2), \'.\', \',\'), \' ore)\')) AS descrizione, tempo_standard FROM in_tipiintervento |where| ORDER BY idtipointervento';
|
||||
$query = 'SELECT idtipointervento AS id, IF(tempo_standard IS NULL, descrizione, CONCAT(descrizione, \' (\', REPLACE(FORMAT(tempo_standard, 2), \'.\', \',\'), \' ore)\')) AS descrizione, tempo_standard FROM in_tipiintervento |where| ORDER BY idtipointervento';
|
||||
|
||||
foreach ($elements as $element) {
|
||||
$filter[] = 'idtipointervento='.prepare($element);
|
||||
|
@ -13,7 +13,7 @@ switch (post('op')) {
|
||||
$costo_km_tecnico = post('costo_km_tecnico');
|
||||
$costo_diritto_chiamata_tecnico = post('costo_diritto_chiamata_tecnico');
|
||||
|
||||
$tempo_standard = post('tempo_standard');
|
||||
$tempo_standard = (empty(post('tempo_standard'))) ? 'NULL' : prepare(post('tempo_standard'));
|
||||
|
||||
$query = 'UPDATE in_tipiintervento SET'.
|
||||
' descrizione='.prepare($descrizione).','.
|
||||
@ -23,7 +23,7 @@ switch (post('op')) {
|
||||
' costo_orario_tecnico='.prepare($costo_orario_tecnico).','.
|
||||
' costo_km_tecnico='.prepare($costo_km_tecnico).','.
|
||||
' costo_diritto_chiamata_tecnico='.prepare($costo_diritto_chiamata_tecnico).','.
|
||||
' tempo_standard='.prepare($tempo_standard).
|
||||
' tempo_standard='.$tempo_standard.
|
||||
' WHERE idtipointervento='.prepare($id_record);
|
||||
|
||||
$dbo->query($query);
|
||||
@ -35,9 +35,9 @@ switch (post('op')) {
|
||||
$idtipointervento = post('idtipointervento');
|
||||
$descrizione = post('descrizione');
|
||||
|
||||
$tempo_standard = post('tempo_standard');
|
||||
$tempo_standard = (empty(post('tempo_standard'))) ? 'NULL' : prepare(post('tempo_standard'));
|
||||
|
||||
$query = 'INSERT INTO in_tipiintervento(idtipointervento, descrizione, costo_orario, costo_km, tempo_standard) VALUES ('.prepare($idtipointervento).', '.prepare($descrizione).', 0.00, 0.00, '.prepare($tempo_standard).')';
|
||||
$query = 'INSERT INTO in_tipiintervento(idtipointervento, descrizione, costo_orario, costo_km, tempo_standard) VALUES ('.prepare($idtipointervento).', '.prepare($descrizione).', 0.00, 0.00, '.$tempo_standard.')';
|
||||
$dbo->query($query);
|
||||
|
||||
$id_record = $idtipointervento;
|
||||
|
@ -99,7 +99,9 @@ echo '
|
||||
echo '
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">'.tr('Permessi').'</h3>
|
||||
<h3 class="panel-title">'.tr('Permessi _GROUP_', [
|
||||
'_GROUP_' => $records[0]['nome'],
|
||||
]).'</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">';
|
||||
|
@ -166,7 +166,7 @@ INSERT INTO `zz_group_view` (`id_gruppo`, `id_vista`) VALUES
|
||||
(4, (SELECT id FROM `zz_views` WHERE id_module=(SELECT id FROM zz_modules WHERE name='Contratti') AND name='Impianti' ));
|
||||
|
||||
-- Tempo standard per attività
|
||||
ALTER TABLE `in_tipiintervento` ADD `tempo_standard` DECIMAL(12,4) NULL AFTER `costo_diritto_chiamata_tecnico`;
|
||||
ALTER TABLE `in_tipiintervento` ADD `tempo_standard` DECIMAL(10,2) NULL AFTER `costo_diritto_chiamata_tecnico`;
|
||||
|
||||
-- Rinomino Interventi da pianificare in Promemoria contratti da pianificare
|
||||
UPDATE `zz_widgets` SET `text` = 'Promemoria contratti da pianificare' WHERE `zz_widgets`.`name` = 'Interventi da pianificare';
|
||||
|
Loading…
x
Reference in New Issue
Block a user