Bug 33105: (QA follow-up) Changes for Koha objects

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2023-07-07 06:57:37 +00:00 committed by Tomas Cohen Arazi
parent b1194c60da
commit 8be682c961
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 6 additions and 7 deletions

View file

@ -17,14 +17,15 @@ package Koha::Acquisition::Bookseller::Issue;
use Modern::Perl; use Modern::Perl;
use Koha::Database; use Koha::Database;
use base qw(Koha::Object); use base qw(Koha::Object);
use constant ISSUE_TYPE_CATEGORY => 'VENDOR_ISSUE_TYPE';
=head1 NAME =head1 NAME
Koha::Acquisition::Bookseller::Issue - Koha Issue Object class Koha::Acquisition::Bookseller::Issue - Koha vendor issue object class
=head1 API =head1 API
@ -40,10 +41,9 @@ sub strings_map {
my $strings = {}; my $strings = {};
if ( defined $self->type ) { if ( defined $self->type ) {
my $type_av_category = 'VENDOR_ISSUE_TYPE';
my $av = Koha::AuthorisedValues->search( my $av = Koha::AuthorisedValues->search(
{ {
category => $type_av_category, category => ISSUE_TYPE_CATEGORY,
authorised_value => $self->type, authorised_value => $self->type,
} }
); );
@ -55,7 +55,7 @@ sub strings_map {
: $self->type; : $self->type;
$strings->{type} = { $strings->{type} = {
category => 'VENDOR_ISSUE_TYPE', category => ISSUE_TYPE_CATEGORY,
str => $type_str, str => $type_str,
type => 'av', type => 'av',
}; };

View file

@ -17,7 +17,6 @@ package Koha::Acquisition::Bookseller::Issues;
use Modern::Perl; use Modern::Perl;
use Koha::Database; use Koha::Database;
use Koha::Acquisition::Bookseller::Issue; use Koha::Acquisition::Bookseller::Issue;
@ -26,7 +25,7 @@ use base qw(Koha::Objects);
=head1 NAME =head1 NAME
Koha::Acquisition::Bookseller::Issues Koha::Acquisition::Bookseller::Issues - Koha vendor issues object class
=head1 API =head1 API