View | Details | Raw Unified | Return to bug 15758
Collapse All | Expand All

(-)a/C4/Acquisition.pm (-6 / +14 lines)
Lines 302-310 sub GetBasketAsCSV { Link Here
302
            notes => $order->{'order_vendornote'},
302
            notes => $order->{'order_vendornote'},
303
            quantity => $order->{'quantity'},
303
            quantity => $order->{'quantity'},
304
            rrp => $order->{'rrp'},
304
            rrp => $order->{'rrp'},
305
            deliveryplace => C4::Branch::GetBranchName( $basket->{'deliveryplace'} ),
306
            billingplace => C4::Branch::GetBranchName( $basket->{'billingplace'} ),
307
        };
305
        };
306
        for my $place ( qw( deliveryplace billingplace ) ) {
307
            if ( my $library = Koha::Libraries->find( $row->{deliveryplace} ) ) {
308
                $row->{$place} = $library->branchname
309
            }
310
        }
308
        foreach(qw(
311
        foreach(qw(
309
            contractname author title publishercode collectiontitle notes
312
            contractname author title publishercode collectiontitle notes
310
            deliveryplace billingplace
313
            deliveryplace billingplace
Lines 375-385 sub GetBasketGroupAsCSV { Link Here
375
                booksellerpostal => $bookseller->{postal},
378
                booksellerpostal => $bookseller->{postal},
376
                contractnumber => $contract->{contractnumber},
379
                contractnumber => $contract->{contractnumber},
377
                contractname => $contract->{contractname},
380
                contractname => $contract->{contractname},
378
                basketgroupdeliveryplace => C4::Branch::GetBranchName( $basketgroup->{deliveryplace} ),
381
                basketgroupdeliveryplace => $basketgroup->{deliveryplace},
379
                basketgroupbillingplace => C4::Branch::GetBranchName( $basketgroup->{billingplace} ),
382
                basketgroupbillingplace  => $basketgroup->{billingplace},
380
                basketdeliveryplace => C4::Branch::GetBranchName( $basket->{deliveryplace} ),
383
                basketdeliveryplace      => $basket->{deliveryplace},
381
                basketbillingplace => C4::Branch::GetBranchName( $basket->{billingplace} ),
384
                basketbillingplace       => $basket->{billingplace},
382
            };
385
            };
386
            for my $place (qw( basketgroupdeliveryplace basketgroupbillingplace basketdeliveryplace basketbillingplace )) {
387
                if ( my $library = Koha::Libraries->find( $row->{deliveryplace} ) ) {
388
                    $row->{$place} = $library->branchname;
389
                }
390
            }
383
            foreach(qw(
391
            foreach(qw(
384
                basketname author title publishercode collectiontitle notes
392
                basketname author title publishercode collectiontitle notes
385
                booksellername bookselleraddress booksellerpostal contractname
393
                booksellername bookselleraddress booksellerpostal contractname
(-)a/C4/Auth.pm (-2 / +3 lines)
Lines 33-38 use C4::Branch; # GetBranches Link Here
33
use C4::Search::History;
33
use C4::Search::History;
34
use Koha;
34
use Koha;
35
use Koha::AuthUtils qw(hash_password);
35
use Koha::AuthUtils qw(hash_password);
36
use Koha::Libraries;
36
use Koha::LibraryCategories;
37
use Koha::LibraryCategories;
37
use Koha::Libraries;
38
use Koha::Libraries;
38
use POSIX qw/strftime/;
39
use POSIX qw/strftime/;
Lines 1076-1082 sub checkauth { Link Here
1076
                    # if they specify at login, use that
1077
                    # if they specify at login, use that
1077
                    if ( $query->param('branch') ) {
1078
                    if ( $query->param('branch') ) {
1078
                        $branchcode = $query->param('branch');
1079
                        $branchcode = $query->param('branch');
1079
                        $branchname = GetBranchName($branchcode);
1080
                        $branchname = Koha::Libraries->find($branchcode)->branchname;
1080
                    }
1081
                    }
1081
                    my $branches = GetBranches();
1082
                    my $branches = GetBranches();
1082
                    if ( C4::Context->boolean_preference('IndependentBranches') && C4::Context->boolean_preference('Autolocation') ) {
1083
                    if ( C4::Context->boolean_preference('IndependentBranches') && C4::Context->boolean_preference('Autolocation') ) {
Lines 1528-1534 sub check_api_auth { Link Here
1528
                # if they specify at login, use that
1529
                # if they specify at login, use that
1529
                if ( $query->param('branch') ) {
1530
                if ( $query->param('branch') ) {
1530
                    $branchcode = $query->param('branch');
1531
                    $branchcode = $query->param('branch');
1531
                    $branchname = GetBranchName($branchcode);
1532
                    $branchname = Koha::Libraries->find($branchcode)->branchname;
1532
                }
1533
                }
1533
                my $branches = GetBranches();
1534
                my $branches = GetBranches();
1534
                my @branchesloop;
1535
                my @branchesloop;
(-)a/C4/Biblio.pm (-1 / +2 lines)
Lines 43-48 use Koha::Cache; Link Here
43
use Koha::Authority::Types;
43
use Koha::Authority::Types;
44
use Koha::Acquisition::Currencies;
44
use Koha::Acquisition::Currencies;
45
use Koha::SearchEngine;
45
use Koha::SearchEngine;
46
use Koha::Libraries;
46
47
47
use vars qw(@ISA @EXPORT);
48
use vars qw(@ISA @EXPORT);
48
use vars qw($debug $cgi_debug);
49
use vars qw($debug $cgi_debug);
Lines 1679-1685 sub GetAuthorisedValueDesc { Link Here
1679
1680
1680
        #---- branch
1681
        #---- branch
1681
        if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
1682
        if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
1682
            return C4::Branch::GetBranchName($value);
1683
            return Koha::Libraries->find($value)->branchname;
1683
        }
1684
        }
1684
1685
1685
        #---- itemtypes
1686
        #---- itemtypes
(-)a/C4/Branch.pm (-15 lines)
Lines 27-33 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); Link Here
27
BEGIN {
27
BEGIN {
28
	@ISA    = qw(Exporter);
28
	@ISA    = qw(Exporter);
29
	@EXPORT = qw(
29
	@EXPORT = qw(
30
		&GetBranchName
31
		&GetBranch
30
		&GetBranch
32
		&GetBranches
31
		&GetBranches
33
		&GetBranchesLoop
32
		&GetBranchesLoop
Lines 152-171 sub GetBranchesLoop { # since this is what most pages want anyway Link Here
152
    return \@loop;
151
    return \@loop;
153
}
152
}
154
153
155
=head2 GetBranchName
156
157
=cut
158
159
sub GetBranchName {
160
    my ($branchcode) = @_;
161
    my $dbh = C4::Context->dbh;
162
    my $sth;
163
    $sth = $dbh->prepare("Select branchname from branches where branchcode=?");
164
    $sth->execute($branchcode);
165
    my $branchname = $sth->fetchrow_array;
166
    return ($branchname);
167
}
168
169
=head2 GetBranch
154
=head2 GetBranch
170
155
171
$branch = GetBranch( $query, $branches );
156
$branch = GetBranch( $query, $branches );
(-)a/C4/Circulation.pm (-4 / +3 lines)
Lines 1001-1007 sub CanBookBeIssued { Link Here
1001
                $issuingimpossible{ITEMNOTSAMEBRANCH} = 1;
1001
                $issuingimpossible{ITEMNOTSAMEBRANCH} = 1;
1002
                $issuingimpossible{'itemhomebranch'} = $item->{C4::Context->preference("HomeOrHoldingBranch")};
1002
                $issuingimpossible{'itemhomebranch'} = $item->{C4::Context->preference("HomeOrHoldingBranch")};
1003
            }
1003
            }
1004
            $needsconfirmation{BORRNOTSAMEBRANCH} = GetBranchName( $borrower->{'branchcode'} )
1004
            $needsconfirmation{BORRNOTSAMEBRANCH} = $borrower->{'branchcode'}
1005
              if ( $borrower->{'branchcode'} ne $userenv->{branch} );
1005
              if ( $borrower->{'branchcode'} ne $userenv->{branch} );
1006
        }
1006
        }
1007
    }
1007
    }
Lines 1068-1074 sub CanBookBeIssued { Link Here
1068
            my $resbor = $res->{'borrowernumber'};
1068
            my $resbor = $res->{'borrowernumber'};
1069
            if ( $resbor ne $borrower->{'borrowernumber'} ) {
1069
            if ( $resbor ne $borrower->{'borrowernumber'} ) {
1070
                my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor );
1070
                my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor );
1071
                my $branchname = GetBranchName( $res->{'branchcode'} );
1072
                if ( $restype eq "Waiting" )
1071
                if ( $restype eq "Waiting" )
1073
                {
1072
                {
1074
                    # The item is on reserve and waiting, but has been
1073
                    # The item is on reserve and waiting, but has been
Lines 1078-1084 sub CanBookBeIssued { Link Here
1078
                    $needsconfirmation{'ressurname'} = $resborrower->{'surname'};
1077
                    $needsconfirmation{'ressurname'} = $resborrower->{'surname'};
1079
                    $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'};
1078
                    $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'};
1080
                    $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'};
1079
                    $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'};
1081
                    $needsconfirmation{'resbranchname'} = $branchname;
1080
                    $needsconfirmation{'resbranchcode'} = $res->{branchcode};
1082
                    $needsconfirmation{'reswaitingdate'} = $res->{'waitingdate'};
1081
                    $needsconfirmation{'reswaitingdate'} = $res->{'waitingdate'};
1083
                }
1082
                }
1084
                elsif ( $restype eq "Reserved" ) {
1083
                elsif ( $restype eq "Reserved" ) {
Lines 1088-1094 sub CanBookBeIssued { Link Here
1088
                    $needsconfirmation{'ressurname'} = $resborrower->{'surname'};
1087
                    $needsconfirmation{'ressurname'} = $resborrower->{'surname'};
1089
                    $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'};
1088
                    $needsconfirmation{'rescardnumber'} = $resborrower->{'cardnumber'};
1090
                    $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'};
1089
                    $needsconfirmation{'resborrowernumber'} = $resborrower->{'borrowernumber'};
1091
                    $needsconfirmation{'resbranchname'} = $branchname;
1090
                    $needsconfirmation{'resbranchcode'} = $res->{branchcode};
1092
                    $needsconfirmation{'resreservedate'} = $res->{'reservedate'};
1091
                    $needsconfirmation{'resreservedate'} = $res->{'reservedate'};
1093
                }
1092
                }
1094
            }
1093
            }
(-)a/C4/ILSDI/Services.pm (-7 / +16 lines)
Lines 36-41 use DateTime; Link Here
36
use C4::Auth;
36
use C4::Auth;
37
use C4::Members::Attributes qw(GetBorrowerAttributes);
37
use C4::Members::Attributes qw(GetBorrowerAttributes);
38
38
39
use Koha::Libraries;
40
39
=head1 NAME
41
=head1 NAME
40
42
41
C4::ILS-DI::Services - ILS-DI Services
43
C4::ILS-DI::Services - ILS-DI Services
Lines 220-227 sub GetRecords { Link Here
220
            delete $item->{'more_subfields_xml'};
222
            delete $item->{'more_subfields_xml'};
221
223
222
            # Display branch names instead of branch codes
224
            # Display branch names instead of branch codes
223
            $item->{'homebranchname'}    = GetBranchName( $item->{'homebranch'} );
225
            my $home_library    = Koha::Libraries->find( $item->{homebranch} );
224
            $item->{'holdingbranchname'} = GetBranchName( $item->{'holdingbranch'} );
226
            my $holding_library = Koha::Libraries->find( $item->{holdingbranch} );
227
            $item->{'homebranchname'}    = $home_library    ? $home_library->branchname    : '';
228
            $item->{'holdingbranchname'} = $holding_library ? $holding_library->branchname : '';
225
        }
229
        }
226
230
227
        # Hashref building...
231
        # Hashref building...
Lines 364-370 sub GetPatronInfo { Link Here
364
368
365
    # Cleaning the borrower hashref
369
    # Cleaning the borrower hashref
366
    $borrower->{'charges'}    = $borrower->{'flags'}->{'CHARGES'}->{'amount'};
370
    $borrower->{'charges'}    = $borrower->{'flags'}->{'CHARGES'}->{'amount'};
367
    $borrower->{'branchname'} = GetBranchName( $borrower->{'branchcode'} );
371
    my $library = Koha::Libraries->find( $borrower->{branchcode} );
372
    $borrower->{'branchname'} = $library ? $library->branchname : '';
368
    delete $borrower->{'flags'};
373
    delete $borrower->{'flags'};
369
    delete $borrower->{'userid'};
374
    delete $borrower->{'userid'};
370
    delete $borrower->{'password'};
375
    delete $borrower->{'password'};
Lines 404-410 sub GetPatronInfo { Link Here
404
409
405
            # Get additional informations
410
            # Get additional informations
406
            my $item = GetBiblioFromItemNumber( $reserve->{'itemnumber'}, undef );
411
            my $item = GetBiblioFromItemNumber( $reserve->{'itemnumber'}, undef );
407
            my $branchname = GetBranchName( $reserve->{'branchcode'} );
412
            my $library = Koha::Libraries->find( $reserve->{branchcode} );
413
            my $branchname = $library ? $library->branchname : '';
408
414
409
            # Remove unwanted fields
415
            # Remove unwanted fields
410
            delete $item->{'marc'};
416
            delete $item->{'marc'};
Lines 638-644 sub HoldTitle { Link Here
638
    # Hashref building
644
    # Hashref building
639
    my $out;
645
    my $out;
640
    $out->{'title'}           = $title;
646
    $out->{'title'}           = $title;
641
    $out->{'pickup_location'} = GetBranchName($branch);
647
    my $library = Koha::Libraries->find( $branch );
648
    $out->{'pickup_location'} = $library ? $library->branchname : '';
642
649
643
    # TODO $out->{'date_available'}  = '';
650
    # TODO $out->{'date_available'}  = '';
644
651
Lines 714-720 sub HoldItem { Link Here
714
721
715
    # Hashref building
722
    # Hashref building
716
    my $out;
723
    my $out;
717
    $out->{'pickup_location'} = GetBranchName($branch);
724
    my $library = Koha::Libraries->find( $branch );
725
    $out->{'pickup_location'} = $library ? $library->branchname : '';
718
726
719
    # TODO $out->{'date_available'} = '';
727
    # TODO $out->{'date_available'} = '';
720
728
Lines 770-776 sub _availability { Link Here
770
    }
778
    }
771
779
772
    my $biblionumber = $item->{'biblioitemnumber'};
780
    my $biblionumber = $item->{'biblioitemnumber'};
773
    my $location     = GetBranchName( $item->{'holdingbranch'} );
781
    my $library = Koha::Libraries->find( $item->{holdingbranch} );
782
    my $location = $library ? $library->branchname : '';
774
783
775
    if ( $item->{'notforloan'} ) {
784
    if ( $item->{'notforloan'} ) {
776
        return ( $biblionumber, 'not available', 'Not for loan', $location );
785
        return ( $biblionumber, 'not available', 'Not for loan', $location );
(-)a/C4/Items.pm (-8 / +5 lines)
Lines 40-45 use Koha::Database; Link Here
40
use Koha::Database;
40
use Koha::Database;
41
use Koha::SearchEngine;
41
use Koha::SearchEngine;
42
use Koha::SearchEngine::Search;
42
use Koha::SearchEngine::Search;
43
use Koha::Libraries;
43
44
44
use vars qw(@ISA @EXPORT);
45
use vars qw(@ISA @EXPORT);
45
46
Lines 753-772 sub CheckItemPreSave { Link Here
753
754
754
    # check for valid home branch
755
    # check for valid home branch
755
    if (exists $item_ref->{'homebranch'} and defined $item_ref->{'homebranch'}) {
756
    if (exists $item_ref->{'homebranch'} and defined $item_ref->{'homebranch'}) {
756
        my $branch_name = C4::Branch::GetBranchName($item_ref->{'homebranch'});
757
        my $home_library = Koha::Libraries->find( $item_ref->{homebranch} );
757
        unless (defined $branch_name) {
758
        unless (defined $home_library) {
758
            # relies on fact that branches.branchname is a non-NULL column,
759
            # so GetBranchName returns undef only if branch does not exist
760
            $errors{'invalid_homebranch'} = $item_ref->{'homebranch'};
759
            $errors{'invalid_homebranch'} = $item_ref->{'homebranch'};
761
        }
760
        }
762
    }
761
    }
763
762
764
    # check for valid holding branch
763
    # check for valid holding branch
765
    if (exists $item_ref->{'holdingbranch'} and defined $item_ref->{'holdingbranch'}) {
764
    if (exists $item_ref->{'holdingbranch'} and defined $item_ref->{'holdingbranch'}) {
766
        my $branch_name = C4::Branch::GetBranchName($item_ref->{'holdingbranch'});
765
        my $holding_library = Koha::Libraries->find( $item_ref->{holdingbranch} );
767
        unless (defined $branch_name) {
766
        unless (defined $holding_library) {
768
            # relies on fact that branches.branchname is a non-NULL column,
769
            # so GetBranchName returns undef only if branch does not exist
770
            $errors{'invalid_holdingbranch'} = $item_ref->{'holdingbranch'};
767
            $errors{'invalid_holdingbranch'} = $item_ref->{'holdingbranch'};
771
        }
768
        }
772
    }
769
    }
(-)a/C4/Labels/Label.pm (-3 / +4 lines)
Lines 97-105 sub _get_label_item { Link Here
97
    $data->{'itype'} = $data1->{'description'};
97
    $data->{'itype'} = $data1->{'description'};
98
    # add *_description fields
98
    # add *_description fields
99
    if ($data->{'homebranch'} || $data->{'holdingbranch'}){
99
    if ($data->{'homebranch'} || $data->{'holdingbranch'}){
100
        require C4::Branch;
100
        require Koha::Libraries;
101
        $data->{'homebranch_description'} = C4::Branch::GetBranchName($data->{'homebranch'}) if $data->{'homebranch'};
101
        # FIXME Is this used??
102
        $data->{'holdingbranch_description'} = C4::Branch::GetBranchName($data->{'holdingbranch'}) if $data->{'holdingbranch'};
102
        $data->{'homebranch_description'} = Koha::Libraries->find($data->{'homebranch'})->branchname if $data->{'homebranch'};
103
        $data->{'holdingbranch_description'} = Koha::Libraries->find($data->{'holdingbranch'})->branchname if $data->{'holdingbranch'};
103
    }
104
    }
104
    $data->{'ccode_description'} = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'ccode'} ,'','','CCODE', 1) if $data->{'ccode'};
105
    $data->{'ccode_description'} = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'ccode'} ,'','','CCODE', 1) if $data->{'ccode'};
105
    $data->{'location_description'} = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'location'} ,'','','LOC', 1) if $data->{'location'};
106
    $data->{'location_description'} = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'location'} ,'','','LOC', 1) if $data->{'location'};
(-)a/C4/SIP/ILS/Patron.pm (-2 / +3 lines)
Lines 20-29 use C4::Context; Link Here
20
use C4::Koha;
20
use C4::Koha;
21
use C4::Members;
21
use C4::Members;
22
use C4::Reserves;
22
use C4::Reserves;
23
use C4::Branch qw(GetBranchName);
24
use C4::Items qw( GetBarcodeFromItemnumber GetItemnumbersForBiblio);
23
use C4::Items qw( GetBarcodeFromItemnumber GetItemnumbersForBiblio);
25
use C4::Auth qw(checkpw);
24
use C4::Auth qw(checkpw);
26
25
26
use Koha::Libraries;
27
27
28
our $kp;    # koha patron
28
our $kp;    # koha patron
29
29
Lines 392-398 sub holds_blocked_by_excessive_fees { Link Here
392
sub library_name {
392
sub library_name {
393
    my $self = shift;
393
    my $self = shift;
394
    unless ($self->{library_name}) {
394
    unless ($self->{library_name}) {
395
        $self->{library_name} = GetBranchName($self->{branchcode});
395
        my $library = Koha::Libraries->find( $self->{branchcode} );
396
        $self->{library_name} = $library ? $library->branchname : '';
396
    }
397
    }
397
    return $self->{library_name};
398
    return $self->{library_name};
398
}
399
}
(-)a/C4/Search.pm (-3 / +4 lines)
Lines 22-27 use C4::Context; Link Here
22
use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
22
use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
23
use C4::Koha;      # getFacets
23
use C4::Koha;      # getFacets
24
use Koha::DateUtils;
24
use Koha::DateUtils;
25
use Koha::Libraries;
25
use Lingua::Stem;
26
use Lingua::Stem;
26
use C4::Search::PazPar2;
27
use C4::Search::PazPar2;
27
use XML::Simple;
28
use XML::Simple;
Lines 1709-1717 sub buildQuery { Link Here
1709
            $limit_cgi  .= "&limit=" . uri_escape_utf8($this_limit);
1710
            $limit_cgi  .= "&limit=" . uri_escape_utf8($this_limit);
1710
            if ($this_limit =~ /^branch:(.+)/) {
1711
            if ($this_limit =~ /^branch:(.+)/) {
1711
                my $branchcode = $1;
1712
                my $branchcode = $1;
1712
                my $branchname = GetBranchName($branchcode);
1713
                my $library = Koha::Libraries->find( $branchcode );
1713
                if (defined $branchname) {
1714
                if (defined $library) {
1714
                    $limit_desc .= " branch:$branchname";
1715
                    $limit_desc .= " branch:" . $library->branchname;
1715
                } else {
1716
                } else {
1716
                    $limit_desc .= " $this_limit";
1717
                    $limit_desc .= " $this_limit";
1717
                }
1718
                }
(-)a/acqui/acqui-home.pl (-7 lines)
Lines 51-59 my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( Link Here
51
    }
51
    }
52
);
52
);
53
53
54
my $user = GetMember( 'borrowernumber' => $loggedinuser );
55
my $branchname = GetBranchName($user->{branchcode});
56
57
my $status           = $query->param('status') || "ASKED";
54
my $status           = $query->param('status') || "ASKED";
58
my $suggestions_count       = CountSuggestion($status);
55
my $suggestions_count       = CountSuggestion($status);
59
56
Lines 74-82 my @budget_loop; Link Here
74
foreach my $budget ( @{$budget_arr} ) {
71
foreach my $budget ( @{$budget_arr} ) {
75
    next unless (CanUserUseBudget($loggedinuser, $budget, $userflags));
72
    next unless (CanUserUseBudget($loggedinuser, $budget, $userflags));
76
73
77
    $budget->{'budget_branchname'} =
78
      GetBranchName( $budget->{'budget_branchcode'} );
79
80
    my $member = GetMember( borrowernumber => $budget->{budget_owner_id} );
74
    my $member = GetMember( borrowernumber => $budget->{budget_owner_id} );
81
    if ($member) {
75
    if ($member) {
82
        $budget->{budget_owner_firstname} = $member->{'firstname'};
76
        $budget->{budget_owner_firstname} = $member->{'firstname'};
Lines 117-123 foreach my $budget ( @{$budget_arr} ) { Link Here
117
$template->param(
111
$template->param(
118
    type          => 'intranet',
112
    type          => 'intranet',
119
    loop_budget   => \@budget_loop,
113
    loop_budget   => \@budget_loop,
120
    branchname    => $branchname,
121
    total         => $total,
114
    total         => $total,
122
    totspent      => $totspent,
115
    totspent      => $totspent,
123
    totordered    => $totordered,
116
    totordered    => $totordered,
(-)a/acqui/basket.pl (-5 / +3 lines)
Lines 348-355 elsif ( $op eq 'ediorder' ) { Link Here
348
348
349
    if ($basket->{basketgroupid}){
349
    if ($basket->{basketgroupid}){
350
        $basketgroup = GetBasketgroup($basket->{basketgroupid});
350
        $basketgroup = GetBasketgroup($basket->{basketgroupid});
351
        $basketgroup->{deliveryplacename} = C4::Branch::GetBranchName( $basketgroup->{deliveryplace} );
352
        $basketgroup->{billingplacename} = C4::Branch::GetBranchName( $basketgroup->{billingplace} );
353
    }
351
    }
354
    my $borrower= GetMember('borrowernumber' => $loggedinuser);
352
    my $borrower= GetMember('borrowernumber' => $loggedinuser);
355
    my $budgets = GetBudgetHierarchy;
353
    my $budgets = GetBudgetHierarchy;
Lines 368-374 elsif ( $op eq 'ediorder' ) { Link Here
368
        basketno             => $basketno,
366
        basketno             => $basketno,
369
        basket               => $basket,
367
        basket               => $basket,
370
        basketname           => $basket->{'basketname'},
368
        basketname           => $basket->{'basketname'},
371
        basketbranchname     => C4::Branch::GetBranchName($basket->{branch}),
369
        basketbranchcode     => $basket->{branch},
372
        basketnote           => $basket->{note},
370
        basketnote           => $basket->{note},
373
        basketbooksellernote => $basket->{booksellernote},
371
        basketbooksellernote => $basket->{booksellernote},
374
        basketcontractno     => $basket->{contractnumber},
372
        basketcontractno     => $basket->{contractnumber},
Lines 382-389 elsif ( $op eq 'ediorder' ) { Link Here
382
        closedate            => $basket->{closedate},
380
        closedate            => $basket->{closedate},
383
        estimateddeliverydate=> $estimateddeliverydate,
381
        estimateddeliverydate=> $estimateddeliverydate,
384
        is_standing          => $basket->{is_standing},
382
        is_standing          => $basket->{is_standing},
385
        deliveryplace        => C4::Branch::GetBranchName( $basket->{deliveryplace} ),
383
        deliveryplace        => $basket->{deliveryplace},
386
        billingplace         => C4::Branch::GetBranchName( $basket->{billingplace} ),
384
        billingplace         => $basket->{billingplace},
387
        active               => $bookseller->{'active'},
385
        active               => $bookseller->{'active'},
388
        booksellerid         => $bookseller->{'id'},
386
        booksellerid         => $bookseller->{'id'},
389
        name                 => $bookseller->{'name'},
387
        name                 => $bookseller->{'name'},
(-)a/acqui/orderreceive.pl (-6 lines)
Lines 129-140 if ($AcqCreateItem eq 'receiving') { Link Here
129
    my @items;
129
    my @items;
130
    foreach (@itemnumbers) {
130
    foreach (@itemnumbers) {
131
        my $item = GetItem($_);
131
        my $item = GetItem($_);
132
        if($item->{homebranch}) {
133
            $item->{homebranchname} = GetBranchName($item->{homebranch});
134
        }
135
        if($item->{holdingbranch}) {
136
            $item->{holdingbranchname} = GetBranchName($item->{holdingbranch});
137
        }
138
        if(my $code = GetAuthValCode("items.notforloan", $fw)) {
132
        if(my $code = GetAuthValCode("items.notforloan", $fw)) {
139
            $item->{notforloan} = GetKohaAuthorisedValueLib($code, $item->{notforloan});
133
            $item->{notforloan} = GetKohaAuthorisedValueLib($code, $item->{notforloan});
140
        }
134
        }
(-)a/acqui/pdfformat/layout3pages.pm (-6 / +6 lines)
Lines 29-36 use strict; Link Here
29
use warnings;
29
use warnings;
30
use utf8;
30
use utf8;
31
31
32
use C4::Branch qw(GetBranchName);
33
34
use Koha::Number::Price;
32
use Koha::Number::Price;
35
use Koha::DateUtils;
33
use Koha::DateUtils;
36
use Koha::Libraries;
34
use Koha::Libraries;
Lines 63-69 sub printorders { Link Here
63
    my $number = 3;
61
    my $number = 3;
64
    for my $basket (@$baskets){
62
    for my $basket (@$baskets){
65
        my $page = $pdf->page();
63
        my $page = $pdf->page();
66
        
64
        my $billing_library = Koha::Libraries->find( $basket->{billingplace} );
65
        my $delivery_library = Koha::Libraries->find( $basket->{deliveryplace} );
66
67
        # print basket header (box)
67
        # print basket header (box)
68
        my $box = $page->gfx;
68
        my $box = $page->gfx;
69
        $box->rectxy(($width - 10)/mm, ($height - 5)/mm, 10/mm, ($height - 25)/mm);
69
        $box->rectxy(($width - 10)/mm, ($height - 5)/mm, 10/mm, ($height - 25)/mm);
Lines 78-86 sub printorders { Link Here
78
        $text->text("Order no. ".$basketgroup->{'id'}.". Basket no. ".$basket->{basketno}.". ".$basket->{booksellernote});
78
        $text->text("Order no. ".$basketgroup->{'id'}.". Basket no. ".$basket->{basketno}.". ".$basket->{booksellernote});
79
        $text->translate(20/mm,  ($height-20)/mm);
79
        $text->translate(20/mm,  ($height-20)/mm);
80
        $text->font( $pdf->corefont("Times", -encoding => "utf8"), 4/mm );
80
        $text->font( $pdf->corefont("Times", -encoding => "utf8"), 4/mm );
81
        $text->text( ( $basket->{billingplace} ? "Billing at " . C4::Branch::GetBranchName( $basket->{billingplace} ) : "" )
81
        $text->text( ( $billing_library ? "Billing at " . $billing_library->branchname : "" )
82
            . ( $basket->{billingplace} and $basket->{deliveryplace} ? " and " : "" )
82
            . ( $billing_library and $delivery_library ? " and " : "" )
83
            . ( $basket->{deliveryplace} ? "delivery at " . C4::Branch::GetBranchName( $basket->{deliveryplace}) : "" )
83
            . ( $delivery_library ? "delivery at " . $delivery_library->branchname : "" )
84
        );
84
        );
85
85
86
        my $pdftable = new PDF::Table();
86
        my $pdftable = new PDF::Table();
(-)a/acqui/pdfformat/layout3pagesfr.pm (-5 / +5 lines)
Lines 28-35 use strict; Link Here
28
use warnings;
28
use warnings;
29
use utf8;
29
use utf8;
30
30
31
use C4::Branch qw(GetBranchName);
32
33
use Koha::Number::Price;
31
use Koha::Number::Price;
34
use Koha::DateUtils;
32
use Koha::DateUtils;
35
use Koha::Libraries;
33
use Koha::Libraries;
Lines 62-67 sub printorders { Link Here
62
    my $number = 3;
60
    my $number = 3;
63
    for my $basket (@$baskets){
61
    for my $basket (@$baskets){
64
        my $page = $pdf->page();
62
        my $page = $pdf->page();
63
        my $billing_library = Koha::Libraries->find( $basket->{billingplace} );
64
        my $delivery_library = Koha::Libraries->find( $basket->{deliveryplace} );
65
65
66
        # print basket header (box)
66
        # print basket header (box)
67
        my $box = $page->gfx;
67
        my $box = $page->gfx;
Lines 77-85 sub printorders { Link Here
77
        $text->text("Commande N°".$basketgroup->{'id'}.". Panier N° ".$basket->{basketno}.". ".$basket->{booksellernote});
77
        $text->text("Commande N°".$basketgroup->{'id'}.". Panier N° ".$basket->{basketno}.". ".$basket->{booksellernote});
78
        $text->translate(20/mm,  ($height-20)/mm);
78
        $text->translate(20/mm,  ($height-20)/mm);
79
        $text->font( $pdf->corefont("Times", -encoding => "utf8"), 4/mm );
79
        $text->font( $pdf->corefont("Times", -encoding => "utf8"), 4/mm );
80
        $text->text( ( $basket->{billingplace} ? "Facturation à " . C4::Branch::GetBranchName( $basket->{billingplace} ) : "" )
80
        $text->text( ( $billing_library ? "Facturation à " . $billing_library->branchname : "" )
81
            . ( $basket->{billingplace} and $basket->{deliveryplace} ? " et " : "" )
81
            . ( $billing_library and $delivery_library ? " et " : "" )
82
            . ( $basket->{deliveryplace} ? "livraison à " . C4::Branch::GetBranchName( $basket->{deliveryplace}) : "" )
82
            . ( $delivery_library ? "livraison à " . $delivery_library->branchname : "" )
83
        );
83
        );
84
84
85
        my $pdftable = new PDF::Table();
85
        my $pdftable = new PDF::Table();
(-)a/admin/branch_transfer_limits.pl (-4 lines)
Lines 50-57 else Link Here
50
	$branchcode = $input->param('branchcode');
50
	$branchcode = $input->param('branchcode');
51
}
51
}
52
52
53
my $branchname = GetBranchName($branchcode);
54
55
# Getting the branches for user selection
53
# Getting the branches for user selection
56
my $branches = GetBranches();
54
my $branches = GetBranches();
57
my @branch_loop;
55
my @branch_loop;
Lines 124-130 foreach my $code ( @codes ) { Link Here
124
		$row_data{ code }         = $code;
122
		$row_data{ code }         = $code;
125
		$row_data{ toBranch }     = $toBranch;
123
		$row_data{ toBranch }     = $toBranch;
126
		$row_data{ isChecked }    = $isChecked;	
124
		$row_data{ isChecked }    = $isChecked;	
127
		$row_data{ toBranchname } = GetBranchName($toBranch);	
128
		push( @to_branch_loop, \%row_data );
125
		push( @to_branch_loop, \%row_data );
129
	}
126
	}
130
127
Lines 138-144 $template->param( Link Here
138
		branch_loop => \@branch_loop,
135
		branch_loop => \@branch_loop,
139
		branchcode_loop => \@branchcode_loop,
136
		branchcode_loop => \@branchcode_loop,
140
		branchcode => $branchcode,
137
		branchcode => $branchcode,
141
		branchname => $branchname,
142
        limitType => $limitType,
138
        limitType => $limitType,
143
		);
139
		);
144
140
(-)a/admin/clone-rules.pl (-3 / +1 lines)
Lines 33-39 use C4::Output; Link Here
33
use C4::Auth;
33
use C4::Auth;
34
use C4::Koha;
34
use C4::Koha;
35
use C4::Debug;
35
use C4::Debug;
36
use C4::Branch; # GetBranches
36
use C4::Branch; # GetBranchesLoop
37
37
38
my $input = new CGI;
38
my $input = new CGI;
39
my $dbh = C4::Context->dbh;
39
my $dbh = C4::Context->dbh;
Lines 52-60 my $tobranch = $input->param("tobranch"); Link Here
52
my $branchloop = GetBranchesLoop;
52
my $branchloop = GetBranchesLoop;
53
53
54
$template->param(frombranch     => $frombranch)                if ($frombranch);
54
$template->param(frombranch     => $frombranch)                if ($frombranch);
55
$template->param(frombranchname => GetBranchName($frombranch)) if ($frombranch);
56
$template->param(tobranch       => $tobranch)                  if ($tobranch);
55
$template->param(tobranch       => $tobranch)                  if ($tobranch);
57
$template->param(tobranchname   => GetBranchName($tobranch))   if ($tobranch);
58
56
59
$template->param(branchloop => $branchloop);
57
$template->param(branchloop => $branchloop);
60
58
(-)a/catalogue/detail.pl (-1 lines)
Lines 159-165 foreach my $subscription (@subscriptions) { Link Here
159
    $cell{missinglist}       = $subscription->{missinglist};
159
    $cell{missinglist}       = $subscription->{missinglist};
160
    $cell{librariannote}     = $subscription->{librariannote};
160
    $cell{librariannote}     = $subscription->{librariannote};
161
    $cell{branchcode}        = $subscription->{branchcode};
161
    $cell{branchcode}        = $subscription->{branchcode};
162
    $cell{branchname}        = GetBranchName($subscription->{branchcode});
163
    $cell{hasalert}          = $subscription->{hasalert};
162
    $cell{hasalert}          = $subscription->{hasalert};
164
    $cell{callnumber}        = $subscription->{callnumber};
163
    $cell{callnumber}        = $subscription->{callnumber};
165
    $cell{closed}            = $subscription->{closed};
164
    $cell{closed}            = $subscription->{closed};
(-)a/catalogue/getitem-ajax.pl (-3 / +3 lines)
Lines 23-32 use JSON; Link Here
23
23
24
use C4::Auth;
24
use C4::Auth;
25
use C4::Biblio;
25
use C4::Biblio;
26
use C4::Branch;
27
use C4::Items;
26
use C4::Items;
28
use C4::Koha;
27
use C4::Koha;
29
use C4::Output;
28
use C4::Output;
29
use Koha::Libraries;
30
30
31
my $cgi = new CGI;
31
my $cgi = new CGI;
32
32
Lines 46-56 if($itemnumber) { Link Here
46
    $item = GetItem($itemnumber);
46
    $item = GetItem($itemnumber);
47
47
48
    if($item->{homebranch}) {
48
    if($item->{homebranch}) {
49
        $item->{homebranchname} = GetBranchName($item->{homebranch});
49
        $item->{homebranchname} = Koha::Libraries->find($item->{homebranch})->branchname;
50
    }
50
    }
51
51
52
    if($item->{holdingbranch}) {
52
    if($item->{holdingbranch}) {
53
        $item->{holdingbranchname} = GetBranchName($item->{holdingbranch});
53
        $item->{holdingbranchname} = Koha::Libraries->find($item->{holdingbranch})->branchname;
54
    }
54
    }
55
55
56
    if(my $code = GetAuthValCode("items.notforloan", $fw)) {
56
    if(my $code = GetAuthValCode("items.notforloan", $fw)) {
(-)a/catalogue/moredetail.pl (-2 lines)
Lines 176-183 foreach my $item (@items){ Link Here
176
                $item->{'nomod'}=1;
176
                $item->{'nomod'}=1;
177
        }
177
        }
178
    }
178
    }
179
    $item->{'homebranchname'} = GetBranchName($item->{'homebranch'});
180
    $item->{'holdingbranchname'} = GetBranchName($item->{'holdingbranch'});
181
    if ($item->{'datedue'}) {
179
    if ($item->{'datedue'}) {
182
        $item->{'issue'}= 1;
180
        $item->{'issue'}= 1;
183
    } else {
181
    } else {
(-)a/circ/branchoverdues.pl (-1 / +1 lines)
Lines 125-131 foreach my $num (@getoverdues) { Link Here
125
    $overdueforbranch{'borrowerfirstname'} = $num->{'firstname'};
125
    $overdueforbranch{'borrowerfirstname'} = $num->{'firstname'};
126
    $overdueforbranch{'borrowerphone'}     = $num->{'phone'};
126
    $overdueforbranch{'borrowerphone'}     = $num->{'phone'};
127
    $overdueforbranch{'borroweremail'}     = $num->{'email'};
127
    $overdueforbranch{'borroweremail'}     = $num->{'email'};
128
    $overdueforbranch{'homebranch'}        = GetBranchName($num->{'homebranch'});
128
    $overdueforbranch{'homebranch'}        = $num->{'homebranch'};
129
    $overdueforbranch{'itemcallnumber'}    = $num->{'itemcallnumber'};
129
    $overdueforbranch{'itemcallnumber'}    = $num->{'itemcallnumber'};
130
    $overdueforbranch{'borrowernumber'}    = $num->{'borrowernumber'};
130
    $overdueforbranch{'borrowernumber'}    = $num->{'borrowernumber'};
131
    $overdueforbranch{'itemnumber'}        = $num->{'itemnumber'};
131
    $overdueforbranch{'itemnumber'}        = $num->{'itemnumber'};
(-)a/circ/circulation.pl (-1 lines)
Lines 628-634 $template->param( Link Here
628
    borrowernumber    => $borrowernumber,
628
    borrowernumber    => $borrowernumber,
629
    categoryname      => $borrower->{'description'},
629
    categoryname      => $borrower->{'description'},
630
    branch            => $branch,
630
    branch            => $branch,
631
    branchname        => GetBranchName($borrower->{'branchcode'}),
632
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
631
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
633
    expiry            => $borrower->{'dateexpiry'},
632
    expiry            => $borrower->{'dateexpiry'},
634
    roadtype          => $roadtype,
633
    roadtype          => $roadtype,
(-)a/circ/returns.pl (-3 / +1 lines)
Lines 45-51 use C4::Biblio; Link Here
45
use C4::Items;
45
use C4::Items;
46
use C4::Members;
46
use C4::Members;
47
use C4::Members::Messaging;
47
use C4::Members::Messaging;
48
use C4::Branch; # GetBranches GetBranchName
48
use C4::Branch; # GetBranches
49
use C4::Koha;   # FIXME : is it still useful ?
49
use C4::Koha;   # FIXME : is it still useful ?
50
use C4::RotatingCollections;
50
use C4::RotatingCollections;
51
use Koha::DateUtils;
51
use Koha::DateUtils;
Lines 172-178 if ( $query->param('resbarcode') ) { Link Here
172
            itemnumber     => $iteminfo->{'itemnumber'},
172
            itemnumber     => $iteminfo->{'itemnumber'},
173
            itembiblionumber => $iteminfo->{'biblionumber'},
173
            itembiblionumber => $iteminfo->{'biblionumber'},
174
            iteminfo       => $iteminfo->{'author'},
174
            iteminfo       => $iteminfo->{'author'},
175
            tobranchname   => GetBranchName($messages->{'transfert'}),
176
            name           => $name,
175
            name           => $name,
177
            borrowernumber => $borrowernumber,
176
            borrowernumber => $borrowernumber,
178
            borcnum        => $borr->{'cardnumber'},
177
            borcnum        => $borr->{'cardnumber'},
Lines 649-655 if ( $itemnumber ) { Link Here
649
        if ( ! ( $holdingBranch eq $collectionBranch ) ) {
648
        if ( ! ( $holdingBranch eq $collectionBranch ) ) {
650
            $template->param(
649
            $template->param(
651
              collectionItemNeedsTransferred => 1,
650
              collectionItemNeedsTransferred => 1,
652
              collectionBranchName => GetBranchName($collectionBranch),
653
              collectionBranch => $collectionBranch,
651
              collectionBranch => $collectionBranch,
654
              itemnumber => $itemnumber,
652
              itemnumber => $itemnumber,
655
            );
653
            );
(-)a/circ/selectbranchprinter.pl (-1 / +3 lines)
Lines 28-33 use C4::Print; # GetPrinters Link Here
28
use C4::Koha;
28
use C4::Koha;
29
use C4::Branch; # GetBranches GetBranchesLoop
29
use C4::Branch; # GetBranches GetBranchesLoop
30
30
31
use Koha::Libraries;
32
31
# this will be the script that chooses branch and printer settings....
33
# this will be the script that chooses branch and printer settings....
32
34
33
my $query = CGI->new();
35
my $query = CGI->new();
Lines 58-64 my @updated; Link Here
58
# $session lddines here are doing the updating
60
# $session lddines here are doing the updating
59
if ($branch and $branches->{$branch}) {
61
if ($branch and $branches->{$branch}) {
60
    if (! $userenv_branch or $userenv_branch ne $branch ) {
62
    if (! $userenv_branch or $userenv_branch ne $branch ) {
61
        my $branchname = GetBranchName($branch);
63
        my $branchname = Koha::Libraries->find($branch)->branchname;
62
        $template->param(LoginBranchname => $branchname);   # update template for new branch
64
        $template->param(LoginBranchname => $branchname);   # update template for new branch
63
        $template->param(LoginBranchcode => $branch);       # update template for new branch
65
        $template->param(LoginBranchcode => $branch);       # update template for new branch
64
        $session->param('branchname', $branchname);         # update sesssion in DB
66
        $session->param('branchname', $branchname);         # update sesssion in DB
(-)a/circ/waitingreserves.pl (-3 / +1 lines)
Lines 23-29 use warnings; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output;
26
use C4::Branch; # GetBranchName
27
use C4::Auth;
26
use C4::Auth;
28
use C4::Circulation;
27
use C4::Circulation;
29
use C4::Members;
28
use C4::Members;
Lines 119-125 foreach my $num (@getreserves) { Link Here
119
    $getreserv{'subtitle'}       = GetRecordValue('subtitle', GetMarcBiblio($gettitle->{'biblionumber'}), GetFrameworkCode($gettitle->{'biblionumber'}));
118
    $getreserv{'subtitle'}       = GetRecordValue('subtitle', GetMarcBiblio($gettitle->{'biblionumber'}), GetFrameworkCode($gettitle->{'biblionumber'}));
120
    $getreserv{'biblionumber'}   = $gettitle->{'biblionumber'};
119
    $getreserv{'biblionumber'}   = $gettitle->{'biblionumber'};
121
    $getreserv{'barcode'}        = $gettitle->{'barcode'};
120
    $getreserv{'barcode'}        = $gettitle->{'barcode'};
122
    $getreserv{'branchname'}     = GetBranchName($gettitle->{'homebranch'});
123
    $getreserv{'homebranch'}     = $gettitle->{'homebranch'};
121
    $getreserv{'homebranch'}     = $gettitle->{'homebranch'};
124
    $getreserv{'holdingbranch'}  = $gettitle->{'holdingbranch'};
122
    $getreserv{'holdingbranch'}  = $gettitle->{'holdingbranch'};
125
    $getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
123
    $getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
Lines 194-200 sub cancel { Link Here
194
        my $iteminfo = GetBiblioFromItemNumber($item);
192
        my $iteminfo = GetBiblioFromItemNumber($item);
195
        if ( $messages->{'transfert'} ) {
193
        if ( $messages->{'transfert'} ) {
196
            $res{messagetransfert} = $messages->{'transfert'};
194
            $res{messagetransfert} = $messages->{'transfert'};
197
            $res{branchname}       = GetBranchName($messages->{'transfert'});
195
            $res{branchcode}       = $messages->{'transfert'};
198
        }
196
        }
199
197
200
        $res{message}             = 1;
198
        $res{message}             = 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (-1 / +1 lines)
Lines 59-65 Link Here
59
        [% END %]
59
        [% END %]
60
    [% END %][% END %]
60
    [% END %][% END %]
61
    <li class="patroncategory">Category: [% categoryname %] ([% categorycode %])</li>
61
    <li class="patroncategory">Category: [% categoryname %] ([% categorycode %])</li>
62
    <li class="patronlibrary">Home library: [% IF ( branchname ) %][% branchname %][% ELSE %][% branch %][% END %]</li>
62
    <li class="patronlibrary">Home library: [% Branches.GetName( branchcode ) %]</li>
63
</ul></div>
63
</ul></div>
64
<div id="menu">
64
<div id="menu">
65
<ul>
65
<ul>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-2 / +3 lines)
Lines 1-4 Link Here
1
[% USE Price %]
1
[% USE Price %]
2
[% USE Branches %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions</title>
4
<title>Koha &rsaquo; Acquisitions</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 136-142 $(document).ready(function() { Link Here
136
137
137
[% IF ( loop_budget ) %]
138
[% IF ( loop_budget ) %]
138
139
139
            <h3>All available funds[% IF ( branchname ) %] for [% branchname %][% END %]</h3>
140
            <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname %][% END %]</h3>
140
141
141
    <div id="BudgetsAndFunds">
142
    <div id="BudgetsAndFunds">
142
    <table id="accounts">
143
    <table id="accounts">
Lines 196-202 $(document).ready(function() { Link Here
196
                        &nbsp;
197
                        &nbsp;
197
                    [% END %]
198
                    [% END %]
198
                </td>
199
                </td>
199
                <td>[% loop_budge.budget_branchname %]</td>
200
                <td>[% Branches.GetName( loop_budge.budget_branchcode ) %]</td>
200
                <td class="data">
201
                <td class="data">
201
                    [% IF loop_budge.budget_parent_id %]
202
                    [% IF loop_budge.budget_parent_id %]
202
                        [% loop_budge.budget_amount | $Price %]
203
                        [% loop_budge.budget_amount | $Price %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-6 / +7 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Branches %]
2
[% USE Price %]
3
[% USE Price %]
3
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
4
5
Lines 301-308 Link Here
301
                [% IF ( basketcontractno ) %]
302
                [% IF ( basketcontractno ) %]
302
                    <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
303
                    <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
303
                [% END %]
304
                [% END %]
304
                [% IF ( deliveryplace ) %]<li><span class="label">Delivery place:</span> [% deliveryplace %]</li>[% END %]
305
                [% IF deliveryplace %]<li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) %]</li>[% END %]
305
                [% IF ( billingplace ) %]<li><span class="label">Billing place:</span> [% billingplace %]</li>[% END %]
306
                [% IF billingplace %]<li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) %]</li>[% END %]
306
                [% IF ( authorisedbyname ) %]<li><span class="label">Created by:</span>  [% authorisedbyname %]</li>[% END %]
307
                [% IF ( authorisedbyname ) %]<li><span class="label">Created by:</span>  [% authorisedbyname %]</li>[% END %]
307
                <li id="managedby">
308
                <li id="managedby">
308
                    <form action="" method="post">
309
                    <form action="" method="post">
Lines 326-333 Link Here
326
                </li>
327
                </li>
327
                <li id="branch">
328
                <li id="branch">
328
                    <span class="label">Library:</span>
329
                    <span class="label">Library:</span>
329
                    [% IF basketbranchname %]
330
                    [% IF basketbranchcode %]
330
                        [% basketbranchname %]
331
                        [% Branches.GetName( basketbranchcode ) %]
331
                    [% ELSE %]
332
                    [% ELSE %]
332
                        No library
333
                        No library
333
                    [% END %]
334
                    [% END %]
Lines 403-410 Link Here
403
                            <input type="submit" value="Change basket group" />
404
                            <input type="submit" value="Change basket group" />
404
                          [% END %]
405
                          [% END %]
405
                        </li>
406
                        </li>
406
                    [% IF ( basketgroup.deliveryplacename ) %]<li><span class="label">Basket group delivery placename:</span> [% basketgroup.deliveryplacename %]</li>[% END %]
407
                    [% IF basketgroup.deliveryplace %]<li><span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) %]</li>[% END %]
407
                    [% IF ( basketgroup.billingplacename ) %]<li><span class="label">Basket group billing place:</span> [% basketgroup.billingplacename %]</li>[% END %]
408
                    [% IF basketgroup.billingplace %]<li><span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) %]</li>[% END %]
408
                        </ol>
409
                        </ol>
409
                    [% IF ( CAN_user_acquisition_group_manage ) %]
410
                    [% IF ( CAN_user_acquisition_group_manage ) %]
410
                    </form>
411
                    </form>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt (-2 / +3 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Branches %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Receipt summary for : [% name %] [% IF ( invoice ) %]invoice, [% invoice %][% END %]</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Receipt summary for : [% name %] [% IF ( invoice ) %]invoice, [% invoice %][% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 238-245 Link Here
238
                                <td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber %]" /></td>
239
                                <td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber %]" /></td>
239
                                <td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber %],[% item.itemnumber %]);">Edit</a></td>
240
                                <td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber %],[% item.itemnumber %]);">Edit</a></td>
240
                                <td>[% item.barcode %]</td>
241
                                <td>[% item.barcode %]</td>
241
                                <td>[% item.homebranchname %]</td>
242
                                <td>[% Branches.GetName( item.homebranch )%]</td>
242
                                <td>[% item.holdingbranchname %]</td>
243
                                <td>[% Branches.GetName( item.holdingbranch ) %]</td>
243
                                <td>[% item.notforloan %]</td>
244
                                <td>[% item.notforloan %]</td>
244
                                <td>[% item.restricted %]</td>
245
                                <td>[% item.restricted %]</td>
245
                                <td>[% item.location %]</td>
246
                                <td>[% item.location %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branch_transfer_limits.tt (-2 / +3 lines)
Lines 1-3 Link Here
1
[% USE Branches %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Library checkin and transfer policy</title>
3
<title>Koha &rsaquo; Administration &rsaquo; Library checkin and transfer policy</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 54-60 Link Here
54
     <div id="yui-main">
55
     <div id="yui-main">
55
    <div class="yui-b">
56
    <div class="yui-b">
56
57
57
<h1>Library [% branchcode %] - [% branchname %] Checkin and transfer policy</h1>
58
<h1>Library [% branchcode %] - [% Branches.GetName( branchcode ) %] Checkin and transfer policy</h1>
58
    <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
59
    <form method="get" action="/cgi-bin/koha/admin/branch_transfer_limits.pl" id="selectlibrary">
59
        <label for="branchselect">Select a library :</label>
60
        <label for="branchselect">Select a library :</label>
60
            <select name="branchcode" id="branchselect">
61
            <select name="branchcode" id="branchselect">
Lines 95-101 Link Here
95
			<tbody>
96
			<tbody>
96
					[% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
97
					[% FOREACH to_branch_loo IN codes_loo.to_branch_loop %]
97
                        <tr>
98
                        <tr>
98
							<td><label style="min-width:400px;" for="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row">[% to_branch_loo.toBranch %] - [% to_branch_loo.toBranchname %]</label></td>
99
                            <td><label style="min-width:400px;" for="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row">[% to_branch_loo.toBranch %] - [% Branches.GetName( to_branch_loo.toBranch ) %]</label></td>
99
							<td>
100
							<td>
100
							[% IF ( to_branch_loo.isChecked ) %]
101
							[% IF ( to_branch_loo.isChecked ) %]
101
								<input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" checked="checked" />
102
								<input type="checkbox" id="[% to_branch_loo.code %][% to_branch_loo.toBranch %]row" name="[% to_branch_loo.code %]_[% to_branch_loo.toBranch %]" checked="checked" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/clone-rules.tt (-4 / +3 lines)
Lines 1-3 Link Here
1
[% USE Branches %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Administration &rsaquo; Circulation and fine rules &rsaquo; Clone circulation and fine rules</title>
3
<title>Koha &rsaquo; Administration &rsaquo; Circulation and fine rules &rsaquo; Clone circulation and fine rules</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 14-23 Link Here
14
    <div id="yui-main">
15
    <div id="yui-main">
15
    <div class="yui-b">
16
    <div class="yui-b">
16
    <h2>Cloning circulation and fine rules
17
    <h2>Cloning circulation and fine rules
17
        [% IF ( frombranchname || tobranchname ) %]
18
        [% IF frombranch %] from "[% Branches.GetName( frombranch ) %]"[% END %]
18
            [% IF ( frombranchname ) %] from "[% frombranchname %]"[% END %]
19
        [% IF tobranch %] to "[% Branches.GetName( tobranch ) %]"[% END %]
19
	    [% IF ( tobranchname ) %] to "[% tobranchname %]"[% END %]
20
	[% END %]
21
    </h2>
20
    </h2>
22
21
23
    [% IF ( result ) %]
22
    [% IF ( result ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-3 / +4 lines)
Lines 623-629 function verify_images() { Link Here
623
                            [% item.translated_description %]
623
                            [% item.translated_description %]
624
                        </td>
624
                        </td>
625
                    [% END %]
625
                    [% END %]
626
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% item.branchname %] [% END %]</td>
626
                    <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) %] [% END %]</td>
627
                    <td class="homebranch">[% Branches.GetName(item.homebranch) %]<span class="shelvingloc">[% item.location %]</span> </td>
627
                    <td class="homebranch">[% Branches.GetName(item.homebranch) %]<span class="shelvingloc">[% item.location %]</span> </td>
628
                    [% IF ( itemdata_ccode ) %]<td>[% item.ccode %]</td>[% END %]
628
                    [% IF ( itemdata_ccode ) %]<td>[% item.ccode %]</td>[% END %]
629
                    <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber %][% END %]</td>
629
                    <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber %][% END %]</td>
Lines 891-898 function verify_images() { Link Here
891
    <h2>This is a serial subscription</h2>
891
    <h2>This is a serial subscription</h2>
892
    <p> (There are [% subscriptionsnumber %] subscriptions associated with this title).</p> 
892
    <p> (There are [% subscriptionsnumber %] subscriptions associated with this title).</p> 
893
    [% FOREACH subscription IN subscriptions %]
893
    [% FOREACH subscription IN subscriptions %]
894
	    [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %]
894
            [% IF subscription.branchcode %]
895
	    [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %]
895
                <h3>At library: [% Branches.GetName(subscription.branchcode) || subscription.branchcode %]</h3>
896
            [% END %]
896
            [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
897
            [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %]
897
            [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %] </p>[% END %]
898
            [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %] </p>[% END %]
898
            [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %]
899
            [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt (-2 / +3 lines)
Lines 1-4 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% title %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
4
<title>Koha &rsaquo; Catalog &rsaquo; Item details for [% title %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 62-68 Link Here
62
         [% END %]
63
         [% END %]
63
         [% END %][% END %]</h4>
64
         [% END %][% END %]</h4>
64
            <ol class="bibliodetails">
65
            <ol class="bibliodetails">
65
            <li><span class="label">Home library:</span> [% ITEM_DAT.homebranchname %]&nbsp;</li>
66
            <li><span class="label">Home library:</span> [% Branches.GetName( ITEM_DAT.homebranch ) %]&nbsp;</li>
66
	    [% IF ( item_level_itypes ) %]
67
	    [% IF ( item_level_itypes ) %]
67
            <li><span class="label">Item type:</span> [% ITEM_DAT.itype %]&nbsp;</li>
68
            <li><span class="label">Item type:</span> [% ITEM_DAT.itype %]&nbsp;</li>
68
	    [% END %]
69
	    [% END %]
Lines 80-86 Link Here
80
            )[% END %]</h4>
81
            )[% END %]</h4>
81
82
82
            <ol class="bibliodetails">
83
            <ol class="bibliodetails">
83
            <li><span class="label">Current location:</span> [% ITEM_DAT.holdingbranchname %]&nbsp;</li>
84
            <li><span class="label">Current location:</span> [% Branches.GetName( ITEM_DAT.holdingbranch ) %]&nbsp;</li>
84
            <li><span class="label">Checkout status:</span>
85
            <li><span class="label">Checkout status:</span>
85
            [% IF ( ITEM_DAT.issue ) %]Checked out to
86
            [% IF ( ITEM_DAT.issue ) %]Checked out to
86
                [% IF ( hidepatronname ) %]
87
                [% IF ( hidepatronname ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt (-2 / +3 lines)
Lines 1-3 Link Here
1
[% USE Branches %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Circulation &rsaquo; Overdues at [% LoginBranchname %]</title>
3
<title>Koha &rsaquo; Circulation &rsaquo; Overdues at [% LoginBranchname %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
Lines 54-60 Link Here
54
                    [% IF ( overduesloo.borroweremail ) %]<a href="mailto:[% overduesloo.borroweremail %]?subject=Overdue: [% overduesloo.title |html %]">
55
                    [% IF ( overduesloo.borroweremail ) %]<a href="mailto:[% overduesloo.borroweremail %]?subject=Overdue: [% overduesloo.title |html %]">
55
                    [% overduesloo.borroweremail %]</a>[% END %]
56
                    [% overduesloo.borroweremail %]</a>[% END %]
56
                    </td>
57
                    </td>
57
                    <td>[% overduesloo.homebranch %] [% overduesloo.itemcallnumber %]
58
                    <td>[% Branches.GetName( overduesloo.homebranch ) %] [% overduesloo.itemcallnumber %]
58
                    </td>
59
                    </td>
59
                    <td align="center">
60
                    <td align="center">
60
                    <b>
61
                    <b>
Lines 132-138 Link Here
132
                        [% todayoverduesloo.borroweremail %]</a>[% END %]
133
                        [% todayoverduesloo.borroweremail %]</a>[% END %]
133
                            </p>
134
                            </p>
134
                        </td>
135
                        </td>
135
                        <td><p>[% todayoverduesloo.homebranch %] [% todayoverduesloo.itemcallnumber %]</p>
136
                        <td><p>[% Branches.GetName( todayoverduesloo.homebranch ) %] [% todayoverduesloo.itemcallnumber %]</p>
136
                        </td>
137
                        </td>
137
                        <td align="center">
138
                        <td align="center">
138
                            <b>
139
                            <b>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-3 / +3 lines)
Lines 199-209 $(document).ready(function() { Link Here
199
[% END %]
199
[% END %]
200
200
201
[% IF ( RESERVE_WAITING ) %]
201
[% IF ( RESERVE_WAITING ) %]
202
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% reswaitingdate | $KohaDates %]</li>
202
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% reswaitingdate | $KohaDates %]</li>
203
[% END %]
203
[% END %]
204
204
205
[% IF ( RESERVED ) %]
205
[% IF ( RESERVED ) %]
206
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% resreservedate | $KohaDates %]</li>
206
    <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% Branches.GetName( resbranchcode ) %] since [% resreservedate | $KohaDates %]</li>
207
[% END %]
207
[% END %]
208
208
209
[% IF ( ISSUED_TO_ANOTHER ) %]
209
[% IF ( ISSUED_TO_ANOTHER ) %]
Lines 223-229 $(document).ready(function() { Link Here
223
[% END %]
223
[% END %]
224
224
225
[% IF ( BORRNOTSAMEBRANCH ) %]
225
[% IF ( BORRNOTSAMEBRANCH ) %]
226
    <li>This patron is from a different library ([% BORRNOTSAMEBRANCH %])</li>
226
    <li>This patron is from a different library ([% Branches.GetName( BORRNOTSAMEBRANCH ) %])</li>
227
[% END %]
227
[% END %]
228
228
229
[% IF ( PATRON_CANT ) %]
229
[% IF ( PATRON_CANT ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt (-1 / +1 lines)
Lines 164-170 $(document).ready(function() { Link Here
164
                      <li><i class="fa fa-li fa-warning"></i>Too many checked out.</li>
164
                      <li><i class="fa fa-li fa-warning"></i>Too many checked out.</li>
165
                  [% END %]
165
                  [% END %]
166
                  [% IF checkout_info.BORRNOTSAMEBRANCH %]
166
                  [% IF checkout_info.BORRNOTSAMEBRANCH %]
167
                      <li><i class="fa fa-li fa-warning"></i>This patron is from a different library ([% checkout_info.BORRNOTSAMEBRANCH %]).</li>
167
                      <li><i class="fa fa-li fa-warning"></i>This patron is from a different library ([% Branches.GetName( checkout_info.BORRNOTSAMEBRANCH ) %]).</li>
168
                  [% END %]
168
                  [% END %]
169
                  [% IF checkout_ino.PATRON_CANT %]
169
                  [% IF checkout_ino.PATRON_CANT %]
170
                      <li><i class="fa fa-li fa-warning"></i>This patron can't check out this item per library circulation policy.</li>
170
                      <li><i class="fa fa-li fa-warning"></i>This patron can't check out this item per library circulation policy.</li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +1 lines)
Lines 161-167 $(document).ready(function () { Link Here
161
161
162
[% IF ( collectionItemNeedsTransferred ) %]
162
[% IF ( collectionItemNeedsTransferred ) %]
163
 <div id="rotating-collection" class="dialog message">
163
 <div id="rotating-collection" class="dialog message">
164
        <h3>Please transfer item to: [% collectionBranchName %]</h3>
164
        <h3>Please transfer item to: [% Branches.GetName( collectionBranch ) %]</h3>
165
            <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
165
            <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
166
            <p>This item is part of a rotating collection.</p>
166
            <p>This item is part of a rotating collection.</p>
167
            <p><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% collectionBranch %]&amp;op=slip'); return true;">Print slip</a></p>
167
            <p><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% collectionBranch %]&amp;op=slip'); return true;">Print slip</a></p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt (-3 / +3 lines)
Lines 47-53 Link Here
47
        [% FOREACH cancel_result %]
47
        [% FOREACH cancel_result %]
48
            [% IF ( messagetransfert ) %]
48
            [% IF ( messagetransfert ) %]
49
                <div class="dialog message">
49
                <div class="dialog message">
50
                    <h2>This item is on hold for pick-up at [% branchname %]</h2>
50
                    <h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) %]</h2>
51
                    <p><strong>[% nextreservtitle %]</strong> is on hold for <strong> [% nextreservsurname %], [% nextreservfirstname %]</strong>.
51
                    <p><strong>[% nextreservtitle %]</strong> is on hold for <strong> [% nextreservsurname %], [% nextreservfirstname %]</strong>.
52
                    Please retain this item and check it in to process the hold.
52
                    Please retain this item and check it in to process the hold.
53
                    </p>
53
                    </p>
Lines 115-121 Link Here
115
                            <input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" />
115
                            <input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" />
116
                            <input type="hidden" name="tab" value="holdswaiting">
116
                            <input type="hidden" name="tab" value="holdswaiting">
117
                            [% IF ( reserveloo.dotransfer ) %]
117
                            [% IF ( reserveloo.dotransfer ) %]
118
                            <input type="submit" value="Cancel hold and return to : [% reserveloo.branchname %]" /> 
118
                            <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) %]" />
119
                            [% ELSE %]
119
                            [% ELSE %]
120
                            <input type="submit" value="Cancel hold" />
120
                            <input type="submit" value="Cancel hold" />
121
                            [% END %]
121
                            [% END %]
Lines 175-181 Link Here
175
                            <input type="hidden" name="tbr" value="[% overloo.homebranch %]" />
175
                            <input type="hidden" name="tbr" value="[% overloo.homebranch %]" />
176
                            <input type="hidden" name="tab" value="holdsover">
176
                            <input type="hidden" name="tab" value="holdsover">
177
                            [% IF ( overloo.dotransfer ) %]
177
                            [% IF ( overloo.dotransfer ) %]
178
                            <input type="submit" value="Cancel hold and return to : [% overloo.branchname %]" />
178
                            <input type="submit" value="Cancel hold and return to : [% Branches.GetName( overloo.homebranch ) %]" />
179
                            [% ELSE %]
179
                            [% ELSE %]
180
                            <input type="submit" value="Cancel hold" />
180
                            <input type="submit" value="Cancel hold" />
181
                            [% END %]
181
                            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt (+1 lines)
Lines 1-5 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Patrons &rsaquo; [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]</title>
5
<title>Koha &rsaquo; Patrons &rsaquo; [% IF (unknowuser) %]Patron does not exist[% ELSE %]Discharge for [% firstname %] [% surname %] ([% cardnumber %])[% END %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt (+1 lines)
Lines 1-3 Link Here
1
[% USE Branches %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Patrons &rsaquo; Pending discharge requests</title>
3
<title>Koha &rsaquo; Patrons &rsaquo; Pending discharge requests</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (+1 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
3
[% USE KohaDates %]
4
[% USE KohaDates %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Sent notices for [% INCLUDE 'patron-title.inc' %]</title>
6
<title>Sent notices for [% INCLUDE 'patron-title.inc' %]</title>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (+1 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Patrons &rsaquo; Pay Fines for  [% borrower.firstname %] [% borrower.surname %]</title>
5
<title>Koha &rsaquo; Patrons &rsaquo; Pay Fines for  [% borrower.firstname %] [% borrower.surname %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt (+1 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE AuthorisedValues  %]
2
[% USE AuthorisedValues  %]
3
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Patrons &rsaquo; Purchase suggestions for [% INCLUDE 'patron-title.inc' %]</title>
5
<title>Koha &rsaquo; Patrons &rsaquo; Purchase suggestions for [% INCLUDE 'patron-title.inc' %]</title>
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt (+1 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Subscription Routing Lists for [% INCLUDE 'patron-title.inc' %]</title>
5
<title>Subscription Routing Lists for [% INCLUDE 'patron-title.inc' %]</title>
5
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt (+1 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Patrons &rsaquo;
5
<title>Koha &rsaquo; Patrons &rsaquo;
5
[% IF ( unknowuser ) %]
6
[% IF ( unknowuser ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemtypes.tt (-1 / +2 lines)
Lines 1-3 Link Here
1
[% USE Branches %]
1
[% USE ItemTypes %]
2
[% USE ItemTypes %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Reports &rsaquo; Catalog by item types</title>
4
<title>Koha &rsaquo; Reports &rsaquo; Catalog by item types</title>
Lines 31-37 $(document).ready(function(){ Link Here
31
32
32
[% IF ( do_it ) %]
33
[% IF ( do_it ) %]
33
[% FOREACH mainloo IN mainloop %]
34
[% FOREACH mainloo IN mainloop %]
34
	<h1>Reports on item types [% IF ( mainloo.branchname ) %] held at [% mainloo.branchname %][% END %]</h1>
35
    <h1>Reports on item types [% IF branch %] held at [% Branches.GetName( branch ) %][% END %]</h1>
35
	<table id="itemtypest">
36
	<table id="itemtypest">
36
		<thead>
37
		<thead>
37
		<tr>
38
		<tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt (-1 / +1 lines)
Lines 278-284 h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o Link Here
278
    <fieldset class="rows"> <legend>Acquisition information</legend>
278
    <fieldset class="rows"> <legend>Acquisition information</legend>
279
      <ol>
279
      <ol>
280
        <li>
280
        <li>
281
          <span class="label">Library:</span> [% branchname %]
281
          <span class="label">Library:</span> [% Branches.GetName( branchcode ) %]
282
        </li>
282
        </li>
283
        <li>
283
        <li>
284
          <span class="label">Fund:</span> [% budgetname %]
284
          <span class="label">Fund:</span> [% budgetname %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt (-3 / +4 lines)
Lines 1-5 Link Here
1
[% USE Branches %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Tools &rsaquo; [% branchname %] calendar</title>
3
<title>Koha &rsaquo; Tools &rsaquo; [% Branches.GetName( branch ) %] calendar</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
[% INCLUDE 'calendar.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
Lines 226-239 td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl Link Here
226
[% INCLUDE 'header.inc' %]
227
[% INCLUDE 'header.inc' %]
227
[% INCLUDE 'cat-search.inc' %]
228
[% INCLUDE 'cat-search.inc' %]
228
229
229
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% branchname %] calendar</div>
230
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% Branches.GetName( branchname ) %] calendar</div>
230
231
231
<div id="doc3" class="yui-t1">
232
<div id="doc3" class="yui-t1">
232
   
233
   
233
   <div id="bd">
234
   <div id="bd">
234
    <div id="yui-main">
235
    <div id="yui-main">
235
    <div class="yui-b">
236
    <div class="yui-b">
236
    <h2>[% branchname %] calendar</h2>
237
    <h2>[% Branches.GetName( branchname ) %] calendar</h2>
237
    <div class="yui-g">
238
    <div class="yui-g">
238
    <div class="yui-u first">
239
    <div class="yui-u first">
239
        <label for="branch">Define the holidays for:</label>
240
        <label for="branch">Define the holidays for:</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-1 / +2 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE Branches %]
2
[% INCLUDE 'doc-head-open.inc'%]
3
[% INCLUDE 'doc-head-open.inc'%]
3
<title>Koha &rsaquo; Tools &rsaquo; Batch patron modification</title>
4
<title>Koha &rsaquo; Tools &rsaquo; Batch patron modification</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 253-259 Link Here
253
                                                    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.cardnumber %]</a></td>
254
                                                    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.cardnumber %]</a></td>
254
                                                    <td>[% borrower.surname %]</td>
255
                                                    <td>[% borrower.surname %]</td>
255
                                                    <td>[% borrower.firstname %]</td>
256
                                                    <td>[% borrower.firstname %]</td>
256
                                                    <td>[% borrower.branchname %]</td>
257
                                                    <td>[% Branches.GetName( borrower.branchcode ) %]</td>
257
                                                    <td>[% borrower.categorycode %]</td>
258
                                                    <td>[% borrower.categorycode %]</td>
258
                                                    <td>[% borrower.city %]</td>
259
                                                    <td>[% borrower.city %]</td>
259
                                                    <td>[% borrower.state %]</td>
260
                                                    <td>[% borrower.state %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (+1 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE AuthorisedValues %]
2
[% USE AuthorisedValues %]
3
[% USE Branches %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
4
<title>
5
<title>
5
	Koha &rsaquo; Tools &rsaquo;
6
	Koha &rsaquo; Tools &rsaquo;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-2 / +2 lines)
Lines 794-801 Link Here
794
                            <h2>This is a serial</h2>
794
                            <h2>This is a serial</h2>
795
                            <p>There are [% subscriptionsnumber %] subscription(s) associated with this title.</p>
795
                            <p>There are [% subscriptionsnumber %] subscription(s) associated with this title.</p>
796
                            [% FOREACH subscription IN subscriptions %]
796
                            [% FOREACH subscription IN subscriptions %]
797
                                [% IF ( subscription.branchname ) %]
797
                                [% IF ( subscription.branchcode ) %]
798
                                    <h3>At library: [% subscription.branchname %]</h3>
798
                                    <h3>At library: [% Branches.GetName( subscription.branchname ) %]</h3>
799
                                [% ELSE %]
799
                                [% ELSE %]
800
                                    [% IF ( subscription.branchcode ) %]
800
                                    [% IF ( subscription.branchcode ) %]
801
                                        <h3>At library: [% subscription.branchcode %]</h3>
801
                                        <h3>At library: [% subscription.branchcode %]</h3>
(-)a/members/boraccount.pl (-1 lines)
Lines 111-117 $template->param(%$data); Link Here
111
$template->param(
111
$template->param(
112
    finesview           => 1,
112
    finesview           => 1,
113
    borrowernumber      => $borrowernumber,
113
    borrowernumber      => $borrowernumber,
114
    branchname          => GetBranchName($data->{'branchcode'}),
115
    total               => sprintf("%.2f",$total),
114
    total               => sprintf("%.2f",$total),
116
    totalcredit         => $totalcredit,
115
    totalcredit         => $totalcredit,
117
    is_child            => ($data->{'category_type'} eq 'C'),
116
    is_child            => ($data->{'category_type'} eq 'C'),
(-)a/members/deletemem.pl (-1 lines)
Lines 127-133 if ($countissues > 0 or $flags->{'CHARGES'} or $data->{'borrowernumber'} or $de Link Here
127
        phone => $bor->{'phone'},
127
        phone => $bor->{'phone'},
128
        email => $bor->{'email'},
128
        email => $bor->{'email'},
129
        branchcode => $bor->{'branchcode'},
129
        branchcode => $bor->{'branchcode'},
130
        branchname => GetBranchName($bor->{'branchcode'}),
131
		activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
130
		activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
132
        RoutingSerials => C4::Context->preference('RoutingSerials'),
131
        RoutingSerials => C4::Context->preference('RoutingSerials'),
133
    );
132
    );
(-)a/members/files.pl (-1 lines)
Lines 104-110 else { Link Here
104
104
105
    $template->param(
105
    $template->param(
106
        categoryname    => $data->{'description'},
106
        categoryname    => $data->{'description'},
107
        branchname      => GetBranchName($data->{'branchcode'}),
108
        RoutingSerials => C4::Context->preference('RoutingSerials'),
107
        RoutingSerials => C4::Context->preference('RoutingSerials'),
109
    );
108
    );
110
109
(-)a/members/mancredit.pl (-1 lines)
Lines 99-105 if ($add){ Link Here
99
        finesview      => 1,
99
        finesview      => 1,
100
        borrowernumber => $borrowernumber,
100
        borrowernumber => $borrowernumber,
101
        categoryname   => $data->{'description'},
101
        categoryname   => $data->{'description'},
102
        branchname     => GetBranchName($data->{'branchcode'}),
103
        is_child       => ($data->{'category_type'} eq 'C'),
102
        is_child       => ($data->{'category_type'} eq 'C'),
104
        activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
103
        activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
105
        RoutingSerials => C4::Context->preference('RoutingSerials'),
104
        RoutingSerials => C4::Context->preference('RoutingSerials'),
(-)a/members/maninvoice.pl (-1 lines)
Lines 124-130 if ($add){ Link Here
124
        finesview      => 1,
124
        finesview      => 1,
125
        borrowernumber => $borrowernumber,
125
        borrowernumber => $borrowernumber,
126
        categoryname   => $data->{'description'},
126
        categoryname   => $data->{'description'},
127
        branchname     => GetBranchName($data->{'branchcode'}),
128
        is_child       => ($data->{'category_type'} eq 'C'),
127
        is_child       => ($data->{'category_type'} eq 'C'),
129
        activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
128
        activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
130
        RoutingSerials => C4::Context->preference('RoutingSerials'),
129
        RoutingSerials => C4::Context->preference('RoutingSerials'),
(-)a/members/member-flags.pl (-1 lines)
Lines 192-198 $template->param( Link Here
192
		email => $bor->{'email'},
192
		email => $bor->{'email'},
193
        emailpro => $bor->{'emailpro'},
193
        emailpro => $bor->{'emailpro'},
194
		branchcode => $bor->{'branchcode'},
194
		branchcode => $bor->{'branchcode'},
195
		branchname => GetBranchName($bor->{'branchcode'}),
196
		loop => \@loop,
195
		loop => \@loop,
197
		is_child        => ($bor->{'category_type'} eq 'C'),
196
		is_child        => ($bor->{'category_type'} eq 'C'),
198
		activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
197
		activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
(-)a/members/member-password.pl (-1 lines)
Lines 135-141 $template->param( Link Here
135
    email                      => $bor->{'email'},
135
    email                      => $bor->{'email'},
136
    emailpro                   => $bor->{'emailpro'},
136
    emailpro                   => $bor->{'emailpro'},
137
    branchcode                 => $bor->{'branchcode'},
137
    branchcode                 => $bor->{'branchcode'},
138
    branchname                 => GetBranchName( $bor->{'branchcode'} ),
139
    userid                     => $bor->{'userid'},
138
    userid                     => $bor->{'userid'},
140
    destination                => $destination,
139
    destination                => $destination,
141
    is_child                   => ( $bor->{'category_type'} eq 'C' ),
140
    is_child                   => ( $bor->{'category_type'} eq 'C' ),
(-)a/members/moremember.pl (-1 / +1 lines)
Lines 47-53 use C4::Circulation; Link Here
47
use C4::Koha;
47
use C4::Koha;
48
use C4::Letters;
48
use C4::Letters;
49
use C4::Biblio;
49
use C4::Biblio;
50
use C4::Branch; # GetBranchName
51
use C4::Form::MessagingPreferences;
50
use C4::Form::MessagingPreferences;
52
use List::MoreUtils qw/uniq/;
51
use List::MoreUtils qw/uniq/;
53
use C4::Members::Attributes qw(GetBorrowerAttributes);
52
use C4::Members::Attributes qw(GetBorrowerAttributes);
Lines 325-330 $template->param( Link Here
325
    categoryname    => $data->{'description'},
324
    categoryname    => $data->{'description'},
326
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
325
    was_renewed     => scalar $input->param('was_renewed') ? 1 : 0,
327
    branch          => $branch,
326
    branch          => $branch,
327
    branchcode      => $branch,
328
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
328
    todaysdate      => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }),
329
    totalprice      => sprintf("%.2f", $totalprice),
329
    totalprice      => sprintf("%.2f", $totalprice),
330
    totaldue        => sprintf("%.2f", $total),
330
    totaldue        => sprintf("%.2f", $total),
(-)a/members/notices.pl (-2 lines)
Lines 25-31 use C4::Auth; Link Here
25
use C4::Output;
25
use C4::Output;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Members;
27
use C4::Members;
28
use C4::Branch;
29
use C4::Letters;
28
use C4::Letters;
30
use C4::Members::Attributes qw(GetBorrowerAttributes);
29
use C4::Members::Attributes qw(GetBorrowerAttributes);
31
use Koha::Patron::Images;
30
use Koha::Patron::Images;
Lines 79-85 $template->param( Link Here
79
    QUEUED_MESSAGES    => $queued_messages,
78
    QUEUED_MESSAGES    => $queued_messages,
80
    borrowernumber     => $borrowernumber,
79
    borrowernumber     => $borrowernumber,
81
    sentnotices        => 1,
80
    sentnotices        => 1,
82
    branchname         => GetBranchName($borrower->{'branchcode'}),
83
    categoryname       => $borrower->{'description'},
81
    categoryname       => $borrower->{'description'},
84
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
82
    activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
85
    RoutingSerials => C4::Context->preference('RoutingSerials'),
83
    RoutingSerials => C4::Context->preference('RoutingSerials'),
(-)a/members/pay.pl (-1 lines)
Lines 231-237 sub borrower_add_additional_fields { Link Here
231
        );
231
        );
232
    }
232
    }
233
233
234
    $b_ref->{branchname} = GetBranchName( $b_ref->{branchcode} );
235
    return;
234
    return;
236
}
235
}
237
236
(-)a/members/paycollect.pl (-1 lines)
Lines 180-185 sub borrower_add_additional_fields { Link Here
180
        $b_ref->{extendedattributes} = GetBorrowerAttributes($b_ref->{borrowernumber});
180
        $b_ref->{extendedattributes} = GetBorrowerAttributes($b_ref->{borrowernumber});
181
    }
181
    }
182
182
183
    $b_ref->{branchname} = GetBranchName( $b_ref->{branchcode} );
184
    return;
183
    return;
185
}
184
}
(-)a/members/printfeercpt.pl (-1 lines)
Lines 135-141 $template->param( Link Here
135
    phone               => $data->{'phone'},
135
    phone               => $data->{'phone'},
136
    email               => $data->{'email'},
136
    email               => $data->{'email'},
137
    branchcode          => $data->{'branchcode'},
137
    branchcode          => $data->{'branchcode'},
138
	branchname			=> GetBranchName($data->{'branchcode'}),
139
    total               => sprintf("%.2f",$total),
138
    total               => sprintf("%.2f",$total),
140
    totalcredit         => $totalcredit,
139
    totalcredit         => $totalcredit,
141
	is_child        => ($data->{'category_type'} eq 'C'),
140
	is_child        => ($data->{'category_type'} eq 'C'),
(-)a/members/printinvoice.pl (-1 lines)
Lines 134-140 $template->param( Link Here
134
    phone          => $data->{'phone'},
134
    phone          => $data->{'phone'},
135
    email          => $data->{'email'},
135
    email          => $data->{'email'},
136
    branchcode     => $data->{'branchcode'},
136
    branchcode     => $data->{'branchcode'},
137
    branchname     => GetBranchName( $data->{'branchcode'} ),
138
    total          => sprintf( "%.2f", $total ),
137
    total          => sprintf( "%.2f", $total ),
139
    totalcredit    => $totalcredit,
138
    totalcredit    => $totalcredit,
140
    is_child       => ( $data->{'category_type'} eq 'C' ),
139
    is_child       => ( $data->{'category_type'} eq 'C' ),
(-)a/members/purchase-suggestions.pl (-1 lines)
Lines 51-57 foreach my $key ( keys %$borrower ) { Link Here
51
$template->param(
51
$template->param(
52
    suggestionsview  => 1,
52
    suggestionsview  => 1,
53
    categoryname => $borrower->{'description'},
53
    categoryname => $borrower->{'description'},
54
    branchname   => GetBranchName( $borrower->{'branchcode'} ),
55
    RoutingSerials => C4::Context->preference('RoutingSerials'),
54
    RoutingSerials => C4::Context->preference('RoutingSerials'),
56
);
55
);
57
56
(-)a/members/routing-lists.pl (-1 lines)
Lines 95-101 $template->param( Link Here
95
    borrower          => $borrower,
95
    borrower          => $borrower,
96
    borrowernumber    => $borrowernumber,
96
    borrowernumber    => $borrowernumber,
97
    branch            => $branch,
97
    branch            => $branch,
98
    branchname        => GetBranchName($borrower->{'branchcode'}),
99
    categoryname      => $borrower->{description},
98
    categoryname      => $borrower->{description},
100
    RoutingSerials    => C4::Context->preference('RoutingSerials'),
99
    RoutingSerials    => C4::Context->preference('RoutingSerials'),
101
);
100
);
(-)a/members/statistics.pl (-1 lines)
Lines 61-67 foreach my $key ( keys %$borrower ) { Link Here
61
}
61
}
62
$template->param(
62
$template->param(
63
    categoryname    => $borrower->{'description'},
63
    categoryname    => $borrower->{'description'},
64
    branchname      => GetBranchName($borrower->{'branchcode'}),
65
);
64
);
66
# Construct column names
65
# Construct column names
67
my $fields = C4::Members::Statistics::get_fields();
66
my $fields = C4::Members::Statistics::get_fields();
(-)a/opac/opac-detail.pl (-1 lines)
Lines 552-558 foreach my $subscription (@subscriptions) { Link Here
552
    $cell{histstartdate}     = $subscription->{histstartdate};
552
    $cell{histstartdate}     = $subscription->{histstartdate};
553
    $cell{histenddate}       = $subscription->{histenddate};
553
    $cell{histenddate}       = $subscription->{histenddate};
554
    $cell{branchcode}        = $subscription->{branchcode};
554
    $cell{branchcode}        = $subscription->{branchcode};
555
    $cell{branchname}        = GetBranchName($subscription->{branchcode});
556
    $cell{hasalert}          = $subscription->{hasalert};
555
    $cell{hasalert}          = $subscription->{hasalert};
557
    $cell{callnumber}        = $subscription->{callnumber};
556
    $cell{callnumber}        = $subscription->{callnumber};
558
    $cell{closed}            = $subscription->{closed};
557
    $cell{closed}            = $subscription->{closed};
(-)a/reports/itemtypes.plugin (-1 lines)
Lines 108-114 sub calculate { Link Here
108
	$globalline{loopitemtype} = \@results;
108
	$globalline{loopitemtype} = \@results;
109
	$globalline{total} = $grantotal;
109
	$globalline{total} = $grantotal;
110
	$globalline{branch} = $branch;
110
	$globalline{branch} = $branch;
111
	$globalline{branchname} = GetBranchName($branch);
112
	push @mainloop,\%globalline;
111
	push @mainloop,\%globalline;
113
	return \@mainloop;
112
	return \@mainloop;
114
}
113
}
(-)a/reports/reserves_stats.pl (-1 / +2 lines)
Lines 32-37 use C4::Output; Link Here
32
use C4::Reports;
32
use C4::Reports;
33
use C4::Members;
33
use C4::Members;
34
use Koha::DateUtils;
34
use Koha::DateUtils;
35
use Koha::Libraries;
35
use Koha::Patron::Categories;
36
use Koha::Patron::Categories;
36
use List::MoreUtils qw/any/;
37
use List::MoreUtils qw/any/;
37
use YAML;
38
use YAML;
Lines 338-344 sub display_value { Link Here
338
        ( $crit =~ /ccode/ )         ? $ccodes->{$value}
339
        ( $crit =~ /ccode/ )         ? $ccodes->{$value}
339
      : ( $crit =~ /location/ )      ? $locations->{$value}
340
      : ( $crit =~ /location/ )      ? $locations->{$value}
340
      : ( $crit =~ /itemtype/ )      ? $itemtypes->{$value}->{description}
341
      : ( $crit =~ /itemtype/ )      ? $itemtypes->{$value}->{description}
341
      : ( $crit =~ /branch/ )        ? GetBranchName($value)
342
      : ( $crit =~ /branch/ )        ? Koha::Libraries->find($value)->branchname
342
      : ( $crit =~ /reservestatus/ ) ? reservestatushuman($value)
343
      : ( $crit =~ /reservestatus/ ) ? reservestatushuman($value)
343
      :                                $value;    # default fallback
344
      :                                $value;    # default fallback
344
    if ($crit =~ /sort1/) {
345
    if ($crit =~ /sort1/) {
(-)a/serials/routing-preview.pl (-1 / +2 lines)
Lines 34-39 use C4::Items; Link Here
34
use C4::Serials;
34
use C4::Serials;
35
use URI::Escape;
35
use URI::Escape;
36
use C4::Branch;
36
use C4::Branch;
37
use Koha::Libraries;
37
38
38
my $query = new CGI;
39
my $query = new CGI;
39
my $subscriptionid = $query->param('subscriptionid');
40
my $subscriptionid = $query->param('subscriptionid');
Lines 66-72 if($ok){ Link Here
66
	my ($count2,@bibitems) = GetBiblioItemByBiblioNumber($biblio);
67
	my ($count2,@bibitems) = GetBiblioItemByBiblioNumber($biblio);
67
	my @itemresults = GetItemsInfo( $subs->{biblionumber} );
68
	my @itemresults = GetItemsInfo( $subs->{biblionumber} );
68
	my $branch = $itemresults[0]->{'holdingbranch'};
69
	my $branch = $itemresults[0]->{'holdingbranch'};
69
	my $branchname = GetBranchName($branch);
70
    my $branchname = Koha::Libraries->find($branch)->branchname;
70
71
71
	if (C4::Context->preference('RoutingListAddReserves')){
72
	if (C4::Context->preference('RoutingListAddReserves')){
72
		# get existing reserves .....
73
		# get existing reserves .....
(-)a/suggestion/suggestion.pl (-2 / +3 lines)
Lines 33-38 use C4::Debug; Link Here
33
33
34
use Koha::DateUtils qw( dt_from_string );
34
use Koha::DateUtils qw( dt_from_string );
35
use Koha::Acquisition::Currencies;
35
use Koha::Acquisition::Currencies;
36
use Koha::Libraries;
36
37
37
use URI::Escape;
38
use URI::Escape;
38
39
Lines 60-66 sub GetCriteriumDesc{ Link Here
60
        }
61
        }
61
        return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i);
62
        return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i);
62
    }
63
    }
63
    return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/);
64
    return Koha::Libraries->find($criteriumvalue)->branchname;
65
        if $displayby =~ /branchcode/;
64
    return GetAuthorisedValueByCode('SUGGEST_FORMAT', $criteriumvalue) || "Unknown" if ($displayby =~/itemtype/);
66
    return GetAuthorisedValueByCode('SUGGEST_FORMAT', $criteriumvalue) || "Unknown" if ($displayby =~/itemtype/);
65
    if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){
67
    if ($displayby =~/suggestedby/||$displayby =~/managedby/||$displayby =~/acceptedby/){
66
        my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue);
68
        my $borr=C4::Members::GetMember(borrowernumber=>$criteriumvalue);
Lines 213-219 elsif ($op eq "change" ) { Link Here
213
}
215
}
214
elsif ( $op eq 'show' ) {
216
elsif ( $op eq 'show' ) {
215
    $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'});
217
    $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'});
216
    $$suggestion_ref{branchname} = GetBranchName $$suggestion_ref{branchcode};
217
    my $budget = GetBudget $$suggestion_ref{budgetid};
218
    my $budget = GetBudget $$suggestion_ref{budgetid};
218
    $$suggestion_ref{budgetname} = $$budget{budget_name};
219
    $$suggestion_ref{budgetname} = $$budget{budget_name};
219
    Init($suggestion_ref);
220
    Init($suggestion_ref);
(-)a/svc/holds (-2 / +1 lines)
Lines 24-30 use JSON qw(to_json); Link Here
24
24
25
use C4::Auth qw(check_cookie_auth);
25
use C4::Auth qw(check_cookie_auth);
26
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
26
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
27
use C4::Branch qw(GetBranchName);
28
use C4::Charset;
27
use C4::Charset;
29
use C4::Circulation qw(GetTransfers);
28
use C4::Circulation qw(GetTransfers);
30
use C4::Context;
29
use C4::Context;
Lines 134-140 while ( my $h = $holds_rs->next() ) { Link Here
134
            $hold->{color}       = 'transferred';
133
            $hold->{color}       = 'transferred';
135
            $hold->{transferred} = 1;
134
            $hold->{transferred} = 1;
136
            $hold->{date_sent} = output_pref( dt_from_string($transferred_when) );
135
            $hold->{date_sent} = output_pref( dt_from_string($transferred_when) );
137
            $hold->{from_branch} = GetBranchName($transferred_from);
136
            $hold->{from_branch} = Koha::Libraries->find($transferred_from)->branchname;
138
        }
137
        }
139
        elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne
138
        elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne
140
            $h->branch()->branchcode() )
139
            $h->branch()->branchcode() )
(-)a/t/db_dependent/Branch.t (-6 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
use C4::Context;
21
use C4::Context;
22
use Data::Dumper;
22
use Data::Dumper;
23
23
24
use Test::More tests => 17;
24
use Test::More tests => 16;
25
25
26
use C4::Branch;
26
use C4::Branch;
27
use Koha::Database;
27
use Koha::Database;
Lines 36-42 BEGIN { Link Here
36
}
36
}
37
can_ok(
37
can_ok(
38
    'C4::Branch', qw(
38
    'C4::Branch', qw(
39
      GetBranchName
40
      GetBranch
39
      GetBranch
41
      GetBranches
40
      GetBranches
42
      GetBranchesLoop
41
      GetBranchesLoop
Lines 110-119 is( Koha::Libraries->search->count, $count + 2, "two branches added" ); Link Here
110
is( Koha::Libraries->find( $b2->{branchcode} )->delete, 1,          "One row affected" );
109
is( Koha::Libraries->find( $b2->{branchcode} )->delete, 1,          "One row affected" );
111
is( Koha::Libraries->search->count,             $count + 1, "branch BRB deleted" );
110
is( Koha::Libraries->search->count,             $count + 1, "branch BRB deleted" );
112
111
113
#Test GetBranchName
114
is( GetBranchName( $b1->{branchcode} ),
115
    $b1->{branchname}, "GetBranchName returns the right name" );
116
117
#Test Getbranches
112
#Test Getbranches
118
my $branches = GetBranches();
113
my $branches = GetBranches();
119
is( scalar( keys %$branches ),
114
is( scalar( keys %$branches ),
(-)a/t/db_dependent/NewsChannels.t (-2 / +2 lines)
Lines 1-8 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Branch qw(GetBranchName);
5
use Koha::DateUtils;
4
use Koha::DateUtils;
5
use Koha::Libraries;
6
6
7
use Test::More tests => 14;
7
use Test::More tests => 14;
8
8
Lines 18-24 $dbh->{RaiseError} = 1; Link Here
18
18
19
# Add LIB1, if it doesn't exist.
19
# Add LIB1, if it doesn't exist.
20
my $addbra = 'LIB1';
20
my $addbra = 'LIB1';
21
if ( !GetBranchName($addbra) ) {
21
unless ( Koha::Libraries->find($addbra) ) {
22
    $dbh->do( q{ INSERT INTO branches (branchcode,branchname) VALUES (?,?) },
22
    $dbh->do( q{ INSERT INTO branches (branchcode,branchname) VALUES (?,?) },
23
        undef, ( $addbra, "$addbra branch" ) );
23
        undef, ( $addbra, "$addbra branch" ) );
24
}
24
}
(-)a/t/db_dependent/Reserves.t (-1 / +2 lines)
Lines 32-37 use Koha::Holds; Link Here
32
use t::lib::Mocks;
32
use t::lib::Mocks;
33
33
34
use Koha::DateUtils;
34
use Koha::DateUtils;
35
use Koha::Libraries;
35
use Koha::Patron::Categories;
36
use Koha::Patron::Categories;
36
37
37
use Data::Dumper;
38
use Data::Dumper;
Lines 57-63 $dbh->do("update marc_subfield_structure set kohafield='biblioitems.agerestricti Link Here
57
58
58
# Add branches if not existing
59
# Add branches if not existing
59
foreach my $addbra ('CPL', 'FPL', 'RPL') {
60
foreach my $addbra ('CPL', 'FPL', 'RPL') {
60
    $dbh->do("INSERT INTO branches (branchcode,branchname) VALUES (?,?)", undef, ($addbra,"$addbra branch")) unless GetBranchName($addbra);
61
    $dbh->do("INSERT INTO branches (branchcode,branchname) VALUES (?,?)", undef, ($addbra,"$addbra branch")) unless Koha::Libraries->find($addbra);
61
}
62
}
62
63
63
# Add categories if not existing
64
# Add categories if not existing
(-)a/tools/holidays.pl (-3 lines)
Lines 60-66 my $onlymine = Link Here
60
if ( $onlymine ) { 
60
if ( $onlymine ) { 
61
    $branch = C4::Context->userenv->{'branch'};
61
    $branch = C4::Context->userenv->{'branch'};
62
}
62
}
63
my $branchname = GetBranchName($branch);
64
my $branches   = GetBranches($onlymine);
63
my $branches   = GetBranches($onlymine);
65
my @branchloop;
64
my @branchloop;
66
for my $thisbranch (
65
for my $thisbranch (
Lines 154-161 $template->param( Link Here
154
    keydate                  => $keydate,
153
    keydate                  => $keydate,
155
    branchcodes              => $branchcodes,
154
    branchcodes              => $branchcodes,
156
    branch                   => $branch,
155
    branch                   => $branch,
157
    branchname               => $branchname,
158
    branch                   => $branch,
159
);
156
);
160
157
161
# Shows the template with the real values replaced
158
# Shows the template with the real values replaced
(-)a/tools/import_borrowers.pl (-2 / +3 lines)
Lines 40-46 use warnings; Link Here
40
use C4::Auth;
40
use C4::Auth;
41
use C4::Output;
41
use C4::Output;
42
use C4::Context;
42
use C4::Context;
43
use C4::Branch qw/GetBranchesLoop GetBranchName/;
43
use C4::Branch qw/GetBranchesLoop/;
44
use C4::Members;
44
use C4::Members;
45
use C4::Members::Attributes qw(:all);
45
use C4::Members::Attributes qw(:all);
46
use C4::Members::AttributeTypes;
46
use C4::Members::AttributeTypes;
Lines 49-54 use C4::Reports::Guided; Link Here
49
use C4::Templates;
49
use C4::Templates;
50
use Koha::Patron::Debarments;
50
use Koha::Patron::Debarments;
51
use Koha::DateUtils;
51
use Koha::DateUtils;
52
use Koha::Libraries;
52
use Koha::Patron::Categories;
53
use Koha::Patron::Categories;
53
54
54
use Text::CSV;
55
use Text::CSV;
Lines 185-191 if ( $uploadborrowers && length($uploadborrowers) > 0 ) { Link Here
185
        }
186
        }
186
        if ($borrower{branchcode}) {
187
        if ($borrower{branchcode}) {
187
            push @missing_criticals, {key=>'branchcode', line=>$. , lineraw=>$borrowerline, value=>$borrower{branchcode}, branch_map=>1}
188
            push @missing_criticals, {key=>'branchcode', line=>$. , lineraw=>$borrowerline, value=>$borrower{branchcode}, branch_map=>1}
188
                unless GetBranchName($borrower{branchcode});
189
                unless Koha::Libraries->find($borrower{branchcode});
189
        } else {
190
        } else {
190
            push @missing_criticals, {key=>'branchcode', line=>$. , lineraw=>$borrowerline};
191
            push @missing_criticals, {key=>'branchcode', line=>$. , lineraw=>$borrowerline};
191
        }
192
        }
(-)a/tools/modborrowers.pl (-1 lines)
Lines 362-368 sub GetBorrowerInfos { Link Here
362
    my ( %info ) = @_;
362
    my ( %info ) = @_;
363
    my $borrower = GetMember( %info );
363
    my $borrower = GetMember( %info );
364
    if ( $borrower ) {
364
    if ( $borrower ) {
365
        $borrower->{branchname} = GetBranchName( $borrower->{branchcode} );
366
        for ( qw(dateenrolled dateexpiry) ) {
365
        for ( qw(dateenrolled dateexpiry) ) {
367
            my $userdate = $borrower->{$_};
366
            my $userdate = $borrower->{$_};
368
            unless ($userdate && $userdate ne "0000-00-00" and $userdate ne "9999-12-31") {
367
            unless ($userdate && $userdate ne "0000-00-00" and $userdate ne "9999-12-31") {
(-)a/tools/viewlog.pl (-2 lines)
Lines 91-97 if ( $src eq 'circ' ) { Link Here
91
        menu           => 1,
91
        menu           => 1,
92
        borrowernumber => $borrowernumber,
92
        borrowernumber => $borrowernumber,
93
        categoryname   => $data->{'description'},
93
        categoryname   => $data->{'description'},
94
        branchname     => GetBranchName( $data->{'branchcode'} ),
95
        RoutingSerials => C4::Context->preference('RoutingSerials'),
94
        RoutingSerials => C4::Context->preference('RoutingSerials'),
96
    );
95
    );
97
}
96
}
98
- 

Return to bug 15758