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

(-)a/admin/branch_transfer_limits.pl (-14 / +3 lines)
Lines 52-74 my $limitType = C4::Context->preference("BranchTransferLimitsType") || "ccode"; Link Here
52
my @codes;
52
my @codes;
53
my @branchcodes;
53
my @branchcodes;
54
54
55
my $sth;
56
if ( $limitType eq 'ccode' ) {
55
if ( $limitType eq 'ccode' ) {
57
	$sth = $dbh->prepare('SELECT authorised_value AS ccode FROM authorised_values WHERE category = "CCODE"');
56
    @codes = Koha::AuthorisedValues->search({ category => 'CCODE' })->get_column('authorised_value');
58
} elsif ( $limitType eq 'itemtype' ) {
57
} elsif ( $limitType eq 'itemtype' ) {
59
	$sth = $dbh->prepare('SELECT itemtype FROM itemtypes');
58
    @codes = Koha::ItemTypes->search->get_column('itemtype');
60
}
61
$sth->execute();
62
while ( my $row = $sth->fetchrow_hashref ) {
63
	push( @codes, $row->{ $limitType } );
64
}
65
66
$sth = $dbh->prepare("SELECT branchcode FROM branches");
67
$sth->execute();
68
while ( my $row = $sth->fetchrow_hashref ) {
69
	push( @branchcodes, $row->{'branchcode'} );
70
}
59
}
71
60
61
@branchcodes = Koha::Libraries->search->get_column('branchcode');
72
## If Form Data Passed, Update the Database
62
## If Form Data Passed, Update the Database
73
if ( $input->param('updateLimits') ) {
63
if ( $input->param('updateLimits') ) {
74
    DeleteBranchTransferLimits($branchcode);
64
    DeleteBranchTransferLimits($branchcode);
75
- 

Return to bug 18247