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 <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2019-03-25 10:49:15 +00:00 committed by Nick Clemens
parent b879e68326
commit 9acf69f7a6
1 changed files with 6 additions and 2 deletions

View File

@ -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