Lines 27-32
use C4::Context;
Link Here
|
27 |
use C4::Output; |
27 |
use C4::Output; |
28 |
use C4::Koha; |
28 |
use C4::Koha; |
29 |
use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit }; |
29 |
use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit }; |
|
|
30 |
use Koha::Libraries; |
30 |
|
31 |
|
31 |
my $input = new CGI; |
32 |
my $input = new CGI; |
32 |
|
33 |
|
Lines 57-73
my @branchcodes;
Link Here
|
57 |
|
58 |
|
58 |
my $sth; |
59 |
my $sth; |
59 |
if ( $limitType eq 'ccode' ) { |
60 |
if ( $limitType eq 'ccode' ) { |
60 |
$sth = $dbh->prepare('SELECT authorised_value AS ccode FROM authorised_values WHERE category = "CCODE"'); |
61 |
$sth = Koha::AuthorisedValue->GetCatAuthValues($dbh); |
|
|
62 |
while ( my $row = $sth->fetchrow_hashref ) { |
63 |
push( @codes, $row->{ $limitType } ); |
64 |
} |
61 |
} elsif ( $limitType eq 'itemtype' ) { |
65 |
} elsif ( $limitType eq 'itemtype' ) { |
62 |
$sth = $dbh->prepare('SELECT itemtype FROM itemtypes'); |
66 |
$sth = Koha::ItemType->GetItemTypes($dbh); |
63 |
} |
67 |
while ( my $row = $sth->fetchrow_hashref ) { |
64 |
$sth->execute(); |
68 |
push( @codes, $row->{ $limitType } ); |
65 |
while ( my $row = $sth->fetchrow_hashref ) { |
69 |
} |
66 |
push( @codes, $row->{ $limitType } ); |
|
|
67 |
} |
70 |
} |
68 |
|
71 |
|
69 |
$sth = $dbh->prepare("SELECT branchcode FROM branches"); |
72 |
|
70 |
$sth->execute(); |
73 |
my $sth = Koha::Libraries->GetBranchCodes($dbh); |
71 |
while ( my $row = $sth->fetchrow_hashref ) { |
74 |
while ( my $row = $sth->fetchrow_hashref ) { |
72 |
push( @branchcodes, $row->{'branchcode'} ); |
75 |
push( @branchcodes, $row->{'branchcode'} ); |
73 |
} |
76 |
} |
74 |
- |
|
|