From: pines Date: Wed, 6 Sep 2006 06:19:02 +0000 (+0000) Subject: don't use the mobts total call for styling has_bills X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8f08df952f1dc2ce87d3589e221effd87f051287;p=Evergreen.git don't use the mobts total call for styling has_bills git-svn-id: svn://svn.open-ils.org/ILS/trunk@5981 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/summary.js b/Open-ILS/xul/staff_client/server/patron/summary.js index 45d24a22b4..123a36a802 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.js +++ b/Open-ILS/xul/staff_client/server/patron/summary.js @@ -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 )); } diff --git a/Open-ILS/xul/staff_client/server/patron/util.js b/Open-ILS/xul/staff_client/server/patron/util.js index 16469b03f6..de12cfe73b 100644 --- a/Open-ILS/xul/staff_client/server/patron/util.js +++ b/Open-ILS/xul/staff_client/server/patron/util.js @@ -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');