Fix ordinamento righe in attività

This commit is contained in:
Luca 2022-01-29 23:49:19 +01:00
parent 88457af3b8
commit 1b890bb5a8
4 changed files with 35 additions and 16 deletions

View File

@ -95,7 +95,7 @@ if ($show_prezzi) {
</td>
</tr>';
// SCONTO
// Totale sconto
if (!empty($sconto)) {
echo '
<tr>
@ -130,7 +130,7 @@ if ($show_prezzi) {
</td>
</tr>';
// Totale preventivo
// Totale attività
echo '
<tr>
<td colspan="3" class="text-right">

View File

@ -61,7 +61,7 @@ if (!empty($sessioni)) {
if (!$is_completato) {
echo '
<th width="100" class="text-center">#</th>';
<th width="100" class="text-center">&nbsp;</th>';
}
echo '

View File

@ -22,26 +22,26 @@ include_once __DIR__.'/init.php';
$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico'));
$righe = $intervento->getRighe();
if (!$righe->isEmpty()) {
echo '
<div class="table-responsive">
<table class="table table-striped table-hover table-condensed table-bordered">
<thead>
<tr>
<th>'.tr('Descrizione').'</th>
<th class="text-center" width="8%">'.tr('Q.').'</th>';
<th class="text-center" width="80">'.tr('Q.').'</th>';
if ($show_prezzi) {
echo '
<th class="text-center" width="15%">'.tr('Prezzo di acquisto').'</th>
<th class="text-center" width="15%">'.tr('Prezzo di vendita').'</th>
<th class="text-center" width="10%">'.tr('Iva unitaria').'</th>
<th class="text-center" width="15%">'.tr('Importo').'</th>';
<th class="text-center" width="150">'.tr('Prezzo di acquisto').'</th>
<th class="text-center" width="150">'.tr('Prezzo di vendita').'</th>
<th class="text-center" width="150">'.tr('Iva unitaria').'</th>
<th class="text-center" width="150">'.tr('Importo').'</th>';
}
if (!$record['flag_completato']) {
echo '
<th class="text-center" width="120" class="text-center">'.tr('#').'</th>';
<th class="text-center" width="60" class="text-center">'.tr('&nbsp;').'</th>';
}
echo '
</tr>
@ -172,13 +172,32 @@ if (!$righe->isEmpty()) {
}
echo '
</tbody>
</tbody>';
$show_prezzi = Auth::user()['gruppo'] != 'Tecnici' || (Auth::user()['gruppo'] == 'Tecnici' && setting('Mostra i prezzi al tecnico'));
if ($show_prezzi) {
// Calcoli
$righe = $intervento->getRighe();
// IMPONIBILE
echo '
<tr>
<td colspan="'.((!$record['flag_completato']) ? 5 : 4).'" class="text-right">
<b>'.tr('Imponibile', [], ['upper' => true]).':</b>
</td>
<td class="text-right">
'.moneyFormat($righe->sum('totale_imponibile'), 2).'
</td>
<td></td>
</tr>';
}
echo'
</table>
</div>';
} else {
echo '
<p>'.tr('Nessuna riga presente').'.</p>';
}
echo '
<script type="text/javascript">

View File

@ -31,7 +31,7 @@ echo '
<th class="text-center" width="150">'.tr('Prezzo unitario').'</th>
<th class="text-center" width="150">'.tr('Iva unitaria').'</th>
<th class="text-center" width="150">'.tr('Importo').'</th>
<th width="60"></th>
<th width="60">&nbsp;</th>
</tr>
</thead>