From 4fa4b8a30649381523fec729b0ee5d40f896155b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 19 Aug 2016 09:57:13 +0200 Subject: [PATCH] Bug 14390: [QA Follow-up] UpdateFine should be passed a hash Renewing an overdue would not work. Log shows: renew: Can't use string ("2144746608") as a HASH ref while "strict refs" in use at C4/Overdues.pm line 508., referer: /cgi-bin/koha/circ/circulation.pl?borrowernumber=1 Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall --- C4/Circulation.pm | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 6c957a2370..0964050a44 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -4086,15 +4086,28 @@ sub _CalculateAndUpdateFine { if ( C4::Context->preference('finesMode') eq 'production' ) { if ( $amount > 0 ) { - C4::Overdues::UpdateFine( $issue->{itemnumber}, $issue->{borrowernumber}, - $amount, $type, output_pref($datedue) ); + C4::Overdues::UpdateFine({ + issue_id => $issue->{issue_id}, + itemnumber => $issue->{itemnumber}, + borrowernumber => $issue->{borrowernumber}, + amount => $amount, + type => $type, + due => output_pref($datedue), + }); } elsif ($return_date) { # Backdated returns may have fines that shouldn't exist, # so in this case, we need to drop those fines to 0 - C4::Overdues::UpdateFine( $issue->{itemnumber}, $issue->{borrowernumber}, 0, $type, output_pref($datedue) ); + C4::Overdues::UpdateFine({ + issue_id => $issue->{issue_id}, + itemnumber => $issue->{itemnumber}, + borrowernumber => $issue->{borrowernumber}, + amount => 0, + type => $type, + due => output_pref($datedue), + }); } } } -- 2.39.5