From bd7eb67aebfaf39fb64f0c5a90ab397686e3d7d9 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 9 May 2022 12:31:38 +0200 Subject: [PATCH] fix: add CAST DECIMAL(10,2) --- modules/invoiceIn/back/methods/invoice-in/getTotals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/invoiceIn/back/methods/invoice-in/getTotals.js b/modules/invoiceIn/back/methods/invoice-in/getTotals.js index 918467010..f35c10617 100644 --- a/modules/invoiceIn/back/methods/invoice-in/getTotals.js +++ b/modules/invoiceIn/back/methods/invoice-in/getTotals.js @@ -30,7 +30,7 @@ module.exports = Self => { SUM(iidd.amount) totalDueDay FROM vn.invoiceIn ii LEFT JOIN (SELECT SUM(iit.taxableBase) totalTaxableBase, - SUM(iit.taxableBase * (1 + (ti.PorcentajeIva / 100))) totalVat + CAST(SUM(iit.taxableBase * (1 + (ti.PorcentajeIva / 100))) AS DECIMAL(10,2)) totalVat FROM vn.invoiceInTax iit LEFT JOIN sage.TiposIva ti ON ti.CodigoIva = iit.taxTypeSageFk WHERE iit.invoiceInFk = ?) iit ON TRUE