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 <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-04-22 13:11:59 +01:00 committed by Jonathan Druart
parent a197a09feb
commit 5b26e55750
1 changed files with 2 additions and 1 deletions

View File

@ -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 );