hotfix-sale_getProblems-líneas-redondeo #2674
|
@ -282,8 +282,7 @@ BEGIN
|
|||
FROM (
|
||||
SELECT tl.ticketFk,
|
||||
s.id saleFk,
|
||||
LEFT(GROUP_CONCAT('RE: ',i.id, ' ', IFNULL(i.longName,''), ' '), 250) problem,
|
||||
MOD(s.quantity, b.`grouping`) hasRounding
|
||||
LEFT(GROUP_CONCAT('RE: ',i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticket t ON t.id = tl.ticketFk
|
||||
AND t.warehouseFk = vWarehouseFk
|
||||
|
@ -291,8 +290,8 @@ BEGIN
|
|||
JOIN item i ON i.id = s.itemFk
|
||||
JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
||||
JOIN buy b ON b.id = bu.buyFk
|
||||
WHERE MOD(s.quantity, b.`grouping`)
|
||||
GROUP BY tl.ticketFk
|
||||
HAVING hasRounding
|
||||
)sub
|
||||
ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk;
|
||||
END LOOP;
|
||||
|
|
Loading…
Reference in New Issue