mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-08 11:59:13 +00:00
primera versión de pedido realizada
This commit is contained in:
@ -1,72 +1,196 @@
|
||||
<div id="presupuesto-app" th:data-mode="${appMode} ?: 'public'" th:data-id="${id} ?: ''" th:fragment="presupuestador">
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{imprimelibros/layout}">
|
||||
|
||||
<div class="row" id="presupuesto-row">
|
||||
<div class="animate-fadeInUpBounce">
|
||||
<head>
|
||||
<th:block layout:fragment="pagetitle" />
|
||||
<th:block th:replace="~{imprimelibros/partials/head-css :: head-css}" />
|
||||
<th:block layout:fragment="pagecss">
|
||||
<link th:href="@{/assets/libs/datatables/dataTables.bootstrap5.min.css}" rel="stylesheet" />
|
||||
</th:block>
|
||||
<th:block layout:fragment="pagecss">
|
||||
<link th:href="@{/assets/css/presupuestador.css}" rel="stylesheet" />
|
||||
</th:block>
|
||||
</head>
|
||||
|
||||
<!-- Ribbon Shape -->
|
||||
<div class="card ribbon-box border shadow-none mb-lg-0 material-shadow">
|
||||
<div class="card-body">
|
||||
<div class="ribbon ribbon-primary ribbon-shape" th:text="#{presupuesto.resumen}">Resumen
|
||||
</div>
|
||||
<body>
|
||||
|
||||
<div th:replace="~{imprimelibros/partials/topbar :: topbar}" />
|
||||
<div th:replace="~{imprimelibros/partials/sidebar :: sidebar}"
|
||||
sec:authorize="isAuthenticated() and hasAnyRole('SUPERADMIN','ADMIN')">
|
||||
|
||||
<th:block layout:fragment="content">
|
||||
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="/"><i class="ri-home-5-fill"></i></a></li>
|
||||
<li class="breadcrumb-item"><a href="/presupuesto" th:text="#{presupuesto.title}"></a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page" th:if="${appMode == 'add'}"
|
||||
th:text="#{presupuesto.add}">
|
||||
Nuevo presupuesto
|
||||
</li>
|
||||
<li class="breadcrumb-item active" aria-current="page" th:text="#{presupuesto.editar.title}"
|
||||
th:if="${appMode == 'edit'}">
|
||||
Editar presupuesto
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="ribbon-content mt-4">
|
||||
<div id="div-extras" class="hstack gap-2 justify-content-center flex-wrap">
|
||||
<div class="container-fluid">
|
||||
|
||||
<input type="hidden" id="presupuesto-id" th:value="${presupuesto.id}" />
|
||||
|
||||
<div class="row" id="card presupuesto-row animate-fadeInUpBounce">
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h4 class="card-title mb-0 text-uppercase" th:text="${resumen.titulo}">Resumen del
|
||||
presupuesto</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="card col-12 col-sm-9 mx-auto">
|
||||
<h5 id="resumen-titulo" class="text-center"></h5>
|
||||
<table id="resumen-tabla-final" class="table table-borderless table-striped mt-3"
|
||||
th:data-currency="#{app.currency}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.descripcion}">Descripción
|
||||
</th>
|
||||
<th class="text-end" th:text="#{presupuesto.resumen.tabla.cantidad}">
|
||||
Cantidad</th>
|
||||
<th class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.precio-unidad}">Precio
|
||||
unitario
|
||||
</th>
|
||||
<th class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.precio-total}">Precio total
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:if="${resumen['linea0']}">
|
||||
<td><img style="max-width: 60px; height: auto;" th:src="${resumen['imagen']}" th:alt="${resumen['imagen_alt']}" class="img-fluid" /></td>
|
||||
<td class="text-start" th:utext="${resumen['linea0'].descripcion}">
|
||||
Descripción 1</td>
|
||||
<td class="text-end" th:text="${resumen['linea0'].cantidad}">1</td>
|
||||
<td class="text-end moneda4"
|
||||
th:text="${resumen['linea0'].precio_unitario}">
|
||||
100,00 €
|
||||
</td>
|
||||
<td class="text-end moneda" th:text="${resumen['linea0'].precio_total}">
|
||||
100,00
|
||||
€
|
||||
</td>
|
||||
</tr>
|
||||
<tr th:if="${resumen['linea1']}">
|
||||
<td></td>
|
||||
<td class="text-start" th:utext="${resumen['linea1'].descripcion}">
|
||||
Descripción 2</td>
|
||||
<td class="text-end" th:text="${resumen['linea1'].cantidad}">1</td>
|
||||
<td class="text-end moneda4"
|
||||
th:text="${resumen['linea1'].precio_unitario}">
|
||||
50,00 €
|
||||
</td>
|
||||
<td class="text-end moneda" th:text="${resumen['linea1'].precio_total}">
|
||||
50,00 €
|
||||
</td>
|
||||
</tr>
|
||||
<th:block th:each="servicio :${resumen['servicios']}">
|
||||
<tr th:attr="data-servicio-id=${servicio['id']}">
|
||||
<td></td>
|
||||
<td class="text-start" th:utext="${servicio['descripcion']}">
|
||||
Descripción 3</td>
|
||||
<td class="text-end" th:text="${servicio['unidades']}">1</td>
|
||||
<td class="text-end moneda" th:text="${servicio['precio']}">
|
||||
25,00 €
|
||||
</td>
|
||||
<td class="text-end moneda"
|
||||
th:text="${servicio['precio'] * servicio['unidades']}">
|
||||
25,00 €
|
||||
</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.base}">Total</th>
|
||||
<th class="text-end moneda" id="resumen-base"
|
||||
th:text="${presupuesto.baseImponible}">0,00 €</th>
|
||||
</tr>
|
||||
<tr th:if="${presupuesto.ivaImporte4 > 0}" id="tr-resumen-iva4"
|
||||
class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.iva4}">IVA (4%)</th>
|
||||
<th class="text-end moneda" id="resumen-iva4"
|
||||
th:text="${presupuesto.ivaImporte4}">0,00 €</th>
|
||||
</tr>
|
||||
<tr th:if="${presupuesto.ivaImporte21 > 0}" id="tr-resumen-iva21"
|
||||
class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.iva21}">IVA (21%)</th>
|
||||
<th class="text-end moneda" id="resumen-iva21"
|
||||
th:text="${presupuesto.ivaImporte21}">0,00 €</th>
|
||||
</tr>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end"
|
||||
th:text="#{presupuesto.resumen.tabla.total}">Total con IVA
|
||||
</th>
|
||||
<th class="text-end moneda" id="resumen-total"
|
||||
th:text="${presupuesto.totalConIva}">0,00 €</th>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="buttons-row center">
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 btn-imprimir">
|
||||
<i class="ri-printer-line me-2"></i>
|
||||
<span th:text="#{app.imprimir}">Imprimir</span>
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 add-cart-btn">
|
||||
<i class="ri-shopping-cart-line me-2"></i>
|
||||
<span th:text="#{presupuesto.add-to-cart}">Añadir a la cesta</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
<!-- End Ribbon Shape -->
|
||||
|
||||
<div class="col-9 mx-auto mt-4">
|
||||
<h5 id="resumen-titulo" class="text-center"></h5>
|
||||
<table id="resumen-tabla-final" class="table table-borderless table-striped mt-3"
|
||||
th:data-currency="#{app.currency}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.descripcion}">Descripción</th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.cantidad}">Cantidad</th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.precio-unidad}">Precio unitario</th>
|
||||
<th th:text="#{presupuesto.resumen.tabla.precio-total}">Precio total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.base}">Total</th>
|
||||
<th class="text-end" id="resumen-base">0,00 €</th>
|
||||
</tr>
|
||||
<tr id="tr-resumen-iva4" class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.iva4}">IVA (4%)</th>
|
||||
<th class="text-end" id="resumen-iva4">0,00 €</th>
|
||||
</tr>
|
||||
<tr id="tr-resumen-iva21" class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.iva21}">IVA (21%)</th>
|
||||
<th class="text-end" id="resumen-iva21">0,00 €</th>
|
||||
</tr>
|
||||
<tr class="table-active">
|
||||
<th colspan="4" class="text-end" th:text="#{presupuesto.resumen.tabla.total}">Total con IVA
|
||||
</th>
|
||||
<th class="text-end" id="resumen-total">0,00 €</th>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mt-4 w-100">
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 btn-imprimir">
|
||||
<i class="ri-printer-line me-2"></i>
|
||||
<span th:text="#{app.imprimir}">Imprimir</span>
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-secondary d-flex align-items-center mx-2 add-cart-btn">
|
||||
<i class="ri-shopping-cart-line me-2"></i>
|
||||
<span th:text="#{presupuesto.add-to-cart}">Añadir a la cesta</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end row-->
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
<th:block th:replace="~{theme/partials/vendor-scripts :: scripts}" />
|
||||
<th:block layout:fragment="pagejs">
|
||||
<script th:inline="javascript">
|
||||
window.languageBundle = /*[[${languageBundle}]]*/ {};
|
||||
</script>
|
||||
|
||||
<!-- JS de Buttons y dependencias -->
|
||||
<div th:if="${appMode} == 'view'">
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-publicos.js}"></script>
|
||||
</div>
|
||||
<div th:if="${appMode} == 'edit'">
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-privado.js}"></script>
|
||||
</div>
|
||||
|
||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestos/resumen-view.js}"></script>
|
||||
|
||||
</th:block>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user