mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadida funcionalidad de albaran anonimo y corregidos bugs
This commit is contained in:
137
ci4/app/Views/themes/vuexy/pdfs/albaran-anonimo.php
Normal file
137
ci4/app/Views/themes/vuexy/pdfs/albaran-anonimo.php
Normal file
@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/font-pdf.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.albaran.css') ?>">
|
||||
<style>
|
||||
@page {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.espaciado-superior {
|
||||
margin-top: 80px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="body-class">
|
||||
<?php $mostrarPrecios = $albaran->mostrar_precios == 1; ?>
|
||||
|
||||
<div class="espaciado-superior"></div>
|
||||
|
||||
<table class="table table-striped lineas">
|
||||
<thead>
|
||||
<tr class="head-lineas">
|
||||
<th class="text-center num_unidades">Nº Unid.</th>
|
||||
<th class="concepto">Pedido</th>
|
||||
<th class="concepto">Título</th>
|
||||
<th class="concepto">ISBN</th>
|
||||
<th class="concepto">Ref. Cliente</th>
|
||||
<?php if ($mostrarPrecios): ?>
|
||||
<th class="precio_unidad">€/ud.</th>
|
||||
<th class="subtotal">Subtotal</th>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$total = 0;
|
||||
$total_precio = 0;
|
||||
foreach ($albaranLineas as $linea):
|
||||
?>
|
||||
|
||||
<?php
|
||||
$total += 1;
|
||||
$total_precio += $linea->total;
|
||||
?>
|
||||
<tr>
|
||||
<td class="text-center num_unidades">
|
||||
<?= $linea->unidades ?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?= $linea->pedido ?>
|
||||
</td>
|
||||
<td>
|
||||
<div><?= $linea->titulo ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<div><?= $linea->isbn ?></div>
|
||||
</td>
|
||||
<td>
|
||||
<div><?= $linea->ref_cliente ?></div>
|
||||
</td>
|
||||
<?php if ($mostrarPrecios): ?>
|
||||
<td class="precio_unidad">
|
||||
<?php if (!str_contains($linea->titulo, "IVA")): ?>
|
||||
<div><?= number_format($linea->precio_unidad, 4, ',', '.') ?></div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="subtotal">
|
||||
<div><?= number_format($linea->total, 2, ',', '.') ?></div>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($total < 5): ?>
|
||||
<?php for ($i = $total; $i < 7; $i++): ?>
|
||||
<tr>
|
||||
<td class="num_unidades">
|
||||
<div></div>
|
||||
</td>
|
||||
<td>
|
||||
<div></div>
|
||||
</td>
|
||||
<td>
|
||||
<div></div>
|
||||
</td>
|
||||
<td>
|
||||
<div></div>
|
||||
</td>
|
||||
<td>
|
||||
<div></div>
|
||||
</td>
|
||||
<?php if ($mostrarPrecios): ?>
|
||||
<td class="precio_unidad">
|
||||
<div></div>
|
||||
</td>
|
||||
<td class="subtotal">
|
||||
<div></div>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endfor; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table style="padding: 5px" class="total">
|
||||
<tr>
|
||||
<td class="intro_recibi">
|
||||
RECIBÍ
|
||||
</td>
|
||||
<?php if ($mostrarPrecios): ?>
|
||||
<td class="intro_total">
|
||||
TOTAL
|
||||
</td>
|
||||
<td class="subtotal">
|
||||
<?= ($total_precio) ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user