From 9912f4b7130bb360fd0c0ac3b629b0cf38b73f97 Mon Sep 17 00:00:00 2001 From: amd_k8 Date: Fri, 4 Sep 2015 14:50:26 +0300 Subject: [PATCH] Issue #761 by Inlead: Consider denial of deniedRenewal a success. --- lib/AlmaClient/AlmaClient.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/AlmaClient/AlmaClient.class.php b/lib/AlmaClient/AlmaClient.class.php index 9b0a89c..d1800cb 100644 --- a/lib/AlmaClient/AlmaClient.class.php +++ b/lib/AlmaClient/AlmaClient.class.php @@ -544,7 +544,9 @@ public function renew_loan($borr_card, $pin_code, $loan_ids) { // successful. Even if this is not the case any error in the current // renewal is irrelevant as the loan has previously been renewed so // don't report it as such. - if ($message == 'isRenewedToday' || $renewable == 'yes') { + // Also renewalIsDenied marked as 'no' is considered a successful + // renewal. + if ($message == 'isRenewedToday' || $renewable == 'yes' || ($message == 'renewalIsDenied' && $renewable == 'no')) { $reservations[$id] = TRUE; } elseif ($message == 'maxNofRenewals') {