users with no transaction history will have no xact summary; protect
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Sep 2010 13:36:11 +0000 (13:36 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Sep 2010 13:36:11 +0000 (13:36 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17467 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/util.js

index 805818f..bc5a6d0 100644 (file)
@@ -650,7 +650,8 @@ patron.util.set_penalty_css = function(patron) {
 
         JSAN.use('util.network'); var net = new util.network();
         net.simple_request('FM_MOUS_RETRIEVE.authoritative',[ ses(), patron.id() ], function(req) {
-            if (req.getResultObject().balance_owed() > 0) addCSSClass(document.documentElement,'PATRON_HAS_BILLS');
+            var summary = req.getResultObject();
+            if (summary && summary.balance_owed() > 0) addCSSClass(document.documentElement,'PATRON_HAS_BILLS');
         });
         net.simple_request('FM_CIRC_COUNT_RETRIEVE_VIA_USER.authoritative',[ ses(), patron.id() ], function(req) {
             try {