If a renewal via SIP cannot be made because the patron has reached the maximum number of renewals,
the AF screen message should read "Item has reached maximum renewals!",
instead we get "Item checked out to another patron".
Test Plan:
1) Check out an item to a patron
2) Using the SIP CLI tool, run checkout messages until the checkout has
reached the maximum number of renewals
3) Note the incorrect message in the AF field
4) Apply this patch
5) Restart the SIP server
6) Run another SIP checkout message
7) Note the message is now correct!
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
$circ->screen_msg("Invalid Item");
}
elsif ( $item->{borrowernumber}
- && !_ci_cardnumber_cmp( $item->{borrowernumber}, $patron_id ) )
+ && !_ci_cardnumber_cmp( $item->{borrowernumber}, $patron->borrowernumber ) )
{
$circ->screen_msg("Item checked out to another patron");
}
# If the item is already associated with this patron, then
# we're renewing it.
$circ->renew_ok( $item->{borrowernumber}
- && _ci_cardnumber_cmp( $item->{borrowernumber}, $patron_id ) );
+ && _ci_cardnumber_cmp( $item->{borrowernumber}, $patron->borrowernumber ) );
$item->{borrowernumber} = $patron_id;
$item->{due_date} = $circ->{due};