Bug 20903: Remove unnecessary category code parameters
authorJosef Moravec <josef.moravec@gmail.com>
Fri, 8 Jun 2018 09:43:13 +0000 (09:43 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 24 Sep 2018 13:20:44 +0000 (15:20 +0200)
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>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5f03b21cf3a7141dc0f2ae2b1922505d55d4cd34)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e0ccc346ca6f6b758b88cd0d4f09c2e6bdb44e4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

members/printfeercpt.pl

index 8b87f73..a36ff17 100755 (executable)
@@ -57,12 +57,6 @@ if ( $action eq 'print' ) {
 #  ReversePayment( $borrowernumber, $input->param('accountno') );
 }
 
-if ( $data->{'category_type'} eq 'C') {
-    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;
-}
-
 #get account details
 my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber);
 my $totalcredit;