#5835 getTotals fixed #1854
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
|||
LEFT JOIN (
|
||||
SELECT SUM(iit.taxableBase) totalTaxableBase,
|
||||
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
|
||||
AS DECIMAL(10, 2)
|
||||
) totalVat
|
||||
FROM vn.invoiceInTax iit
|
||||
|
|
Loading…
Reference in New Issue
si hay dos valores, no pongas coalesce, pon ifnull que es mas claro