webstaff: Respect items-out tally settings
authorMike Rylander <mrylander@gmail.com>
Wed, 11 Mar 2015 19:58:41 +0000 (15:58 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 19 Aug 2015 17:39:12 +0000 (13:39 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/web/js/ui/default/staff/circ/patron/app.js

index f80486f..aeea4ed 100644 (file)
@@ -22,6 +22,8 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap',
         // specific settings from within their respective controllers
         egCore.env.classLoaders.aous = function() {
             return egCore.org.settings([
+                'circ.do_not_tally_claims_returned',
+                'circ.tally_lost',
                 'circ.obscure_dob',
                 'ui.circ.show_billing_tab_on_bills',
                 'circ.patron_expires_soon_warning',
@@ -483,6 +485,13 @@ function($q , $timeout , $location , egCore,  egUser , $locale) {
                 stats.checkouts.out = Number(stats.checkouts.out);
                 stats.checkouts.total_out = 
                     stats.checkouts.out + stats.checkouts.overdue;
+
+                if (!egCore.env.aous['circ.do_not_tally_claims_returned'])
+                    stats.checkouts.total_out += stats.checkouts.claims_returned;
+
+                if (egCore.env.aous['circ.tally_lost'])
+                    stats.checkouts.total_out += stats.checkouts.lost
+
                 return stats;
             }
         );