Bug 29177: Remove TODO in acqui/finishreceive

Replacing a multiple object->column(value) by ->update.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marcel de Rooy 2021-10-05 14:05:49 +00:00 committed by Jonathan Druart
parent 283b6b0c06
commit 4e73f8c06e

View file

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