@@ -, +, @@ --- admin/smart-rules.pl | 2 +- tools/letter.pl | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) --- a/admin/smart-rules.pl +++ a/admin/smart-rules.pl @@ -43,7 +43,7 @@ my ($template, $loggedinuser, $cookie) }); my $type=$input->param('type'); -my $branch = $input->param('branch') || C4::Branch::mybranch(); +my $branch = $input->param('branch') || GetBranchesCount() == 1 ? undef : C4::Branch::mybranch(); $branch = '*' if $branch eq 'NO_LIBRARY_SET'; my $op = $input->param('op') || q{}; --- a/tools/letter.pl +++ a/tools/letter.pl @@ -110,6 +110,7 @@ our $branchcode = $input->param('branchcode') eq '*' ? undef : $input->param('branchcode') ? $input->param('branchcode') : $op ? $input->param('branchcode') + : GetBranchesCount() == 1 ? undef : C4::Branch::mybranch(); my $dbh = C4::Context->dbh; --