From: senator Date: Wed, 11 May 2011 21:45:58 +0000 (-0400) Subject: support paying all fines at once X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3bb3ef7ff4f86893c49fee9a2cd021b31f2b4384;p=evergreen%2Fequinox.git 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 85e9dfa433..282299a347 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -611,7 +611,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 587c01b13b..a70b684375 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; %]