-my $branchname = GetBranchName($branchcode);
-
-# Getting the branches for user selection
-my $branches = GetBranches();
-my @branch_loop;
-for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
- my %row =(value => $thisbranch,
- branchname => $branches->{$thisbranch}->{'branchname'},
- );
- push @branch_loop, \%row;
-}
-
-
-# Set the template language for the correct limit type
-my $limit_phrase = 'Collection Code';
-my $limitType = C4::Context->preference("BranchTransferLimitsType");
-if ( $limitType eq 'itemtype' ) {
- $limit_phrase = 'Item Type';
-}
+# Set the template language for the correct limit type using $limitType
+my $limitType = C4::Context->preference("BranchTransferLimitsType") || "ccode";