mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
arreglado resumen de cliente y mensaje de cubierta sin plastificado
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
|
||||
<div class="col-sm-8 mb-3 d-flex flex-column align-items-center">
|
||||
<h5 class="mb-1 "> Precio unidad: <span id="resumenPrecioU"></span> €</h5>
|
||||
<h4 class="mb-1 "> Total base: <span id="resumenTotalBase"></span> €</h4>
|
||||
<h4 class="mt-3 mb-1 "> Total base: <span id="resumenTotalBase"></span> €</h4>
|
||||
<h4 class="mb-1 "> Envío: <span id="resumenTotalEnvio"></span> €</h4>
|
||||
<h4 class="mb-1 "> Total antes de I.V.A: <span id="resumenTotalAntesIVA"></span> €</h4>
|
||||
<h4 class="mb-1 "> Iva (<span id="resumenIvaPorcentaje"></span>%): <span id="resumenIva"></span> €</h4>
|
||||
|
||||
@ -548,7 +548,9 @@ class PresupuestoCliente {
|
||||
const skAlert = document.getElementById('sk-alert');
|
||||
skAlert.innerHTML = '';
|
||||
|
||||
if (this.datos.cubierta && this.datos.cubierta.acabado && this.datos.cubierta.acabado > 0) {
|
||||
const acabadoCubierta = this.disenioCubierta.getAcabados();
|
||||
|
||||
if (acabadoCubierta && acabadoCubierta != null && acabadoCubierta > 0) {
|
||||
|
||||
$('#alert-cubierta-sin-acabado').addClass('d-none');
|
||||
}
|
||||
|
||||
@ -352,26 +352,27 @@ class Resumen {
|
||||
|
||||
|
||||
let envios = tarjetaPrecio.find('.tarjeta-tiradas-precios-envio').val();
|
||||
this.total_envios.text(this.#changeDecimalFormat(parseFloat(envios).toFixed(2)));
|
||||
this.total_envios.text(this.#changeDecimalFormat(parseFloat(envios || 0).toFixed(2)));
|
||||
|
||||
let precio_u_text = tarjetaPrecio.find('.tarjeta-tiradas-precios-precio-unidad').text();
|
||||
precio_u_text = precio_u_text.replace('€/ud', '');
|
||||
|
||||
const base = tarjetaPrecio.find('.tarjeta-tiradas-precios-precio').attr('data');
|
||||
let base_text = this.#changeDecimalFormat(parseFloat(base).toFixed(2));
|
||||
let base_text = this.#changeDecimalFormat(parseFloat(base || 0).toFixed(2));
|
||||
|
||||
const total_antes_iva_text = this.#changeDecimalFormat((parseFloat(base) + parseFloat(envios)).toFixed(2));
|
||||
const total_antes_iva_text = this.#changeDecimalFormat((parseFloat(base || 0) + parseFloat(envios || 0)).toFixed(2));
|
||||
|
||||
const iva_porcentaje = parseInt(this.datosGenerales.ivaReducido.find('option:selected').val()) == 1 ? 0.04 : 0.21;
|
||||
const iva = ((parseFloat(base) + parseFloat(envios)) * iva_porcentaje).toFixed(2);
|
||||
const iva = ((parseFloat(base || 0) + parseFloat(envios || 0)) * iva_porcentaje).toFixed(2);
|
||||
let iva_text = this.#changeDecimalFormat(iva);
|
||||
|
||||
const total = (parseFloat(base) + parseFloat(envios) + parseFloat(iva)).toFixed(2);
|
||||
const total = (parseFloat(base || 0) + parseFloat(envios || 0) + parseFloat(iva || 0)).toFixed(2);
|
||||
let total_text = this.#changeDecimalFormat(total);
|
||||
|
||||
|
||||
this.precio_unidad.text(precio_u_text);
|
||||
this.total_base.text(base_text);
|
||||
this.total_antes_iva.text(total_antes_iva_text);
|
||||
this.iva_porcentaje.text(this.datosGenerales.ivaReducido.find('option:selected').val() == 1 ? '4' : '21');
|
||||
this.iva.text(iva_text);
|
||||
this.total.text(total_text);
|
||||
|
||||
Reference in New Issue
Block a user