From d262ac03125dd9ccd8ff5a2e88e5308bf98cd0e1 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 --- C4/Acquisition.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 4bf8c17ae7..de85953e89 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1456,8 +1456,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.11.0