From 4e73f8c06e2a0b6f5ec4ca66d296ca27f3056941 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 5 Oct 2021 14:05:49 +0000 Subject: [PATCH] Bug 29177: Remove TODO in acqui/finishreceive Replacing a multiple object->column(value) by ->update. Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- acqui/finishreceive.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl index 378acf1cd2..93391e8fad 100755 --- a/acqui/finishreceive.pl +++ b/acqui/finishreceive.pl @@ -174,13 +174,14 @@ if ($quantityrec > $origquantityrec ) { my $new_order_object = Koha::Acquisition::Orders->find( $new_ordernumber ); # FIXME we should not need to refetch it my $items = $new_order_object->items; while ( my $item = $items->next ) { - $item->booksellerid($booksellerid); # TODO This should be done using ->set, but bug 21761 is not resolved - $item->dateaccessioned($datereceived); - $item->datelastseen($datereceived); - $item->price($unitprice); - $item->replacementprice($replacementprice); - $item->replacementpricedate($datereceived); - $item->store; + $item->update({ + booksellerid => $booksellerid, + dateaccessioned => $datereceived, + datelastseen => $datereceived, + price => $unitprice, + replacementprice => $replacementprice, + replacementpricedate => $datereceived, + }); } if ($suggestion_id) { -- 2.39.5