mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-03 17:48:49 +00:00
56 lines
2.2 KiB
HTML
56 lines
2.2 KiB
HTML
<div th:fragment="factura-cabecera (factura)">
|
|
|
|
<h3>
|
|
<span th:class="|text-${factura.estado.name() == 'borrador' ? 'warning' : 'success'}|"
|
|
th:text="#{|facturas.estado.${factura.estado.name()}|}">
|
|
</span>
|
|
/
|
|
<span th:class="|text-${factura.estadoPago.name() == 'pendiente' ? 'warning' : 'success'}|"
|
|
th:text="#{|facturas.estado-pago.${factura.estadoPago.name()}|}">
|
|
</span>
|
|
</h3>
|
|
|
|
<!-- flag readonly -->
|
|
<th:block th:with="isReadonly=${factura.estado.name() == 'validada'}">
|
|
|
|
<div class="row g-3">
|
|
|
|
<!-- Número -->
|
|
<div class="col-md-3">
|
|
<label class="form-label">Número</label>
|
|
<input type="text" class="form-control" th:value="${factura.numeroFactura}"
|
|
th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
|
</div>
|
|
|
|
<!-- Serie -->
|
|
<div class="col-md-3">
|
|
<label class="form-label">Serie facturación</label>
|
|
<input type="text" class="form-control"
|
|
th:value="${factura.serie != null ? factura.serie.nombreSerie : ''}" readonly>
|
|
</div>
|
|
|
|
<!-- Cliente -->
|
|
<div class="col-md-6">
|
|
<label class="form-label">Cliente</label>
|
|
<input type="text" class="form-control" th:value="${factura.cliente.fullName}" readonly>
|
|
</div>
|
|
|
|
<!-- Fecha emisión -->
|
|
<div class="col-md-3">
|
|
<label class="form-label">Fecha</label>
|
|
<input type="text" class="form-control" th:value="${factura.fechaEmision != null
|
|
? #temporals.format(factura.fechaEmision, 'dd/MM/yyyy')
|
|
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
|
</div>
|
|
|
|
<!-- Notas -->
|
|
<div class="col-md-12">
|
|
<label class="form-label">Notas</label>
|
|
<textarea class="form-control" rows="3" th:text="${factura.notas}"
|
|
th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
|
</textarea>
|
|
</div>
|
|
|
|
</div>
|
|
</th:block>
|
|
</div> |