From 8be682c96108d5705e9e3ca9051fa073310e6c7d Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 7 Jul 2023 06:57:37 +0000 Subject: [PATCH] Bug 33105: (QA follow-up) Changes for Koha objects Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- Koha/Acquisition/Bookseller/Issue.pm | 10 +++++----- Koha/Acquisition/Bookseller/Issues.pm | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Koha/Acquisition/Bookseller/Issue.pm b/Koha/Acquisition/Bookseller/Issue.pm index 40e19aad6e..f4d1ecd069 100644 --- a/Koha/Acquisition/Bookseller/Issue.pm +++ b/Koha/Acquisition/Bookseller/Issue.pm @@ -17,14 +17,15 @@ package Koha::Acquisition::Bookseller::Issue; use Modern::Perl; - use Koha::Database; use base qw(Koha::Object); +use constant ISSUE_TYPE_CATEGORY => 'VENDOR_ISSUE_TYPE'; + =head1 NAME -Koha::Acquisition::Bookseller::Issue - Koha Issue Object class +Koha::Acquisition::Bookseller::Issue - Koha vendor issue object class =head1 API @@ -40,10 +41,9 @@ sub strings_map { my $strings = {}; if ( defined $self->type ) { - my $type_av_category = 'VENDOR_ISSUE_TYPE'; my $av = Koha::AuthorisedValues->search( { - category => $type_av_category, + category => ISSUE_TYPE_CATEGORY, authorised_value => $self->type, } ); @@ -55,7 +55,7 @@ sub strings_map { : $self->type; $strings->{type} = { - category => 'VENDOR_ISSUE_TYPE', + category => ISSUE_TYPE_CATEGORY, str => $type_str, type => 'av', }; diff --git a/Koha/Acquisition/Bookseller/Issues.pm b/Koha/Acquisition/Bookseller/Issues.pm index e797aba163..172ec82a8d 100644 --- a/Koha/Acquisition/Bookseller/Issues.pm +++ b/Koha/Acquisition/Bookseller/Issues.pm @@ -17,7 +17,6 @@ package Koha::Acquisition::Bookseller::Issues; use Modern::Perl; - use Koha::Database; use Koha::Acquisition::Bookseller::Issue; @@ -26,7 +25,7 @@ use base qw(Koha::Objects); =head1 NAME -Koha::Acquisition::Bookseller::Issues +Koha::Acquisition::Bookseller::Issues - Koha vendor issues object class =head1 API -- 2.39.5