From 435ba519544d5240848f072ed6f4e248435be548 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 25 Mar 2019 10:49:15 +0000 Subject: [PATCH] Bug 22565: Do NOT replace all internalnote's on receive Bug 21467 introduced a but whereby setting any order_internalnote on receive one would end up setting all orders to have that internalnote. This patch adds the missing WHERE clause to the database query which was likely lost during a rebase? Signed-off-by: Martin Renvoize Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens (cherry picked from commit 9acf69f7a690a78bd09af7afbb28e4b32c493903) Signed-off-by: Martin Renvoize --- C4/Acquisition.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index bbfd0c1e7b..66af0c6b67 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1455,8 +1455,12 @@ sub ModReceiveOrder { ); if ( not $order->{subscriptionid} && defined $order->{order_internalnote} ) { - $dbh->do(q|UPDATE aqorders - SET order_internalnote = ?|, {}, $order->{order_internalnote}); + $dbh->do( + q|UPDATE aqorders + SET order_internalnote = ? + WHERE ordernumber = ?|, {}, + $order->{order_internalnote}, $order->{ordernumber} + ); } # Recalculate tax_value -- 2.39.5