From 69668c4a198fb266056b68ef3a2824c4bc3bdfad Mon Sep 17 00:00:00 2001 From: senator Date: Wed, 11 May 2011 17:45:58 -0400 Subject: [PATCH] support paying all fines at once --- .../lib/OpenILS/WWW/EGCatLoader/Account.pm | 2 +- .../default/opac/myopac/main_payment_form.tt2 | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 171fa39..a4fa51f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -612,7 +612,7 @@ sub load_fines { { usr => $self->editor->requestor->id, balance_owed => {'!=' => 0}, - (ref $id_list eq 'ARRAY' ? ("id" => $id_list) : ()), + ($id_list && @$id_list ? ("id" => $id_list) : ()), }, { flesh => 4, diff --git a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 index 587c01b..a70b684 100644 --- a/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/main_payment_form.tt2 @@ -26,7 +26,8 @@ [% pay_total = 0.0; FOR f IN ctx.fines.circulation; - NEXT UNLESS CGI.param('xact').grep(f.xact.id).size; + NEXT IF CGI.param('xact').size && + !CGI.param('xact').grep(f.xact.id).size; attrs = {marc_xml => f.marc_xml}; IF f.marc_xml; PROCESS get_marc_attrs args=attrs; @@ -42,7 +43,8 @@ [% END; FOR f IN ctx.fines.grocery; - NEXT UNLESS CGI.param('xact').grep(f.xact.id).size; + NEXT IF CGI.param('xact').size && + !CGI.param('xact').grep(f.xact.id).size; # XXX use fixed point math pay_total = pay_total + f.xact.balance_owed; %] -- 1.7.2.5