#5835 getTotals fixed #1854

Merged
jorgep merged 7 commits from 5835-fixGetTotals into dev 2023-11-24 09:56:22 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 6b2c1e09de - Show all commits

View File

@ -32,7 +32,7 @@ module.exports = Self => {
LEFT JOIN ( LEFT JOIN (
SELECT SUM(iit.taxableBase) totalTaxableBase, SELECT SUM(iit.taxableBase) totalTaxableBase,
CAST( CAST(
SUM(COALESCE(iit.taxableBase * (1 + (ti.PorcentajeIva / 100)), iit.taxableBase)) SUM(IFNULL(iit.taxableBase * (1 + (ti.PorcentajeIva / 100)), iit.taxableBase))
jorgep marked this conversation as resolved Outdated

si hay dos valores, no pongas coalesce, pon ifnull que es mas claro

si hay dos valores, no pongas coalesce, pon ifnull que es mas claro
AS DECIMAL(10, 2) AS DECIMAL(10, 2)
) totalVat ) totalVat
FROM vn.invoiceInTax iit FROM vn.invoiceInTax iit