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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-3 / +43 lines)
Lines 20-26 Link Here
20
        [% IF SuspendHoldsIntranet %]<th>&nbsp;</th><!-- Suspend Holds Column Header -->[% END %]
20
        [% IF SuspendHoldsIntranet %]<th>&nbsp;</th><!-- Suspend Holds Column Header -->[% END %]
21
    </tr>
21
    </tr>
22
22
23
    [% FOREACH hold IN holds %]
23
    [% IF (grouped_holds) %]
24
        [% FOREACH group_level_hold IN grouped_holds %]
25
            <tr>
26
                <td></td>
27
                <td></td>
28
                <td>[% INCLUDE 'patron-title.inc' patron=group_level_hold.patron hide_patron_infos_if_needed=1 %]</td>
29
                <td>[% group_level_hold.hold.notes %]</td>
30
                <td>[% group_level_hold.hold.date %]</td>
31
                <td>[% group_level_hold.hold.expirationdate %]</td>
32
                <td>
33
                [% IF ( group_level_hold.hold.found ) %]
34
                    [% IF ( group_level_hold.hold.atdestination ) %]
35
                        [% IF ( group_level_hold.hold.found ) %]
36
                            Item waiting at <b> [% group_level_hold.hold.wbrname %]</b> <input type="hidden" name="pickup" value="[% group_level_hold.hold.wbrcode %]" /> since [% group_level_hold.hold.waiting_date | $KohaDates %]
37
                        [% ELSE %]
38
                            Waiting to be pulled <input type="hidden" name="pickup" value="[% group_level_hold.hold.wbrcode %]" />
39
                        [% END %]
40
                    [% ELSE %]
41
                        Item being transferred to <b> [% group_level_hold.hold.wbrname %]</b> <input type="hidden" name="pickup" value="[% group_level_hold.hold.wbrcode %]" />
42
                    [% END %]
43
                [% ELSE %]
44
                    [% IF Koha.Preference('IndependentBranches') && Branches.all().size  == 1 %]
45
                        [% Branches.GetName(group_level_hold.hold.branchcode) %] <input type="hidden" name="pickup" value="[% group_level_hold.hold.branchcode %]" />
46
                    [% ELSE %]
47
                        <select name="pickup">
48
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => group_level_hold.hold.branchcode ) %]
49
                        </select>
50
                    [% END %]
51
                [% END %]
52
                </td>
53
                <td>
54
                    [% IF group_level_hold.hold.hold_group_id %]
55
                        <div>(part of a <a href="/cgi-bin/koha/reserve/hold-group.pl?hold_group_id=[% group_level_hold.hold.hold_group_id %]">hold group</a>)</div>
56
                    [% END %]
57
                </td>
58
                <td></td>
59
                <td></td>
60
                <td></td>
61
            </tr>
62
        [% END %]
63
    [% ELSE %]
64
        [% FOREACH hold IN holds %]
24
        <tr>
65
        <tr>
25
            <td>
66
            <td>
26
                <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
67
                <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
Lines 197-202 Link Here
197
            [% END # IF SuspendHoldsIntranet %]
238
            [% END # IF SuspendHoldsIntranet %]
198
239
199
        </tr>
240
        </tr>
200
241
        [% END %]
201
    [% END %]
202
</table>
242
</table>
(-)a/reserve/request.pl (-1 / +25 lines)
Lines 596-601 foreach my $biblionumber (@biblionumbers) { Link Here
596
        push( @reserveloop, \%reserve );
596
        push( @reserveloop, \%reserve );
597
    }
597
    }
598
598
599
    my %reserve_records;
600
    for my $reserve ( @reserveloop ) {
601
         if ($reserve->{'hold_group_id'}) {
602
             # Keep track of which hold_group_id (duplicated field) go with each itemnumber (unique field)
603
             $reserve_records{ $reserve->{hold_group_id} }->{ $reserve->{itemnumber} }++;
604
         }
605
    }
606
    my @grouped_parts;
607
    for my $hold_group ( sort { $a <=> $b } keys %reserve_records ) {
608
         my @tickets = sort { $a <=> $b } keys %{ $reserve_records{ $hold_group } };
609
         my @holds = GetHoldGroupHolds($hold_group);
610
         my $hold = $holds[0];
611
         my $patron = Koha::Patrons->find( {borrowernumber => $hold->{borrowernumber}} );
612
         # Merge the ticket ids with each ipn
613
         push @grouped_parts, {
614
                 hold_group_id => $hold_group,
615
                 itemnumber => join(', ', sort { $a <=> $b } @tickets),
616
                 hold => $hold,
617
                 patron => $patron,
618
         };
619
    }
620
    if (@grouped_parts) {
621
        $template->param( grouped_holds => \@grouped_parts );
622
    }
623
599
    # get the time for the form name...
624
    # get the time for the form name...
600
    my $time = time();
625
    my $time = time();
601
626
602
- 

Return to bug 21528