[open-ils-commits] r19087 - branches/rel_2_0/Open-ILS/xul/staff_client/server/circ (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Dec 30 13:43:21 EST 2010


Author: phasefx
Date: 2010-12-30 13:43:18 -0500 (Thu, 30 Dec 2010)
New Revision: 19087

Modified:
   branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/checkin.js
Log:
Never do money math as anything but pennies I tell you. :-)  Three $0.60 transactions run through check-in were showing a running tally of $1.79 instead of $1.80.

Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/checkin.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/checkin.js	2010-12-30 18:42:30 UTC (rev 19086)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/circ/checkin.js	2010-12-30 18:43:18 UTC (rev 19087)
@@ -403,7 +403,10 @@
                         document.getElementById('no_change_label').setAttribute('hidden','false');
                     }
                     if (document.getElementById('fine_tally')) {
-                        var amount = Number( document.getElementById('fine_tally').getAttribute('amount') ) + Number( bill.balance_owed() );
+                        var amount = util.money.cents_as_dollars(
+                            Number( util.money.dollars_float_to_cents_integer( document.getElementById('fine_tally').getAttribute('amount') ) ) 
+                            + Number( util.money.dollars_float_to_cents_integer( bill.balance_owed() ) )
+                        );
                         document.getElementById('fine_tally').setAttribute('amount',amount);
                         document.getElementById('fine_tally').setAttribute(
                             'value',



More information about the open-ils-commits mailing list