1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-15 09:57:28 +01:00
openstamanager/modules/tecnici_tariffe/edit.php

97 lines
3.8 KiB
PHP
Raw Normal View History

<?php
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">
<div class="box box-info collapsable" style="'.((strtolower($record['colore']) == '#ffffff' or empty($record['colore'])) ? '' : 'border-color: '.$record['colore']).'">
<div class="box-header with-border">
2019-07-08 12:24:59 +02:00
<h3 class="box-title"><i class="fa fa-user"></i> '.$record['ragione_sociale'].'</h3>
<div class="box-tools pull-right">
2019-07-08 12:24:59 +02:00
'.Modules::link('Anagrafiche', $record['idanagrafica']).'
</div>
</div>
<div class="box-body">
<table class="table table-striped table-condensed">
<tr>
<th>'.tr('Attività').'</th>
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>
<th width="40"></th>
</tr>';
// Tipi di interventi
foreach ($tipi_interventi as $tipo_intervento) {
echo '
<tr>
<td>'.$tipo_intervento['descrizione'].'</td>
<td>
2019-07-08 12:24:59 +02:00
{[ "type": "number", "name": "costo_ore['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_ore'].'" ]}
</td>
<td>
2019-07-08 12:24:59 +02:00
{[ "type": "number", "name": "costo_km['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_km'].'" ]}
</td>
<td>
2019-07-08 12:24:59 +02:00
{[ "type": "number", "name": "costo_dirittochiamata['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_dirittochiamata'].'" ]}
</td>
<td>
2019-07-08 12:24:59 +02:00
{[ "type": "number", "name": "costo_ore_tecnico['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_ore_tecnico'].'" ]}
</td>
<td>
2019-07-08 12:24:59 +02:00
{[ "type": "number", "name": "costo_km_tecnico['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_km_tecnico'].'" ]}
</td>
<td>
2019-07-08 12:24:59 +02:00
{[ "type": "number", "name": "costo_dirittochiamata_tecnico['.$tipo_intervento['id'].']", "required": 1, "value": "'.$tipo_intervento['costo_dirittochiamata_tecnico'].'" ]}
</td>
2019-07-08 12:24:59 +02:00
<td>
2019-07-08 12:24:59 +02: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>';
}
2019-07-08 12:24:59 +02:00
echo '
</table>
</div>
2019-07-08 12:24:59 +02:00
</div>';