Bug 23336: Fix inconsistent return of AddIssue

AddIssue can on occasion create a renewal instead of a fresh issue and
in such a case we currently return undefined. We should be consistent
and return the existing issue object for the renewal.

Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2022-10-03 17:07:20 +01:00 committed by Tomas Cohen Arazi
parent 6db025bd9d
commit 38139718f5
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -1546,6 +1546,7 @@ sub AddIssue {
$datedue,
$issuedate, # here interpreted as the renewal date
);
$issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } );
}
else {