When you wan't to print a payment receipt for child patron and have only one adult patron category defined, it ends up with internal server error.
Created attachment 75915 [details] [review] Bug 20903: Remove unnecessary category code parameters Test plan: 0) Do no apply the patch 1) Have only one adults patrons category defined 2) Add a fine to child patron and pay it 3) Try to print the payment receipt (file printfeercpt.pl) 4) You see only ISE 5) Apply the patch 6) Try the printing again 7) Now you should see right receipt
Comment on attachment 75915 [details] [review] Bug 20903: Remove unnecessary category code parameters Review of attachment 75915 [details] [review]: ----------------------------------------------------------------- ::: members/printfeercpt.pl @@ -60,5 @@ > > -if ( $patron->is_child ) { > - my $patron_categories = Koha::Patron::Categories->search_limited({ category_type => 'A' }, {order_by => ['categorycode']}); > - $template->param( 'CATCODE_MULTI' => 1) if $patron_categories->count > 1; > - $template->param( 'catcode' => $patron_categories->next->categorycde ) if $patron_categories->count == 1; This is the code which causes problem ('categorycde' instead of 'categorycode'). But as this code is not needed, I removed whole block of code.
Raising severity as this generates ISE.
Created attachment 76424 [details] [review] Bug 20903: Remove unnecessary category code parameters Test plan: 0) Do no apply the patch 1) Have only one adults patrons category defined 2) Add a fine to child patron and pay it 3) Try to print the payment receipt (file printfeercpt.pl) 4) You see only ISE 5) Apply the patch 6) Try the printing again 7) Now you should see right receipt Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 76454 [details] [review] Bug 20903: Remove unnecessary category code parameters Test plan: 0) Do no apply the patch 1) Have only one adults patrons category defined 2) Add a fine to child patron and pay it 3) Try to print the payment receipt (file printfeercpt.pl) 4) You see only ISE 5) Apply the patch 6) Try the printing again 7) Now you should see right receipt Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Caused by commit 585453fe20417779be84258b60d3d652d8e170e1 Bug 19921: Fix update child when only one adult patron category exist
Awesome work all! Pushed to master for 18.11
Pushed to 18.05.x for 18.05.02
Pushed to 17.11.x for 17.11.08
Pushed to 17.05.x for 17.05.14