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à
|
2024-04-18 17:44:05 +02:00
|
|
|
$fasce_orarie = $dbo->fetchArray("SELECT *, CONCAT (`in_fasceorarie_lang`.`title`, ' (', 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` LEFT JOIN `in_fasceorarie_lang` ON (`in_fasceorarie_lang`.`id_record` = `in_fasceorarie`.`id` AND `in_fasceorarie_lang`.`id_lang` = ".prepare(Models\Locale::getDefault()->id).') WHERE `idtipointervento`='.prepare($id_record));
|
2022-03-31 16:50:23 +02:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
echo '
|
2022-03-31 16:50:23 +02:00
|
|
|
<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>';
|
2024-01-15 15:30:45 +01:00
|
|
|
$i = 0;
|
|
|
|
foreach ($fasce_orarie as $fascia_oraria) {
|
|
|
|
$descrizione = $fascia_oraria['descrizione'];
|
|
|
|
$giorni = '';
|
2023-08-04 14:54:28 +02:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
if (!empty($fascia_oraria['giorni'])) {
|
|
|
|
if ($fascia_oraria['giorni'] == '1,2,3,4,5') {
|
|
|
|
$giorni .= 'Lun-Ven';
|
|
|
|
} elseif ($fascia_oraria['giorni'] == '6,7') {
|
|
|
|
$giorni .= 'Sab-Dom';
|
|
|
|
} elseif ($fascia_oraria['giorni'] == '6') {
|
|
|
|
$giorni .= 'Sab';
|
2022-03-31 16:50:23 +02:00
|
|
|
}
|
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
$descrizione .= ' ('.$giorni.')';
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($fascia_oraria['include_bank_holidays'])) {
|
|
|
|
$descrizione .= ' (Festivi)';
|
|
|
|
}
|
2022-03-31 16:50:23 +02:00
|
|
|
|
2024-01-15 15:30:45 +01: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>';
|
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
++$i;
|
|
|
|
}
|
2022-03-31 16:50:23 +02:00
|
|
|
|
2024-01-15 15:30:45 +01:00
|
|
|
echo '
|
2022-03-31 16:50:23 +02:00
|
|
|
</table>';
|