From 6997276e514a940439906ed986bd4c93d1286083 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 24 Nov 2014 10:18:50 -0500 Subject: [PATCH] Bug 13330 - All overdue items with fines returned via checkouts table will have fines forgiven! Due to a disconnect between how booleans are handled in Perl vs JSON, all checkins done from the checkouts table will have fines forgiven! This is because the parameters sent to svc/checkin are coded in JSON and the JSON false is treated in Perl as the string 'false' which evaluates to true! Test Plan: 1) Find a patron with an overdue item that has a fine 2) Return the item via the checkouts table on circulation.pl or moremember.pl 3) Note the fine is forgiven 4) Apply this patch 5) Repeat steps 1-2 6) Note the fine is no longer forgiven Signed-off-by: Liz Rea Verified bug, fix corrects the problem. Signed-off-by: Katrin Fischer Also tested waiving fines form the check-in page still works. Passes tests and QA script. Signed-off-by: Tomas Cohen Arazi --- svc/checkin | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/svc/checkin b/svc/checkin index 2ca539c371..c10a1b84fa 100755 --- a/svc/checkin +++ b/svc/checkin @@ -47,6 +47,10 @@ my $exempt_fine = $input->param('exempt_fine'); my $branchcode = $input->param('branchcode') || C4::Context->userenv->{'branch'}; +# Expect these inputs to come in as JSON boolean values +$override_limit = $override_limit ? $override_limit eq 'true' : undef; +$exempt_fine = $exempt_fine ? $exempt_fine eq 'true' : undef; + my $barcode = GetBarcodeFromItemnumber($itemnumber); my $data; -- 2.39.5