From 5b26e5575049738e6ce18eb7a259c64db1ff1334 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 22 Apr 2021 13:11:59 +0100 Subject: [PATCH] Bug 28181: Filter out archived debit types in point of sale The filter for only displaying un-archived debit types on the point of sale page had been missed. NOTE: It would be beneficial to move this to a default filter in the Koha:: objects search method for both debit_types and credit_types.. but I opted for the quick fix here to resolve the bug and will impliment default filtering in a subsequent enhancement bug. Test plan 1/ Archive a debit type that is marked as 'Can be sold' 2/ Go to the point of sale page and confirm the above debit type appears 3/ Apply the patch 4/ Confirm the debit type no longer appears in the point of sale page. Signed-off-by: Sally Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- pos/pay.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pos/pay.pl b/pos/pay.pl index e8bec0013d..c83405321e 100755 --- a/pos/pay.pl +++ b/pos/pay.pl @@ -51,7 +51,8 @@ my $library_id = C4::Context->userenv->{'branch'}; my $registerid = $input->param('registerid'); my $invoice_types = - Koha::Account::DebitTypes->search_with_library_limits( { can_be_sold => 1 }, + Koha::Account::DebitTypes->search_with_library_limits( + { can_be_sold => 1, archived => 0 }, {}, $library_id ); $template->param( invoice_types => $invoice_types ); -- 2.39.5