Browse Source

Bug 26987: (bug 23463 follow-up) Fix serial receipt if makePreviousSerialAvailable

$serialitem is not a Koha::Item there, we need to fetch the item before.

Test plan:
Turn makePreviousSerialAvailable on
Create a subscription
Receive an serial item, mark it "arrived"
Without this patch Koha explodes with
No property notforloan for Koha::Serial::Item at /usr/share/perl5/Exception/Class/Base.pm line 88
Koha::Object::set('Koha::Serial::Item=HASH(0x55dd67c75700)', 'HASH(0x55dd672cec30)') called at /kohadevbox/koha/serials/serials-edit.pl line 273

With this patch applied the notforloan and itype values are correctly
set for the new serial item.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
tags/v20.11.00
Jonathan Druart 7 months ago
parent
commit
dc465736cd
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      serials/serials-edit.pl

+ 2
- 1
serials/serials-edit.pl View File

@@ -267,7 +267,8 @@ if ( $op and $op eq 'serialchangestatus' ) {
my $subscriptioninfos = GetSubscription($subscriptionids[$i]);

# Changing the status to "available" and the itemtype according to the previousitemtype db field
$serialitem->set(
my $item = Koha::Items->find($itemnumber);
$item->set(
{
notforloan => 0,
itype => $subscriptioninfos->{'previousitemtype'}


Loading…
Cancel
Save