From: senator Date: Wed, 11 May 2011 21:45:58 +0000 (-0400) Subject: support paying all fines at once X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=69668c4a198fb266056b68ef3a2824c4bc3bdfad support paying all fines at once --- 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; %]