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 " >
2019-07-08 16:45:00 +02:00
{[ " type " : " span " , " label " : " <?php echo tr('Codice'); ?> " , " name " : " codice " , " value " : " $codice $ " ]}
2017-08-04 16:28:16 +02:00
</ div >
2018-05-21 11:14:37 +02:00
< div class = " col-md-6 " >
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 >
2018-07-04 17:15:14 +02:00
2018-05-21 11:14:37 +02:00
< div class = " col-md-2 " >
2019-03-28 18:40:19 +01:00
{[ " 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> Suggerisce il tempo solitamente impiegato per questa tipologia di attivita'); ?>. " , " maxlength " : 5 , " min-value " : " 0 " , " max-value " : " 24 " , " class " : " text-center " , " value " : " $tempo_standard $ " , " icon-after " : " ore " ]}
2018-05-21 11:14:37 +02:00
</ div >
2018-07-04 17:15:14 +02:00
2017-08-04 16:28:16 +02:00
</ div >
< div class = " panel panel-primary " >
< div class = " panel-heading " >
2019-06-13 18:05:19 +02:00
< h3 class = " panel-title " >< ? php echo tr ( 'Addebiti unitari al cliente' ); ?> </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 " >
2019-06-13 18:05:19 +02:00
{[ " type " : " number " , " label " : " <?php echo tr('Addebito 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 " >
2019-06-13 18:05:19 +02:00
{[ " type " : " number " , " label " : " <?php echo tr('Addebito 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 " >
2019-06-13 18:05:19 +02:00
{[ " type " : " number " , " label " : " <?php echo tr('Addebito diritto ch.'); ?> " , " 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 " >
2019-06-13 18:05:19 +02:00
< h3 class = " panel-title " >< ? php echo tr ( 'Costi unitari del 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 " >
2019-06-13 18:05:19 +02:00
{[ " type " : " number " , " label " : " <?php echo tr('Costo diritto ch.'); ?> " , " 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 >
< ? 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-08-04 16:28:16 +02:00
</ div > ' ;
2019-07-08 16:45:00 +02:00
} else {
echo '
< a class = " btn btn-danger ask " data - backto = " record-list " >
< i class = " fa fa-trash " ></ i > '.tr(' Elimina ').'
</ a > ' ;
2017-08-04 16:28:16 +02:00
}