View | Details | Raw Unified | Return to bug 11801
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-3 / +3 lines)
Lines 657-671 function checkMultiHold() { Link Here
657
	<td>[% reserveloo.expirationdate %]</td>
657
	<td>[% reserveloo.expirationdate %]</td>
658
        <td>
658
        <td>
659
    [% IF ( reserveloo.wait ) %]
659
    [% IF ( reserveloo.wait ) %]
660
    	[% IF ( reserveloo.atdestination ) %]
660
        [% IF ( reserveloo.atdestination ) %]
661
            [% IF ( reserveloo.found ) %]
661
            [% IF ( reserveloo.found ) %]
662
                Item waiting at <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
662
                Item waiting at <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
663
            [% ELSE %]
663
            [% ELSE %]
664
                Waiting to be pulled <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
664
                Waiting to be pulled <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
665
            [% END %]
665
            [% END %]
666
          [% ELSE %]
666
        [% ELSE %]
667
            Item being transferred to <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
667
            Item being transferred to <b> [% reserveloo.wbrname %]</b> <input type="hidden" name="pickup" value="[% reserveloo.wbrcode %]" />
668
         [% END %]
668
        [% END %]
669
    [% ELSE %]
669
    [% ELSE %]
670
          <select name="pickup">
670
          <select name="pickup">
671
      [% FOREACH branchloo IN reserveloo.branchloop %]
671
      [% FOREACH branchloo IN reserveloo.branchloop %]
(-)a/reserve/request.pl (-2 / +17 lines)
Lines 43-48 use C4::Dates qw/format_date/; Link Here
43
use C4::Members;
43
use C4::Members;
44
use C4::Search;		# enabled_staff_search_views
44
use C4::Search;		# enabled_staff_search_views
45
use Koha::DateUtils;
45
use Koha::DateUtils;
46
use Koha::Database;
46
47
47
my $dbh = C4::Context->dbh;
48
my $dbh = C4::Context->dbh;
48
my $sth;
49
my $sth;
Lines 475-482 foreach my $biblionumber (@biblionumbers) { Link Here
475
            $reserve{'wbrcode'} = $res->{'branchcode'};
476
            $reserve{'wbrcode'} = $res->{'branchcode'};
476
            $reserve{'itemnumber'}  = $res->{'itemnumber'};
477
            $reserve{'itemnumber'}  = $res->{'itemnumber'};
477
            $reserve{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'};
478
            $reserve{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'};
479
            warn $reserve{'holdingbranch'} . "==" .  $reserve{'wbrcode'};
478
            if($reserve{'holdingbranch'} eq $reserve{'wbrcode'}){
480
            if($reserve{'holdingbranch'} eq $reserve{'wbrcode'}){
479
                $reserve{'atdestination'} = 1;
481
                # Just because the holdingbranch matches the reserve branch doesn't mean the item
482
                # has arrived at the destination, check for an open transfer for the item as well
483
                unless (
484
                    Koha::Database->new()->schema()->resultset('Branchtransfer')
485
                    ->count(
486
                        {
487
                            itemnumber  => $res->{'itemnumber'},
488
                            tobranch => $res->{'branchcode'},
489
                            datearrived => undef,
490
                        }
491
                    )
492
                  )
493
                {
494
                    $reserve{'atdestination'} = 1;
495
                }
480
            }
496
            }
481
            # set found to 1 if reserve is waiting for patron pickup
497
            # set found to 1 if reserve is waiting for patron pickup
482
            $reserve{'found'} = 1 if $res->{'found'} eq 'W';
498
            $reserve{'found'} = 1 if $res->{'found'} eq 'W';
483
- 

Return to bug 11801