From 0d5551406a958e42cbcae60500a9ff92999d4d66 Mon Sep 17 00:00:00 2001 From: Ale Date: Thu, 9 Jun 2022 20:09:18 -0300 Subject: [PATCH] Arreglado bug de totales con coma --- public/js/app.js | 2 +- resources/js/components/SubpedidosGdc.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index fff062a..b406716 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -3004,7 +3004,7 @@ __webpack_require__.r(__webpack_exports__); }); for (var i = 0; i < aprobados.length; i++) { - suma += parseFloat(aprobados[i].total); + suma += parseFloat(aprobados[i].total.replace(/,/g, '')); } return suma; diff --git a/resources/js/components/SubpedidosGdc.vue b/resources/js/components/SubpedidosGdc.vue index 767f12c..de31f56 100644 --- a/resources/js/components/SubpedidosGdc.vue +++ b/resources/js/components/SubpedidosGdc.vue @@ -58,7 +58,7 @@ export default { let suma = 0; let aprobados = this.subpedidos.filter(sp => sp.aprobado); for (let i = 0; i < aprobados.length; i++) { - suma += parseFloat(aprobados[i].total); + suma += parseFloat(aprobados[i].total.replace(/,/g, '')); } return suma; }