2022-03-31 16:50:23 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (file_exists(__DIR__.'/../../../core.php')) {
|
|
|
|
include_once __DIR__.'/../../../core.php';
|
|
|
|
} else {
|
|
|
|
include_once __DIR__.'/../../core.php';
|
|
|
|
}
|
|
|
|
|
2023-08-04 14:54:28 +02:00
|
|
|
// Fasce orarie per il tipo di attività
|
2022-03-31 16:50:23 +02:00
|
|
|
$fasce_orarie = $dbo->fetchArray("SELECT *, CONCAT (in_fasceorarie.nome, ' (', DATE_FORMAT(ora_inizio, '%H:%i'), '-', DATE_FORMAT(ora_fine, '%H:%i'), ')') AS descrizione FROM in_fasceorarie_tipiintervento INNER JOIN in_fasceorarie ON in_fasceorarie_tipiintervento.idfasciaoraria = in_fasceorarie.id WHERE idtipointervento=".prepare($id_record));
|
|
|
|
|
|
|
|
echo '
|
|
|
|
<table class="table table-striped table-condensed table-hover table-bordered">
|
|
|
|
<tr>
|
|
|
|
<th>'.tr('Fascia oraria').'</th>
|
|
|
|
<th width="12%">'.tr('Addebito orario').'</th>
|
|
|
|
<th width="12%">'.tr('Addebito km').'</th>
|
|
|
|
<th width="12%">'.tr('Addebito diritto ch.').'</th>
|
|
|
|
<th width="12%">'.tr('Costo orario').'</th>
|
|
|
|
<th width="12%">'.tr('Costo km ').'</th>
|
|
|
|
<th width="12%">'.tr('Costo diritto ch.').'</th>
|
|
|
|
</tr>';
|
|
|
|
$i = 0;
|
2023-08-04 14:54:28 +02:00
|
|
|
foreach ($fasce_orarie as $fascia_oraria) {
|
2022-03-31 16:50:23 +02:00
|
|
|
$descrizione = $fascia_oraria['descrizione'];
|
|
|
|
$giorni = '';
|
|
|
|
|
2023-08-04 14:54:28 +02:00
|
|
|
if (!empty($fascia_oraria['giorni'])) {
|
|
|
|
if ($fascia_oraria['giorni'] == '1,2,3,4,5') {
|
2022-03-31 16:50:23 +02:00
|
|
|
$giorni .= 'Lun-Ven';
|
2023-08-04 14:54:28 +02:00
|
|
|
} elseif ($fascia_oraria['giorni'] == '6,7') {
|
2022-03-31 16:50:23 +02:00
|
|
|
$giorni .= 'Sab-Dom';
|
2023-08-04 14:54:28 +02:00
|
|
|
} elseif ($fascia_oraria['giorni'] == '6') {
|
2022-03-31 16:50:23 +02:00
|
|
|
$giorni .= 'Sab';
|
|
|
|
}
|
2023-08-04 14:54:28 +02:00
|
|
|
|
2022-03-31 16:50:23 +02:00
|
|
|
$descrizione .= ' ('.$giorni.')';
|
|
|
|
}
|
|
|
|
|
2023-08-04 14:54:28 +02:00
|
|
|
if (!empty($fascia_oraria['include_bank_holidays'])) {
|
2022-03-31 16:50:23 +02:00
|
|
|
$descrizione .= ' (Festivi)';
|
|
|
|
}
|
|
|
|
|
2023-08-04 14:54:28 +02:00
|
|
|
echo '
|
2022-03-31 16:50:23 +02:00
|
|
|
<tr>
|
|
|
|
<td class="text-left">'.$descrizione.'</td>
|
|
|
|
|
|
|
|
<td class="text-right">
|
2022-06-01 15:38:36 +02:00
|
|
|
{[ "type": "number", "name": "fascia_ore['.$fascia_oraria['idfasciaoraria'].']", "value": "'.number_format($fascia_oraria['costo_orario'], 2, ',', '.').'", "decimals": "2", "icon-after": "<i class=\'fa fa-euro\'></i>" ]} </td>
|
2022-03-31 16:50:23 +02:00
|
|
|
<td class="text-right">
|
2022-06-01 15:38:36 +02:00
|
|
|
{[ "type": "number", "name": "fascia_km['.$fascia_oraria['idfasciaoraria'].']", "value": "'.number_format($fascia_oraria['costo_km'], 2, ',', '.').'", "decimals": "2", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
|
2022-03-31 16:50:23 +02:00
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
2022-06-01 15:38:36 +02:00
|
|
|
{[ "type": "number", "name": "fascia_diritto_chiamata['.$fascia_oraria['idfasciaoraria'].']", "value": "'.number_format($fascia_oraria['costo_diritto_chiamata'], 2, ',', '.').'", "decimals": "2", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
|
2022-03-31 16:50:23 +02:00
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
2022-06-01 15:38:36 +02:00
|
|
|
{[ "type": "number", "name": "fascia_orario_tecnico['.$fascia_oraria['idfasciaoraria'].']", "value": "'.number_format($fascia_oraria['costo_orario_tecnico'], 2, ',', '.').'", "decimals": "2", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
|
2022-03-31 16:50:23 +02:00
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
2022-06-01 15:38:36 +02:00
|
|
|
{[ "type": "number", "name": "fascia_km_tecnico['.$fascia_oraria['idfasciaoraria'].']", "value": "'.number_format($fascia_oraria['costo_km_tecnico'], 2, ',', '.').'", "decimals": "2", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
|
2022-03-31 16:50:23 +02:00
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
2022-06-01 15:38:36 +02:00
|
|
|
{[ "type": "number", "name": "fascia_diritto_chiamata_tecnico['.$fascia_oraria['idfasciaoraria'].']", "value": "'.number_format($fascia_oraria['costo_diritto_chiamata_tecnico'], 2, ',', '.').'", "decimals": "2", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
|
2022-03-31 16:50:23 +02:00
|
|
|
</td>
|
|
|
|
</tr>';
|
|
|
|
|
2023-08-04 14:54:28 +02:00
|
|
|
++$i;
|
2022-03-31 16:50:23 +02:00
|
|
|
}
|
|
|
|
|
2023-08-04 14:54:28 +02:00
|
|
|
echo '
|
2022-03-31 16:50:23 +02:00
|
|
|
</table>';
|