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

(-)a/C4/Reserves.pm (-4 / +1 lines)
Lines 129-134 BEGIN { Link Here
129
129
130
        &AlterPriority
130
        &AlterPriority
131
        &ToggleLowestPriority
131
        &ToggleLowestPriority
132
        &RevertWaitingStatus
132
133
133
        &ReserveSlip
134
        &ReserveSlip
134
        &ToggleSuspend
135
        &ToggleSuspend
Lines 1425-1434 sub _FixPriority { Link Here
1425
        my $sth = $dbh->prepare($query);
1426
        my $sth = $dbh->prepare($query);
1426
        $sth->execute( $reserve_id );
1427
        $sth->execute( $reserve_id );
1427
    }
1428
    }
1428
    elsif ( $hold && $hold->found() && $rank > 0 ) {
1429
        $hold->found(undef);
1430
        $hold->store();
1431
    }
1432
1429
1433
    my @priority;
1430
    my @priority;
1434
1431
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-1 / +1 lines)
Lines 191-197 Link Here
191
                        [% END %]
191
                        [% END %]
192
192
193
                    [% ELSE %]
193
                    [% ELSE %]
194
                        <input type="button" value="Revert found status" onclick="window.location.href='request.pl?action=move&amp;where=down&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=0&amp;next_priority=1&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]'">
194
                        <input type="button" value="Revert found status" onclick="window.location.href='request.pl?action=move&amp;where=down&amp;first_priority=[% first_priority | html %]&amp;last_priority=[% last_priority | html %]&amp;prev_priority=0&amp;next_priority=1&amp;borrowernumber=[% hold.borrowernumber | html %]&amp;biblionumber=[% hold.biblionumber | html %]&amp;itemnumber=[% hold.itemnumber %]&amp;reserve_id=[% hold.reserve_id | html %]&amp;date=[% hold.date | html %]'">
195
                    [% END %]
195
                    [% END %]
196
                </td>
196
                </td>
197
            [% END # IF SuspendHoldsIntranet %]
197
            [% END # IF SuspendHoldsIntranet %]
(-)a/reserve/request.pl (-8 / +12 lines)
Lines 86-98 my $action = $input->param('action'); Link Here
86
$action ||= q{};
86
$action ||= q{};
87
87
88
if ( $action eq 'move' ) {
88
if ( $action eq 'move' ) {
89
  my $where          = $input->param('where');
89
  my $where           = $input->param('where');
90
  my $reserve_id     = $input->param('reserve_id');
90
  my $reserve_id      = $input->param('reserve_id');
91
  my $prev_priority  = $input->param('prev_priority');
91
  my $prev_priority   = $input->param('prev_priority');
92
  my $next_priority  = $input->param('next_priority');
92
  my $next_priority   = $input->param('next_priority');
93
  my $first_priority = $input->param('first_priority');
93
  my $first_priority  = $input->param('first_priority');
94
  my $last_priority  = $input->param('last_priority');
94
  my $last_priority   = $input->param('last_priority');
95
  AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority );
95
  my $hold_itemnumber = $input->param('itemnumber');
96
  if ( $prev_priority == 0 && $next_priority == 1 ){
97
      RevertWaitingStatus({ itemnumber => $hold_itemnumber });
98
  } else {
99
      AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority );
100
  }
96
} elsif ( $action eq 'cancel' ) {
101
} elsif ( $action eq 'cancel' ) {
97
  my $reserve_id = $input->param('reserve_id');
102
  my $reserve_id = $input->param('reserve_id');
98
  my $hold = Koha::Holds->find( $reserve_id );
103
  my $hold = Koha::Holds->find( $reserve_id );
99
- 

Return to bug 21608