Lines 272-281
if ( $op eq 'add_form' ) {
Link Here
|
272 |
my $patrons = []; |
272 |
my $patrons = []; |
273 |
my $shares = $shelf->get_shares->search({ borrowernumber => { '!=' => undef } }); |
273 |
my $shares = $shelf->get_shares->search({ borrowernumber => { '!=' => undef } }); |
274 |
while( my $share = $shares->next ) { |
274 |
while( my $share = $shares->next ) { |
275 |
push @$patrons, { email => $share->sharee->notice_email_address, borrowernumber => $share->get_column('borrowernumber') }; |
275 |
my $email = $share->sharee->notice_email_address; |
|
|
276 |
push @$patrons, { email => $email, borrowernumber => $share->get_column('borrowernumber') } if $email; |
277 |
} |
278 |
if( @$patrons ) { |
279 |
$template->param( shared_users => $patrons ); |
280 |
$op = 'transfer'; |
281 |
} else { |
282 |
push @messages, { type => 'error', code => 'no_email_found' }; |
276 |
} |
283 |
} |
277 |
$template->param( shared_users => $patrons ); |
|
|
278 |
$op = 'transfer'; |
279 |
} elsif( !Koha::Patrons->find($new_owner) ) { |
284 |
} elsif( !Koha::Patrons->find($new_owner) ) { |
280 |
push @messages, { type => 'error', code => 'new_owner_not_found' }; |
285 |
push @messages, { type => 'error', code => 'new_owner_not_found' }; |
281 |
} elsif( !$shelf->get_shares->search({ borrowernumber => $new_owner })->count ) { |
286 |
} elsif( !$shelf->get_shares->search({ borrowernumber => $new_owner })->count ) { |
282 |
- |
|
|