From 13923e7b0598b09d21647558f42ca54c31abf470 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 3 Jan 2017 13:14:25 -0300 Subject: [PATCH] Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly This trivial fix corrects a typo on C4/ILSDI/Services.pm. It was hidden because the tests for ILSDI only cover the 'attributes' portion of the response. I added regression tests for this. To test: - Have the regression test patch applied - Run: $ prove t/db_dependent/ILSDI_Services.t => FAIL: Tests fail because 'charges' is always set to 1 - Apply the patch - Run: $ prove t/db_dependent/ILSDI_Services.t => SUCCESS: Tests pass - Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: Mark Tompsett Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- C4/ILSDI/Services.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 1868204a8a..b735d38791 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -376,7 +376,7 @@ sub GetPatronInfo { # Cleaning the borrower hashref my $flags = C4::Members::patronflags( $borrower ); - $borrower->{'charges'} = $flags>{'CHARGES'}->{'amount'}; + $borrower->{'charges'} = $flags->{'CHARGES'}->{'amount'}; my $library = Koha::Libraries->find( $borrower->{branchcode} ); $borrower->{'branchname'} = $library ? $library->branchname : ''; delete $borrower->{'userid'}; -- 2.39.5