diff --git a/code/web/Drivers/SirsiDynixROA.php b/code/web/Drivers/SirsiDynixROA.php index 8ae153e8951..c5c42a82f59 100644 --- a/code/web/Drivers/SirsiDynixROA.php +++ b/code/web/Drivers/SirsiDynixROA.php @@ -3952,17 +3952,31 @@ public function checkoutByAPI(User $patron, $barcode, Location $currentLocation) //Check to see if the user already has a copy of the title checked out. $includeFields = urlencode("circRecordList{*,bib{title,author}},holdRecordList{*,bib{title,author},selectedItem{call{*},itemType{*},barcode}}"); $patronHoldsAndCheckouts = $this->getWebServiceResponse('getHolds', $webServiceURL . '/user/patron/key/' . $patron->unique_ils_id . '?includeFields=' . $includeFields, null, $sessionToken); + + //First, check if item being checked out is a volume + $isVolume = false; + $lookupItemKey = $itemKey; + if (str_contains($itemKey, ':')) { + $parts = explode(':', $itemKey); + $lookupItemKey = $parts[0] . ':' . $parts[1]; + } + require_once ROOT_DIR . '/sys/ILS/IlsVolumeInfo.php'; + $volumeInfo = new IlsVolumeInfo(); + $volumeInfo->volumeId = $lookupItemKey; + if ($volumeInfo->find(true)) { + $isVolume = true; + } + if ($patronHoldsAndCheckouts && isset($patronHoldsAndCheckouts->fields)) { foreach ($patronHoldsAndCheckouts->fields->circRecordList as $checkout) { - if (str_starts_with($checkout->key, $bibKey . ':')){ - $result['message'] = translate([ - 'text' => 'A copy of this title already checked out to you, see a staff member to checkout additional copies.', - 'isPublicFacing' => true, - ]); - $result['api']['message'] = translate([ - 'text' => 'A copy of this title already checked out to you, see a staff member to checkout additional copies.', + if (str_starts_with($checkout->key, $bibKey . ':') && (!$isVolume || $checkout->fields->item->key == $itemKey)) { + $message = translate([ + 'text' => 'A copy of this title is already checked out to you, see a staff member to checkout additional copies.', 'isPublicFacing' => true, ]); + + $result['message'] = $message; + $result['api']['message'] = $message; return $result; } } diff --git a/code/web/release_notes/26.10.00/DIS-2825.yaml b/code/web/release_notes/26.10.00/DIS-2825.yaml new file mode 100644 index 00000000000..e4dbc667298 --- /dev/null +++ b/code/web/release_notes/26.10.00/DIS-2825.yaml @@ -0,0 +1,12 @@ +Jira: DIS-2825 +Type: Enhancement +Developer: Kodi Lein (KL) +Contributing Org: Grove For Libraries +Sponsor: SWAN Library Network +GroveRelease: 26.10.00 +CommunityRelease: 26.11.00 +Component: Symphony ILS +Description: + - Update Scan & Go for Symphony ILS to allow multiple volumes of a periodical to be checked out. +New Settings: +New Permissions: \ No newline at end of file