use C4::Auth;
use C4::Context;
use C4::Output;
-use C4::Branch; # GetBranches
use C4::Letters;
use C4::Members::Attributes;
$template->param(
oldbranchcode => $oldbranchcode,
branchcode => $branchcode,
- branchloop => _branchloop($branchcode),
copying => 1,
modify => 0,
);
$template->param(
module => $module,
- branchloop => _branchloop($branchcode),
SQLfieldnames => $field_selection,
branchcode => $branchcode,
);
unless ( defined $branchcode ) {
if ( C4::Context->preference('DefaultToLoggedInLibraryNoticesSlips') ) {
- $branchcode = C4::Branch::mybranch();
+ $branchcode = C4::Context::mybranch();
}
}
$template->param(
letter => $loop_data,
- branchloop => _branchloop($branchcode),
+ branchcode => $branchcode,
);
}
-sub _branchloop {
- my ($branchcode) = @_;
-
- my $branches = GetBranches();
- my @branchloop;
- for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
- push @branchloop, {
- value => $thisbranch,
- selected => $branchcode && $thisbranch eq $branchcode,
- branchname => $branches->{$thisbranch}->{'branchname'},
- };
- }
-
- return \@branchloop;
-}
-
sub add_fields {
my @tables = @_;
my @fields = ();