diff --git a/code/web/Drivers/SirsiDynixROA.php b/code/web/Drivers/SirsiDynixROA.php index 3822c338b9..a147274a21 100644 --- a/code/web/Drivers/SirsiDynixROA.php +++ b/code/web/Drivers/SirsiDynixROA.php @@ -1231,12 +1231,12 @@ public function getHolds($patron): array { $curHold->expirationDate = strtotime($expireDate); $curHold->automaticCancellationDate = strtotime($fillByDate); $curHold->reactivateDate = strtotime($reactivateDate); - $curHold->cancelable = strcasecmp($curHold->status, 'Suspended') != 0 && strcasecmp($curHold->status, 'Expired') != 0 && strcasecmp($curHold->status, 'INSHIPPING') != 0 && strcasecmp($curHold->status, 'ILL WYLD') != 0; + $curHold->cancelable = !in_array(strtoupper($curHold->status), ['SUSPENDED', 'EXPIRED', 'INSHIPPING', 'INTRANSIT', 'ILL_WYLD', 'ILLSHIPPED']); $curHold->frozen = strcasecmp($curHold->status, 'Suspended') == 0; $curHold->canFreeze = true; $curHold->locationUpdateable = true; - if (in_array(strtoupper($curHold->status), ['TRANSIT', 'EXPIRED', 'INSHIPPING', 'ILL WYLD', 'ILLPENDING'])) { + if (in_array(strtoupper($curHold->status), ['TRANSIT', 'EXPIRED', 'INSHIPPING', 'ILL WYLD', 'ILLPENDING', 'ILLSHIPPED'])) { $curHold->locationUpdateable = false; $curHold->canFreeze = false; } diff --git a/code/web/RecordDrivers/MarcRecordDriver.php b/code/web/RecordDrivers/MarcRecordDriver.php index 1e3a7f5b8a..5f7ce00d59 100644 --- a/code/web/RecordDrivers/MarcRecordDriver.php +++ b/code/web/RecordDrivers/MarcRecordDriver.php @@ -1149,9 +1149,6 @@ public function getRecordActions($relatedRecord, $variationId, $isAvailable, $is //Check to see if all items require a request $allVolumesRequireIll = true; if ($interLibraryLoanType !== 'none') { - if (count($itemsWithoutVolumes) > 0 && !$itemsWithoutVolumesNeedIllRequest) { - $allVolumesRequireIll = false; - } foreach ($holdableVolumes as $volumeInfo) { if (!$volumeInfo['needsIllRequest']) { $allVolumesRequireIll = false; @@ -1161,8 +1158,22 @@ public function getRecordActions($relatedRecord, $variationId, $isAvailable, $is $allVolumesRequireIll = false; } if ($allVolumesRequireIll) { - //The button will show a message to the patron no volumes can be requested - $this->_actions[$variationId][] = getNoVolumesCanBeRequestedAction($this->getModule(), $source, $id); + if (count($itemsWithoutVolumes) > 0) { + //Check to see if a title level request is possible and if so show a request or hold button as appropriate + if ($itemsWithoutVolumesNeedIllRequest) { + if ($interLibraryLoanType == 'vdx') { + //VDX does not support volumes, we'll just prompt for a regular VDX + $this->_actions[$variationId][] = getVdxRequestAction($this->getModule(), $source, $id); + } elseif ($interLibraryLoanType == 'localIll') { + $this->_actions[$variationId][] = getLocalIllRequestAction($this->getModule(), $source, $id); + } + }else{ + $this->_actions[$variationId][] = getHoldRequestAction($this->getModule(), $source, $id, $variationId); + } + } else { + //The button will show a message to the patron no volumes can be requested + $this->_actions[$variationId][] = getNoVolumesCanBeRequestedAction($this->getModule(), $source, $id); + } }else{ //We will need to show a popup to select the volume $interface->assign('itemsWithoutVolumesNeedIllRequest', $itemsWithoutVolumesNeedIllRequest); diff --git a/code/web/interface/themes/responsive/MyAccount/myPreferences.tpl b/code/web/interface/themes/responsive/MyAccount/myPreferences.tpl index 8172ca4958..5f5252d3d7 100644 --- a/code/web/interface/themes/responsive/MyAccount/myPreferences.tpl +++ b/code/web/interface/themes/responsive/MyAccount/myPreferences.tpl @@ -155,7 +155,7 @@