From b1e75043b6f60ae8ed98d5a0f802dc1adf236d97 Mon Sep 17 00:00:00 2001 From: pines Date: Mon, 11 Sep 2006 02:53:41 +0000 Subject: [PATCH] penny math git-svn-id: svn://svn.open-ils.org/ILS/trunk@6051 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/summary.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/summary.js b/Open-ILS/xul/staff_client/server/patron/summary.js index 123a36a802..0bcb0ae9c1 100644 --- a/Open-ILS/xul/staff_client/server/patron/summary.js +++ b/Open-ILS/xul/staff_client/server/patron/summary.js @@ -131,6 +131,7 @@ patron.summary.prototype = { 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE', [ ses(), obj.patron.id() ], function(req) { + JSAN.use('util.money'); var list = req.getResultObject(); if (typeof list.ilsevent != 'undefined') { e.setAttribute('value', '??? See Bills'); @@ -139,11 +140,11 @@ patron.summary.prototype = { var sum = 0; 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(); + sum += util.money.dollars_float_to_cents_integer( robj.balance_owed() ); } if (sum > 0) addCSSClass(document.documentElement,'PATRON_HAS_BILLS'); JSAN.use('util.money'); - e.setAttribute('value', '$' + util.money.sanitize( sum )); + e.setAttribute('value', '$' + util.money.sanitize( util.money.cents_as_dollars( sum ) )); } ); }; -- 2.43.2