Hotfix sale_getProblems
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-07-03 17:07:25 +02:00
parent 1ec7cd9540
commit 097350adb6
1 changed files with 2 additions and 2 deletions

View File

@ -278,11 +278,11 @@ BEGIN
-- Redondeo: Cantidad pedida incorrecta en al grouping de la última compra -- Redondeo: Cantidad pedida incorrecta en al grouping de la última compra
CALL buyUltimate(vWarehouseFk, vDate); CALL buyUltimate(vWarehouseFk, vDate);
INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk) INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk)
SELECT ticketFk,problem , saleFk SELECT ticketFk, problem ,saleFk
FROM ( FROM (
SELECT tl.ticketFk, SELECT tl.ticketFk,
s.id saleFk, s.id saleFk,
LEFT(GROUP_CONCAT('RE: ',i.id, ' ', IFNULL(i.longName,''), ' '), 250) problem LEFT(GROUP_CONCAT('RE: ',i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem
FROM tmp.ticket_list tl FROM tmp.ticket_list tl
JOIN ticket t ON t.id = tl.ticketFk JOIN ticket t ON t.id = tl.ticketFk
AND t.warehouseFk = vWarehouseFk AND t.warehouseFk = vWarehouseFk