ticket #167473 Hotfix
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-03-21 11:30:10 +01:00
parent 1cd495df06
commit d0067c8096
1 changed files with 2 additions and 7 deletions

View File

@ -23,7 +23,7 @@ BEGIN
ENGINE = MEMORY
SELECT Id_Ticket
FROM vn2008.Tickets t
JOIN vn.invoiceOut io ON io.id = t.Factura
JOIN vn.invoiceOut io ON io.`ref` = t.Factura
WHERE year(io.issued) = vYear
AND month(io.issued) = vMonth;
@ -47,12 +47,7 @@ BEGIN
, tp.reino_id
, a.tipo_id
, t.empresa_id
, a.expenseFk
+ IF(e.empresa_grupo = e2.empresa_grupo
,1
,IF(e2.empresa_grupo,2,0)
) * 100000
+ tp.reino_id * 1000 as Gasto
, a.expenseFk gasto
FROM vn2008.Movimientos m
JOIN vn2008.Tickets t on t.Id_Ticket = m.Id_Ticket
JOIN vn2008.Consignatarios cs on cs.Id_Consigna = t.Id_Consigna