default table encuadernacion

This commit is contained in:
amazuecos
2025-04-27 19:24:11 +02:00
parent 0b767c63e9
commit 1d6f5fe53e
2 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,30 @@
<table>
<tr class="encuadernacion">
<th >Encuadernacion</th>
<th class="cell-50"></th>
<th class="cell-50"></th>
<th class="cell-50"></th>
<th class="cell-50">Sobrecubierta</th>
<th class="cell-50">Guardas</th>
<th class="cell-50">Retractilado</th>
<th class="cell-50">Marcapáginas</th>
</tr>
<?php if (count($encuadernaciones) > 0): ?>
<?php foreach ($encuadernaciones as $key => $value): ?>
<tr style="color: red;">
<td><?= $value->tarifa()->nombre ?></td>
<td></td>
<td></td>
<td></td>
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr style="color: red;">
<td colspan="7">Sin encuadernación</td>
</tr>
<?php endif; ?>
</table>

View File

@ -335,12 +335,13 @@ $settings = $session->get('settings');
if ($encuadernacion_code) {
echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php");
} else {
throw new Exception('No existe código de encuadernación.');
echo view("/themes/vuexy/pdfs/encuadernados/default.php");
}
} catch (\Throwable $th) {
$error_message = $th->getMessage();
echo view("/themes/vuexy/pdfs/encuadernados/default.php");
echo "<span style='color:red'>No se ha podido renderizar la tabla de encuadernación</span>";
echo "<br><span style='color:red'>$error_message</span>";
// echo "<br><span style='color:red'>$error_message</span>";
}
?>
<?php if (count($encuadernaciones) > 0): ?>