mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-02-06 19:09:14 +00:00
terminando pdf de facturas
This commit is contained in:
@ -15,17 +15,17 @@
|
||||
|
||||
<div class="row g-3">
|
||||
|
||||
<!-- Número -->
|
||||
<!-- Número (solo lectura siempre, normalmente) -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.form.numero-factura}">Número</label>
|
||||
<input type="text" class="form-control" th:value="${factura.numeroFactura}"
|
||||
th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
<label class="form-label" th:text="#{facturas.form.numero-factura}">Número de factura</label>
|
||||
<input id="facturaNumero" type="text" class="form-control" th:value="${factura.numeroFactura}" readonly>
|
||||
</div>
|
||||
|
||||
<!-- Serie -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.form.serie}">Serie facturación</label>
|
||||
<select class="form-control js-select2-factura" data-url="/configuracion/series-facturacion/api/get-series" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
<label class="form-label" th:text="#{facturas.form.serie}">Serie</label>
|
||||
<select id="facturaSerieId" class="form-control js-select2-factura"
|
||||
data-url="/configuracion/series-facturacion/api/get-series" th:attr="disabled=${isReadonly}">
|
||||
<option th:value="${factura.serie != null ? factura.serie.id : ''}"
|
||||
th:text="${factura.serie != null ? factura.serie.nombreSerie : ''}" selected>
|
||||
</option>
|
||||
@ -35,19 +35,20 @@
|
||||
<!-- Cliente -->
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" th:text="#{facturas.form.cliente}">Cliente</label>
|
||||
<select class="form-control js-select2-factura" data-url="/users/api/get-users" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
<select id="facturaClienteId" class="form-control js-select2-factura" data-url="/users/api/get-users"
|
||||
th:attr="disabled=${isReadonly}">
|
||||
<option th:value="${factura.cliente != null ? factura.cliente.id : ''}"
|
||||
th:text="${factura.cliente != null ? factura.cliente.fullName : ''}" selected>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Fecha emisión -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.form.fecha-emision}">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">
|
||||
|
||||
<input id="facturaFechaEmision" type="text" class="form-control"
|
||||
th:value="${factura.fechaEmision != null ? #temporals.format(factura.fechaEmision, 'dd/MM/yyyy') : ''}"
|
||||
th:attr="readonly=${isReadonly}, data-estado=${factura.estado.name()}">
|
||||
</div>
|
||||
|
||||
<!-- Notas -->
|
||||
@ -67,7 +68,7 @@
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" th:text="#{facturas.direccion.razon-social}">Razón Social</label>
|
||||
<input type="text" class="form-control" th:value="${direccionFacturacion != null
|
||||
<input type="text" id="dirRazonSocial" class="form-control" th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.razonSocial
|
||||
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
</div>
|
||||
@ -75,7 +76,7 @@
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" th:text="#{facturas.direccion.identificacion-fiscal}">Identificacion
|
||||
Fiscal</label>
|
||||
<input type="text" class="form-control" th:value="${direccionFacturacion != null
|
||||
<input type="text" id="dirIdentificacionFiscal" class="form-control" th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.identificacionFiscal
|
||||
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
</div>
|
||||
@ -83,39 +84,39 @@
|
||||
|
||||
<div class="col-md-9">
|
||||
<label class="form-label" th:text="#{facturas.direccion.direccion}">Dirección</label>
|
||||
<input type="text" class="form-control" th:value="${direccionFacturacion != null
|
||||
<input type="text" id="dirDireccion" class="form-control" th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.direccion
|
||||
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.direccion.codigo-postal}">Código Postal</label>
|
||||
<input type="text" class="form-control" th:value="${direccionFacturacion != null
|
||||
<input type="text" id="dirCp" class="form-control" th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.cp
|
||||
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.direccion.ciudad}">Ciudad</label>
|
||||
<input type="text" class="form-control" th:value="${direccionFacturacion != null
|
||||
<input type="text" id="dirCiudad" class="form-control" th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.ciudad
|
||||
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.direccion.provincia}">Provincia</label>
|
||||
<input type="text" class="form-control" th:value="${direccionFacturacion != null
|
||||
<input type="text" id="dirProvincia" class="form-control" th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.provincia
|
||||
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.direccion.pais}">País</label>
|
||||
<select class="form-control js-select2-factura" data-url="/api/paises" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
<select id="dirPais" class="form-control js-select2-factura" data-url="/api/paises"
|
||||
th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
<option th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.pais.keyword
|
||||
: ''}"
|
||||
th:text="${direccionFacturacion != null
|
||||
? direccionFacturacion.pais.code3
|
||||
: ''}" th:text="${direccionFacturacion != null
|
||||
? #messages.msg('paises.' + direccionFacturacion.pais.keyword)
|
||||
: ''}" selected>
|
||||
</option>
|
||||
@ -124,7 +125,7 @@
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label" th:text="#{facturas.direccion.telefono}">Teléfono</label>
|
||||
<input type="text" class="form-control" th:value="${direccionFacturacion != null
|
||||
<input type="text" id="dirTelefono" class="form-control" th:value="${direccionFacturacion != null
|
||||
? direccionFacturacion.telefono
|
||||
: ''}" th:attrappend="readonly=${isReadonly} ? 'readonly' : null">
|
||||
</div>
|
||||
@ -133,18 +134,18 @@
|
||||
<div class="row g-3 mt-4 justify-content-end">
|
||||
|
||||
<div class="col-md-12 text-end">
|
||||
<th:block th:if="${factura.estado.name() == 'borrador'}">
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-validar-factura"
|
||||
th:text="#{facturas.form.btn.validar}">Validar factura</button>
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-guardar-factura"
|
||||
th:text="#{facturas.form.btn.guardar}">Guardar</button>
|
||||
</th:block>
|
||||
<th:block th:if="${factura.estado.name() == 'validada'}">
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-borrador-factura"
|
||||
th:text="#{facturas.form.btn.borrador}">Pasar a borrador</button>
|
||||
</th:block>
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-imprimir-factura"
|
||||
th:text="#{facturas.form.btn.imprimir}">Imprimir factura</button>
|
||||
<th:block th:if="${factura.estado.name() == 'borrador'}">
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-validar-factura"
|
||||
th:text="#{facturas.form.btn.validar}">Validar factura</button>
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-guardar-factura"
|
||||
th:text="#{facturas.form.btn.guardar}">Guardar</button>
|
||||
</th:block>
|
||||
<th:block th:if="${factura.estado.name() == 'validada'}">
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-borrador-factura"
|
||||
th:text="#{facturas.form.btn.borrador}">Pasar a borrador</button>
|
||||
</th:block>
|
||||
<button type="button" class="btn btn-secondary me-2" id="btn-imprimir-factura"
|
||||
th:text="#{facturas.form.btn.imprimir}">Imprimir factura</button>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
Reference in New Issue
Block a user