From d44b8f7c9a1a167b0bc5eca4241ac3367f5470cf Mon Sep 17 00:00:00 2001 From: guillermo <guillermo@verdnatura.es> Date: Tue, 30 Apr 2024 11:44:16 +0200 Subject: [PATCH] hotfix: ticket #179514 ticket_close packaging fix --- db/routines/vn/procedures/ticket_close.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index 91e0979cd9..47d748ddff 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -63,7 +63,7 @@ BEGIN INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity) (SELECT vCurTicketFk, p.id, COUNT(*) FROM expedition e - JOIN packaging p ON p.itemFk = e.freightItemFk + JOIN packaging p ON p.id = e.packagingFk WHERE e.ticketFk = vCurTicketFk AND p.isPackageReturnable AND vWithPackage GROUP BY p.itemFk);