From 8f4f0206682d3f32d3806f373b7b1fcee7191fb7 Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 18 Jul 2006 17:55:10 +0000 Subject: [PATCH] sanity check input value git-svn-id: svn://svn.open-ils.org/ILS/trunk@5067 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/bill_wizard.xul | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul b/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul index ac239ce75c..1b4f268a88 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill_wizard.xul @@ -167,28 +167,25 @@ [ ses(), grocery ] ); } - if (xact_id) { + if (typeof xact_id.ilsevent == 'undefined') { + JSAN.use('util.money'); var billing = new mb(); billing.isnew('1'); billing.note( $('bill_note').value ); billing.xact( xact_id ); - billing.amount( $('bill_amount').value ); + billing.amount( util.money.sanitize( $('bill_amount').value ) ); billing.billing_type( $('billing_type').value ); var mb_id = g.network.request( api.FM_MB_CREATE.app, api.FM_MB_CREATE.method, [ ses(), billing ] ); - if (mb_id) { - } else { - throw('mb_id = ' + mb_id); - } + if (typeof mb_id.ilsevent != 'undefined') throw(mb_id); } else { - throw('xact_id = ' + xact_id); + throw(xact_id); } } catch(E) { - g.error.sdump('D_ERROR',js2JSON(E)); - alert(js2JSON(E)); + g.error.standard_unexpected_error_alert('bill_wizard',E); } } -- 2.11.0