#5835 getTotals fixed #1854
|
@ -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))
|
||||||
AS DECIMAL(10, 2)
|
AS DECIMAL(10, 2)
|
||||||
) totalVat
|
) totalVat
|
||||||
FROM vn.invoiceInTax iit
|
FROM vn.invoiceInTax iit
|
||||||
|
|
Loading…
Reference in New Issue