LP#1615845 In House Uses on Item Status
[working/Evergreen.git] / Open-ILS / web / js / ui / default / staff / cat / item / app.js
index 5468daf..6e411ef 100644 (file)
@@ -90,6 +90,13 @@ function(egCore) {
             function(copy) {
 
                 var flatCopy;
+
+                egCore.pcrud.search('aihu', 
+                    {item : copy.id()}, {}, {idlist : true, atomic : true})
+                .then(function(uses) { 
+                    copy._inHouseUseCount = uses.length;
+                });
+
                 if (noListDupes) {
                     // use the existing copy if possible
                     flatCopy = service.copies.filter(