salix/print/templates/reports/invoiceIn/sql/taxes.sql

10 lines
277 B
SQL

SELECT
ti.iva as name,
ti.PorcentajeIva as rate,
iit.taxableBase
FROM invoiceIn ii
JOIN invoiceInTax iit ON ii.id = iit.invoiceInFk
JOIN sage.TiposIva ti ON ti.CodigoIva = iit.taxTypeSageFk
WHERE ii.id = ?
ORDER BY name DESC;