1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-24 22:42:33 +01:00
openstamanager/modules/tipi_intervento/edit.php

89 lines
3.5 KiB
PHP
Raw Normal View History

<?php
include_once __DIR__.'/../../core.php';
?><form action="" method="post">
<input type="hidden" name="op" value="update">
<input type="hidden" name="backto" value="record-edit">
2018-02-18 19:53:23 +01:00
<input type="hidden" name="id_record" value="<?php echo $id_record; ?>">
<div class="row">
<div class="col-md-4">
{[ "type": "span", "label": "<?php echo tr('Codice'); ?>", "name": "idtipointervento", "value": "$idtipointervento$" ]}
</div>
<div class="col-md-6">
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "required": 1, "value": "$descrizione$" ]}
</div>
2018-07-04 17:15:14 +02:00
<div class="col-md-2">
{[ "type": "number", "label": "<?php echo tr('Tempo standard'); ?>", "name": "tempo_standard", "help": "<?php echo tr('Valore compreso tra 0,25 - 24 ore. <br><small>Esempi: <em><ul><li>60 minuti = 1 ora</li><li>30 minuti = 0,5 ore</li><li>15 minuti = 0,25 ore</li></ul></em></small>'); ?>", "maxlength": 5, "min-value": "0", "max-value": "24", "class": "text-center", "value": "$tempo_standard$", "icon-after": "ore" ]}
</div>
2018-07-04 17:15:14 +02:00
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><?php echo tr('Costi unitari'); ?></h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-4">
{[ "type": "number", "label": "<?php echo tr('Costo orario'); ?>", "name": "costo_orario", "required": 1, "value": "$costo_orario$", "icon-after": "<i class='fa fa-euro'></i>" ]}
</div>
<div class="col-md-4">
{[ "type": "number", "label": "<?php echo tr('Costo km'); ?>", "name": "costo_km", "required": 1, "value": "$costo_km$", "icon-after": "<i class='fa fa-euro'></i>" ]}
</div>
<div class="col-md-4">
{[ "type": "number", "label": "<?php echo tr('Diritto chiamata'); ?>", "name": "costo_diritto_chiamata", "required": 1, "value": "$costo_diritto_chiamata$", "icon-after": "<i class='fa fa-euro'></i>" ]}
</div>
</div>
</div>
</div>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><?php echo tr('Costi unitari riconosciuti al tecnico'); ?></h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-4">
{[ "type": "number", "label": "<?php echo tr('Costo orario'); ?>", "name": "costo_orario_tecnico", "required": 1, "value": "$costo_orario_tecnico$", "icon-after": "<i class='fa fa-euro'></i>" ]}
</div>
<div class="col-md-4">
{[ "type": "number", "label": "<?php echo tr('Costo km'); ?>", "name": "costo_km_tecnico", "required_tecnico": 1, "value": "$costo_km_tecnico$", "icon-after": "<i class='fa fa-euro'></i>" ]}
</div>
<div class="col-md-4">
{[ "type": "number", "label": "<?php echo tr('Diritto chiamata'); ?>", "name": "costo_diritto_chiamata_tecnico", "required": 1, "value": "$costo_diritto_chiamata_tecnico$", "icon-after": "<i class='fa fa-euro'></i>" ]}
</div>
</div>
</div>
</div>
</form>
<a class="btn btn-danger ask" data-backto="record-list">
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
</a>
<?php
$interventi = $dbo->fetchArray('SELECT COUNT(*) AS tot_interventi FROM in_interventi WHERE idtipointervento='.prepare($id_record));
$tot_interventi = $interventi[0]['tot_interventi'];
if ($tot_interventi > 0) {
echo '
2017-09-06 11:59:47 +02:00
<div class="alert alert-danger">
'.tr('Ci sono _NUM_ interventi collegati', [
'_NUM_' => $tot_interventi,
]).'.
2017-09-06 11:59:47 +02:00
'.tr('Eliminando questo tipo di attività, vengono rimossi anche gli interventi collegati!').'
</div>';
}