diff --git a/src/composables/getTotal.js b/src/composables/getTotal.js index 41c4330c4..24ac3aa27 100644 --- a/src/composables/getTotal.js +++ b/src/composables/getTotal.js @@ -1,10 +1,10 @@ import { toCurrency } from 'src/filters'; export function getTotal(rows, key, opts = {}) { - const { currency, cb } = opts; + const { currency, cb, decimalPlaces } = opts; const total = rows.reduce((acc, row) => acc + +(cb ? cb(row) : row[key] || 0), 0); return currency ? toCurrency(total, currency == 'default' ? undefined : currency) - : total; + : parseFloat(total).toFixed(decimalPlaces ?? 2); } diff --git a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue index bee50a07d..08ce0755d 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInIntrastat.vue @@ -261,7 +261,7 @@ const formatOpt = (row, { model, options }, prop) => { country: Country es: Code: Código - amount: Cantidad + amount: Valor mercancía net: Neto stems: Tallos country: País diff --git a/src/pages/InvoiceIn/Card/InvoiceInVat.vue b/src/pages/InvoiceIn/Card/InvoiceInVat.vue index 526092f02..100eecda6 100644 --- a/src/pages/InvoiceIn/Card/InvoiceInVat.vue +++ b/src/pages/InvoiceIn/Card/InvoiceInVat.vue @@ -188,11 +188,6 @@ const formatOpt = (row, { model, options }, prop) => {