diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm
index e9ff105f75..343158cc16 100644
--- a/Koha/Template/Plugin/Branches.pm
+++ b/Koha/Template/Plugin/Branches.pm
@@ -32,7 +32,7 @@ sub GetName {
my $sth = C4::Context->dbh->prepare($query);
$sth->execute($branchcode);
my $b = $sth->fetchrow_hashref();
- return encode( 'UTF-8', $b->{'branchname'} );
+ return $b ? encode( 'UTF-8', $b->{'branchname'} ) : q{};
}
1;
diff --git a/Koha/Template/Plugin/KohaBranchName.pm b/Koha/Template/Plugin/KohaBranchName.pm
deleted file mode 100644
index 51d1a441d1..0000000000
--- a/Koha/Template/Plugin/KohaBranchName.pm
+++ /dev/null
@@ -1,33 +0,0 @@
-package Koha::Template::Plugin::KohaBranchName;
-
-# Copyright Bywater Solutions 2012
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-use Modern::Perl;
-
-use Template::Plugin::Filter;
-use base qw( Template::Plugin::Filter );
-
-use C4::Branch qw( GetBranchName );;
-
-sub filter {
- my ($self, $branchcode) = @_;
- my $name = GetBranchName( $branchcode );
- return defined($name) ? $name : '';
-}
-
-1;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt
index c7c9a1bccb..f256ec3716 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt
@@ -1,4 +1,4 @@
-[% USE KohaBranchName %]
+[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Basket grouping for [% booksellername |html %]
@@ -269,8 +269,8 @@ function submitForm(form) {
[% END %]
[% basketgroup.id %]
-
[% basketgroup.billingplace | $KohaBranchName %]
-
[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %]