Some paths to the FA item-add screen didn't have a branch defined--if the param is set,
use it, otherwise, use the user's logged in branch.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Modified for syntax by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
C4::Context->userenv &&
C4::Context->userenv->{flags}!=1 &&
C4::Context->userenv->{branch};
C4::Context->userenv &&
C4::Context->userenv->{flags}!=1 &&
C4::Context->userenv->{branch};
-my $branch = C4::Context->userenv->{branch};
-if ($frameworkcode eq 'FA'){
- $branch = $input->param('branch');
-}
+my $branch = $input->param('branch') || C4::Context->userenv->{branch};
my $branches = GetBranchesLoop($branch,$onlymine); # build once ahead of time, instead of multiple times later.
# We generate form, from actuel record
my $branches = GetBranchesLoop($branch,$onlymine); # build once ahead of time, instead of multiple times later.
# We generate form, from actuel record