@@ -, +, @@ - Switch getType -> get_type - get_type now returns a type or undef - Ternary now performed in template --- Koha/Illrequest.pm | 10 +++++----- koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 6 ++++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt | 6 ++++-- t/db_dependent/Illrequests.t | 8 ++++---- 4 files changed, 17 insertions(+), 13 deletions(-) --- a/Koha/Illrequest.pm +++ a/Koha/Illrequest.pm @@ -724,18 +724,18 @@ sub getPrefix { || ""; # "the empty prefix" } -=head3 getType +=head3 get_type - my $type = $abstract->getType(); + my $type = $abstract->get_type(); -Return a string representing the material type of this request +Return a string representing the material type of this request or undef =cut -sub getType { +sub get_type { my ($self) = @_; my $attr = $self->illrequestattributes->find({ type => 'type'}); - return $attr ? $attr->value : 'N/A'; + return $attr ? $attr->value : undef; }; #### Illrequests Imports --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -412,6 +412,7 @@