From edb84c6b42414f50b99c8bfd3e4cebe6a164c0f7 Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 10 Sep 2010 20:12:47 +0000 Subject: [PATCH] minor tweaks to patron retrieval within the billing interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@17591 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/bill2.js | 7 ++++--- Open-ILS/xul/staff_client/server/patron/bill_details.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index d31f882a9..c91e5cc0d 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -95,7 +95,7 @@ function event_listeners() { function(ev) { if ($('payment_type').value == 'credit_payment') { JSAN.use('util.money'); - JSAN.use('patron.util'); g.patron = patron.util.retrieve_au_via_id(ses(),g.patron_id); + JSAN.use('patron.util'); g.patron = patron.util.retrieve_fleshed_au_via_id(ses(),g.patron_id,null); var proposed = util.money.dollars_float_to_cents_integer(ev.target.value); var available = util.money.dollars_float_to_cents_integer(g.patron.credit_forward_balance()); if (proposed > available) { @@ -647,8 +647,9 @@ function print_bills() { try { var template = 'bills_historical'; if (xul_param('current')) template = 'bills_current'; JSAN.use('patron.util'); + g.patron = patron.util.retrieve_fleshed_au_via_id(ses(),g.patron_id,null); var params = { - 'patron' : patron.util.retrieve_fleshed_au_via_id(ses(),g.patron_id,null), + 'patron' : g.patron, 'printer_context' : 'receipt', 'template' : template }; @@ -899,7 +900,7 @@ function void_all_billings(mobts_id) { function refresh_patron() { JSAN.use('patron.util'); JSAN.use('util.money'); - patron.util.retrieve_au_via_id(ses(),g.patron_id, function(req) { + patron.util.retrieve_fleshed_au_via_id(ses(),g.patron_id,null,function(req) { var au_obj = req.getResultObject(); if (typeof au_obj.ilsevent == 'undefined') { g.patron = au_obj; diff --git a/Open-ILS/xul/staff_client/server/patron/bill_details.js b/Open-ILS/xul/staff_client/server/patron/bill_details.js index 05c2c6e29..8ad14be4b 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_details.js +++ b/Open-ILS/xul/staff_client/server/patron/bill_details.js @@ -5,7 +5,7 @@ function retrieve_patron() { if (g.patron_id) { JSAN.use('patron.util'); - g.au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), g.patron_id ); + g.au_obj = patron.util.retrieve_fleshed_au_via_id( ses(), g.patron_id, null ); $('patron_name').setAttribute('value', patron.util.format_name( g.au_obj ) + ' : ' + g.au_obj.card().barcode() -- 2.11.0