From: phasefx Date: Thu, 30 Dec 2010 18:42:30 +0000 (+0000) Subject: Never do money math as anything but pennies I tell you. :-) Three $0.60 transactions... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bd1637e67627bdb679cb34558a39ac14690ff9c4;p=contrib%2FConifer.git 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. git-svn-id: svn://svn.open-ils.org/ILS/trunk@19086 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.js b/Open-ILS/xul/staff_client/server/circ/checkin.js index a766685227..9475803568 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin.js +++ b/Open-ILS/xul/staff_client/server/circ/checkin.js @@ -423,7 +423,10 @@ circ.checkin.prototype = { 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',