X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=circ%2Ftransferstoreceive.pl;h=939891211ddcd15fbceaa9ac729f43007d4eecb7;hb=6eeb9bc1b30b437febd19e5a60f5ae2a0283e761;hp=b9123f6c01757d3b493b3423178e2c6f8e3830a9;hpb=a1a05db1b638803135df535cd9f40180523e5f0e;p=koha-ffzg.git diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index b9123f6c01..939891211d 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -21,27 +21,21 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Context; -use C4::Output; -use C4::Auth; -use C4::Biblio; -use C4::Circulation; +use C4::Output qw( output_html_with_http_headers ); +use C4::Auth qw( get_template_and_user ); +use C4::Circulation qw( GetTransfers GetTransfersFromTo ); use C4::Members; -use Date::Calc qw( - Today - Add_Delta_Days - Date_to_Days -); +use Date::Calc qw( Add_Delta_Days Date_to_Days Today ); -use C4::Koha; use C4::Reserves; use Koha::Items; use Koha::ItemTypes; use Koha::Libraries; -use Koha::DateUtils; +use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::BiblioFrameworks; use Koha::Patrons; -my $input = new CGI; +my $input = CGI->new; my $itemnumber = $input->param('itemnumber'); my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( @@ -49,9 +43,7 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( template_name => "circ/transferstoreceive.tt", query => $input, type => "intranet", - authnotrequired => 0, flagsrequired => { circulate => "circulate_remaining_permissions" }, - debug => 1, } ); @@ -117,6 +109,15 @@ while ( my $library = $libraries->next ) { if ( my $first_hold = $holds->next ) { $getransf{patron} = Koha::Patrons->find( $first_hold->borrowernumber ); } + + # check for a recall for this transfer + if ( C4::Context->preference('UseRecalls') ) { + my $recall = $item->recall; + if ( defined $recall ) { + $getransf{recall} = $recall; + } + } + push( @transferloop, \%getransf ); }