don't use the mobts total call for styling has_bills
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 06:19:02 +0000 (06:19 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 06:19:02 +0000 (06:19 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5981 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 45d24a2..123a36a 100644 (file)
@@ -140,7 +140,8 @@ patron.summary.prototype = {
                                                                                for (var i = 0; i < list.length; i++) {
                                                                                        var robj = typeof list[i] == 'object' ? list[i] : obj.network.simple_request('FM_MBTS_RETRIEVE',[ses(),list[i]]);
                                                                                        sum += robj.balance_owed();
-                                                                               }
+                                                                               } 
+                                                                               if (sum > 0) addCSSClass(document.documentElement,'PATRON_HAS_BILLS');
                                                                                JSAN.use('util.money');
                                                                                e.setAttribute('value', '$' + util.money.sanitize( sum ));
                                                                        }
index 16469b0..de12cfe 100644 (file)
@@ -485,9 +485,11 @@ patron.util.set_penalty_css = function(patron) {
        try {
 
                JSAN.use('util.network'); var net = new util.network();
+               /*
                net.simple_request('FM_MOBTS_TOTAL_HAVING_BALANCE',[ ses(), patron.id() ], function(req) {
                        if (req.getResultObject() > 0) addCSSClass(document.documentElement,'PATRON_HAS_BILLS');
                });
+               */
                net.simple_request('FM_CIRC_COUNT_RETRIEVE_VIA_USER',[ ses(), patron.id() ], function(req) {
                        var co = req.getResultObject();
                        if (co.overdue > 0 || co.long_overdue > 0) addCSSClass(document.documentElement,'PATRON_HAS_OVERDUES');