[open-ils-commits] r19086 - trunk/Open-ILS/xul/staff_client/server/circ (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 30 13:42:34 EST 2010
Author: phasefx
Date: 2010-12-30 13:42:30 -0500 (Thu, 30 Dec 2010)
New Revision: 19086
Modified:
trunk/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: trunk/Open-ILS/xul/staff_client/server/circ/checkin.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkin.js 2010-12-30 16:31:45 UTC (rev 19085)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkin.js 2010-12-30 18:42:30 UTC (rev 19086)
@@ -423,7 +423,10 @@
addCSSClass(no_change_label,'click_link');
}
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