2017-08-04 16:28:16 +02:00
|
|
|
<?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; ?>">
|
2017-08-04 16:28:16 +02:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-4">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "type": "span", "label": "<?php echo tr('Codice'); ?>", "name": "idtipointervento", "value": "$idtipointervento$" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-8">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "type": "text", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "required": 1, "value": "$descrizione$" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel panel-primary">
|
|
|
|
<div class="panel-heading">
|
2017-09-04 12:02:29 +02:00
|
|
|
<h3 class="panel-title"><?php echo tr('Costi unitari'); ?></h3>
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="row">
|
2017-09-21 10:01:07 +02:00
|
|
|
<div class="col-md-4">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "type": "number", "label": "<?php echo tr('Costo orario'); ?>", "name": "costo_orario", "required": 1, "value": "$costo_orario$", "icon-after": "<i class='fa fa-euro'></i>" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
2017-09-21 10:01:07 +02:00
|
|
|
<div class="col-md-4">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "type": "number", "label": "<?php echo tr('Costo km'); ?>", "name": "costo_km", "required": 1, "value": "$costo_km$", "icon-after": "<i class='fa fa-euro'></i>" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
2017-09-21 10:01:07 +02:00
|
|
|
<div class="col-md-4">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "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>" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel panel-primary">
|
|
|
|
<div class="panel-heading">
|
2017-09-04 12:02:29 +02:00
|
|
|
<h3 class="panel-title"><?php echo tr('Costi unitari riconosciuti al tecnico'); ?></h3>
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="row">
|
2017-09-21 10:01:07 +02:00
|
|
|
<div class="col-md-4">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "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>" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
2017-09-21 10:01:07 +02:00
|
|
|
<div class="col-md-4">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "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>" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
|
2017-09-21 10:01:07 +02:00
|
|
|
<div class="col-md-4">
|
2017-09-04 12:02:29 +02:00
|
|
|
{[ "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>" ]}
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<a class="btn btn-danger ask" data-backto="record-list">
|
2017-09-04 12:02:29 +02:00
|
|
|
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
|
2017-08-04 16:28:16 +02:00
|
|
|
</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">
|
2017-09-10 14:35:41 +02:00
|
|
|
'.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!').'
|
2017-08-04 16:28:16 +02:00
|
|
|
</div>';
|
|
|
|
}
|