From 971e636e734b57903b5293aa74aa5b409f444d53 Mon Sep 17 00:00:00 2001
From: Robert Lange <robert.lange@uni-leipzig.de>
Date: Wed, 24 May 2023 11:11:03 +0200
Subject: [PATCH] refs #23398 [finc] show only badge count for available ill
 items

---
 module/finc/src/finc/AjaxHandler/GetUserILLRequestsStats.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/finc/src/finc/AjaxHandler/GetUserILLRequestsStats.php b/module/finc/src/finc/AjaxHandler/GetUserILLRequestsStats.php
index f2bdcf292f7..e2ba17aec9d 100644
--- a/module/finc/src/finc/AjaxHandler/GetUserILLRequestsStats.php
+++ b/module/finc/src/finc/AjaxHandler/GetUserILLRequestsStats.php
@@ -57,7 +57,8 @@ class GetUserILLRequestsStats extends \VuFind\AjaxHandler\AbstractUserRequestAct
         }
         $items = $this->ils->getMyILLRequests($patron);
         $stats = [
-            'total' => count($items)
+            'total' => count($items),
+            'available' => array_sum(array_column($items, 'available'))
         ];
 
         return $this->formatResponse($stats);
-- 
GitLab