Merge pull request '3978-invoiceIn.summary' (#967) from 3978-invoiceIn.summary into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #967
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2022-05-09 15:28:59 +00:00
commit b7e3607ece
1 changed files with 1 additions and 1 deletions

View File

@ -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