diff --git a/httpdocs/assets/js/safekat/components/alerts/sweetAlert.js b/httpdocs/assets/js/safekat/components/alerts/sweetAlert.js
index b8ee5400..f34692b0 100644
--- a/httpdocs/assets/js/safekat/components/alerts/sweetAlert.js
+++ b/httpdocs/assets/js/safekat/components/alerts/sweetAlert.js
@@ -48,14 +48,12 @@ export const toastPresupuestoSummary = (value, target = 'body') => {
position: 'bottom-end',
html: `
-
-
Total presupuesto :
${value}
-
+
Total presupuesto
+
${value}
`,
customClass: {
popup: 'bg-primary text-white',
},
- background: '#a5dc86',
target: target,
allowEscapeKey: false,
showConfirmButton: false,
diff --git a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js
index aa90ef7b..58a2d142 100644
--- a/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js
+++ b/httpdocs/assets/js/safekat/pages/presupuestoAdmin/sections/resumen.js
@@ -297,7 +297,7 @@ class Resumen {
$('#totalAntesDescuento').text((this.addSeparatorsNF(totalAntesDescuento.toFixed(2), ".", ",", ".")) + "€")
$('#descuentoTotal').text((this.addSeparatorsNF(totalDescuento.toFixed(2), ".", ",", ".")) + "€")
- $('#totalDespuesDecuento').text((this.addSeparatorsNF(totalPresupuesto.toFixed(2), ".", ",", ".")) + "€").trigger("change")
+ $('#totalDespuesDecuento').text((this.addSeparatorsNF(totalPresupuesto.toFixed(2), ".", ",", ".")) + "€")
$('#precioUnidadPresupuesto').text((this.addSeparatorsNF(precioUnidad.toFixed(4), ".", ",", ".")) + "€")
$('#totalAntesDescuento').attr('val', (totalAntesDescuento).toFixed(2))
$('#descuentoTotal').attr('val', (totalDescuento).toFixed(2))
@@ -310,7 +310,6 @@ class Resumen {
$('#factor_ponderado').text(this.addSeparatorsNF(((totalPresupuesto - totalEnvios - margenEnvios) / sumForFactorPonderado).toFixed(2), ".", ",", "."))
$('#factor_ponderado').attr('val', ((totalPresupuesto - totalEnvios - margenEnvios) / sumForFactorPonderado).toFixed(2))
- this.updateToastSummary()
}
@@ -362,8 +361,18 @@ class Resumen {
this.toastPresupuestoTotal.close()
}
- this.toastPresupuestoTotal = toastPresupuestoSummary($("#totalDespuesDecuento").text())
- this.toastPresupuestoTotal.fire();
+ this.toastPresupuestoTotal = toastPresupuestoSummary($("#totalDespuesDecuento").text() ?? 0)
+ this.toastPresupuestoTotal.fire().then((result) => {
+ if(result.isDismissed){
+ this.updateToastSummary()
+ $('html, body').animate(
+ {
+ scrollTop: $("#totalDespuesDecuento").offset().top
+ },
+ 1000)
+ }
+ })
+
}
}