handle this one specific case of bad input
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 1 Jan 2006 04:59:20 +0000 (04:59 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 1 Jan 2006 04:59:20 +0000 (04:59 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2574 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/util/money.js

index 671d2d8..6763e7a 100644 (file)
@@ -43,6 +43,7 @@ util.money.dollars_float_to_cents_integer = function( money ) {
 util.money.cents_as_dollars = function( cents ) {
        cents = cents.toString(); 
        // FIXME: strip miscellaneous characters
+       if (cents.match(/\./)) cents = util.money.dollars_float_to_cents_integer( cents );
        try {
                switch( cents.length ) {
                        case 0: cents = '000'; break;