Merge remote-tracking branch 'origin/new/bug_6390'

This commit is contained in:
Paul Poulain 2011-11-06 17:56:36 +01:00
commit bfc3ea8cc4

View file

@ -111,7 +111,11 @@ for my $vendor (@suppliers) {
for my $basket ( @{$baskets} ) {
my $authorisedby = $basket->{authorisedby};
my $basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode};
my $basketbranch = ''; # set a blank branch to start with
if ( GetMember( borrowernumber => $authorisedby ) ) {
# authorisedby may not be a valid borrowernumber; it's not foreign-key constrained!
$basketbranch = GetMember( borrowernumber => $authorisedby )->{branchcode};
}
if ($userenv->{'flags'} & 1 || #user is superlibrarian
(haspermission( $uid, { acquisition => q{*} } ) && #user has acq permissions and