Lines 37-43
use DateTime;
Link Here
|
37 |
use C4::Auth qw( get_template_and_user get_session haspermission ); |
37 |
use C4::Auth qw( get_template_and_user get_session haspermission ); |
38 |
use C4::Circulation qw( barcodedecode GetBranchItemRule AddReturn updateWrongTransfer LostItem ); |
38 |
use C4::Circulation qw( barcodedecode GetBranchItemRule AddReturn updateWrongTransfer LostItem ); |
39 |
use C4::Context; |
39 |
use C4::Context; |
40 |
use C4::Items qw( ModItemTransfer ); |
|
|
41 |
use C4::Members::Messaging; |
40 |
use C4::Members::Messaging; |
42 |
use C4::Members; |
41 |
use C4::Members; |
43 |
use C4::Output qw( output_html_with_http_headers ); |
42 |
use C4::Output qw( output_html_with_http_headers ); |
Lines 250-261
if ($return_date_override) {
Link Here
|
250 |
} |
249 |
} |
251 |
} |
250 |
} |
252 |
|
251 |
|
|
|
252 |
# If 'needstransfer' was set and the librarian has chosen to initiate the transfer |
253 |
if ( $op eq 'cud-dotransfer'){ |
253 |
if ( $op eq 'cud-dotransfer'){ |
254 |
# An item has been returned to a branch other than the homebranch, and the librarian has chosen to initiate a transfer |
|
|
255 |
my $transferitem = $query->param('transferitem'); |
254 |
my $transferitem = $query->param('transferitem'); |
256 |
my $tobranch = $query->param('tobranch'); |
255 |
my $item = Koha::Items->find( $transferitem ); |
|
|
256 |
my $tobranchcode = $query->param('tobranch'); |
257 |
my $tobranch = Koha::Libraries->find($tobranchcode); |
257 |
my $trigger = $query->param('trigger'); |
258 |
my $trigger = $query->param('trigger'); |
258 |
ModItemTransfer($transferitem, $userenv_branch, $tobranch, $trigger); |
259 |
my $transfer = $item->request_transfer({ to => $tobranch, reason => $trigger }); |
|
|
260 |
$transfer->transit; |
259 |
} |
261 |
} |
260 |
|
262 |
|
261 |
if ($transit && $op eq 'cud-transfer') { |
263 |
if ($transit && $op eq 'cud-transfer') { |
262 |
- |
|
|