my ( $homebranchfield, $homebranchsubfield ) =
GetMarcFromKohaField( 'items.homebranch', '' );
for my $itemfield ($record->field($homebranchfield)){
# if stripping nonlocal items, use loggedinuser's branch if they didn't select one
$branch = C4::Context->userenv->{'branch'} unless $branch;
my ( $homebranchfield, $homebranchsubfield ) =
GetMarcFromKohaField( 'items.homebranch', '' );
for my $itemfield ($record->field($homebranchfield)){
# if stripping nonlocal items, use loggedinuser's branch if they didn't select one
$branch = C4::Context->userenv->{'branch'} unless $branch;