Compare commits

...

5 Commits

Author SHA1 Message Date
Guillermo Bonet 65ca1b5af3 Merge pull request 'feat: refs #8149 Group by CuentaIvaRepercutido' (!3201) from 8149-ivaXDiario into dev
gitea/salix/pipeline/head This commit looks good Details
Reviewed-on: #3201
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
2024-11-22 12:09:47 +00:00
Guillermo Bonet 1c6f59a0ec Merge branch '8149-ivaXDiario' of https://gitea.verdnatura.es/verdnatura/salix into 8149-ivaXDiario
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-22 12:59:26 +01:00
Guillermo Bonet 4ab2d7fd09 feat: refs #8149 Group by CuentaIvaRepercutido 2024-11-22 12:59:24 +01:00
Guillermo Bonet c440472693 Merge branch 'dev' into 8149-ivaXDiario
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-11-22 09:43:26 +00:00
Guillermo Bonet 477fb7ded9 feat: refs #8149 Group by CuentaIvaRepercutido
gitea/salix/pipeline/pr-dev Build queued... Details
2024-11-13 14:27:54 +01:00
2 changed files with 5 additions and 4 deletions

View File

@ -26,7 +26,7 @@ BEGIN
DECLARE vCursor CURSOR FOR
SELECT it.taxableBase,
CAST((( it.taxableBase / 100) * t.PorcentajeIva) AS DECIMAL (10,2)),
CAST(SUM((( it.taxableBase / 100) * t.PorcentajeIva)) AS DECIMAL (10,2)),
t.PorcentajeIva,
it.transactionTypeSageFk,
it.taxTypeSageFk,
@ -39,7 +39,8 @@ BEGIN
JOIN TiposTransacciones tt ON tt.CodigoTransaccion = it.transactionTypeSageFk
LEFT JOIN vn.dua d ON d.id = vInvoiceInFk
WHERE i.id = vInvoiceInFk
AND d.id IS NULL;
AND d.id IS NULL
GROUP BY it.taxTypeSageFk;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;

View File

@ -219,7 +219,7 @@ BEGIN
) eWithheld ON TRUE
WHERE tii.taxTypeSageFk IS NOT NULL
AND (tii.taxCode IS NULL OR tii.taxCode NOT IN ('import10', 'import21'))
GROUP BY tii.PorcentajeIva, tii.expenseFk;
GROUP BY tii.CuentaIvaRepercutido;
-- Línea iva inversor sujeto pasivo
INSERT INTO XDiario(
@ -284,7 +284,7 @@ BEGIN
AND NOT(tii.isVies
AND c.nontaxableTransactionTypeFk = tii.transactionTypeSageFk
AND tii.taxCode = 'nonTaxable')
GROUP BY tii.PorcentajeIva, tii.expenseFk;
GROUP BY tii.CuentaIvaRepercutido;
-- Actualización del registro original
UPDATE invoiceIn ii