openstamanager/modules/tecnici_tariffe/edit.php

114 lines
4.8 KiB
PHP
Raw Normal View History

<?php
2020-09-07 15:04:06 +02:00
/*
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
2021-01-20 15:08:51 +01:00
* Copyright (C) DevCode s.r.l.
2020-09-07 15:04:06 +02:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
include_once __DIR__.'/../../core.php';
2019-07-08 12:24:59 +02:00
echo '
<form action="" method="post" id="edit-form">
<input type="hidden" name="op" value="update">
2019-07-08 12:24:59 +02:00
<input type="hidden" name="backto" value="record-edit">
2020-09-07 15:04:06 +02:00
2024-05-23 11:36:25 +02:00
<div class="card card-info collapsable" style="'.((strtolower((string) $record['colore']) == '#ffffff' or empty($record['colore'])) ? '' : 'border-color: '.$record['colore']).'">
2024-05-16 18:02:50 +02:00
<div class="card-header with-border">
<h3 class="card-title"><i class="fa fa-user"></i> '.$record['ragione_sociale'].'</h3>
<div class="card-tools pull-right">
2019-07-08 12:24:59 +02:00
'.Modules::link('Anagrafiche', $record['idanagrafica']).'
</div>
</div>
2024-05-16 18:02:50 +02:00
<div class="card-body">
2020-09-07 15:04:06 +02:00
<table class="table table-striped table-sm">
<tr>
<th>'.tr('Attività').'</th>
2020-09-07 15:04:06 +02:00
2019-07-08 12:24:59 +02:00
<th>
'.tr('Addebito orario').'
<span class="tip" title="'.tr('Addebito al cliente').'"><i class="fa fa-question-circle-o"></i></span>
</th>
<th>
'.tr('Addebito km').'
<span class="tip" title="'.tr('Addebito al cliente').'"><i class="fa fa-question-circle-o"></i></span>
</th>
<th>
'.tr('Addebito diritto ch.').'
<span class="tip" title="'.tr('Addebito al cliente').'"><i class="fa fa-question-circle-o"></i></span>
</th>
<th>
'.tr('Costo orario').'
<span class="tip" title="'.tr('Costo interno').'"><i class="fa fa-question-circle-o"></i></span>
</th>
<th>
'.tr('Costo km').'
<span class="tip" title="'.tr('Costo interno').'"><i class="fa fa-question-circle-o"></i></span>
</th>
<th>
'.tr('Costo diritto ch.').'
<span class="tip" title="'.tr('Costo interno').'"><i class="fa fa-question-circle-o"></i></span>
</th>
2020-09-07 15:04:06 +02:00
<th width="40"></th>
</tr>';
2024-01-15 15:30:45 +01:00
// Tipi di interventi
foreach ($tipi_interventi as $tipo_intervento) {
echo '
<tr>
2020-09-07 15:04:06 +02:00
2024-04-24 17:25:35 +02:00
<td>'.$tipo_intervento['title'].'</td>
<td>
2024-03-13 17:32:07 +01:00
{[ "type": "number", "name": "costo_ore['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_ore'].'", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
</td>
<td>
2024-03-13 17:32:07 +01:00
{[ "type": "number", "name": "costo_km['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_km'].'", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
</td>
<td>
2024-03-13 17:32:07 +01:00
{[ "type": "number", "name": "costo_dirittochiamata['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_dirittochiamata'].'", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
</td>
<td>
2024-03-13 17:32:07 +01:00
{[ "type": "number", "name": "costo_ore_tecnico['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_ore_tecnico'].'", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
</td>
<td>
2024-03-13 17:32:07 +01:00
{[ "type": "number", "name": "costo_km_tecnico['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_km_tecnico'].'", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
</td>
<td>
2024-03-13 17:32:07 +01:00
{[ "type": "number", "name": "costo_dirittochiamata_tecnico['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_dirittochiamata_tecnico'].'", "icon-after": "<i class=\'fa fa-euro\'></i>" ]}
</td>
2020-09-07 15:04:06 +02:00
<td>
2024-03-13 17:32:07 +01:00
<a class="btn btn-warning ask" data-backto="record-edit" data-method="post" data-op="import" data-idtipointervento="'.$tipo_intervento['id'].'" data-msg="'.tr('Vuoi importare la tariffa standard?').'" data-button="'.tr('Importa').'" data-class="btn btn-lg btn-info">
<i class="fa fa-download"></i>
2019-07-08 12:24:59 +02:00
</a>
</td>
</tr>';
2024-01-15 15:30:45 +01:00
}
2019-07-08 12:24:59 +02:00
echo '
</table>
</div>
2019-07-08 12:24:59 +02:00
</div>';