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

(-)a/Koha/Illrequest.pm (-4 / +17 lines)
Lines 209-215 sub _core_status_graph { Link Here
209
            name           => 'Requested',
209
            name           => 'Requested',
210
            ui_method_name => 'Confirm request',
210
            ui_method_name => 'Confirm request',
211
            method         => 'confirm',
211
            method         => 'confirm',
212
            next_actions   => [ 'REQREV', 'CANCREQ' ],
212
            next_actions   => [ 'REQREV', 'CANCREQ', 'COMP' ],
213
            ui_method_icon => 'fa-check',
213
            ui_method_icon => 'fa-check',
214
        },
214
        },
215
        GENREQ => {
215
        GENREQ => {
Lines 252-261 sub _core_status_graph { Link Here
252
            prev_actions   => [ 'REQ' ],
252
            prev_actions   => [ 'REQ' ],
253
            id             => 'COMP',
253
            id             => 'COMP',
254
            name           => 'Completed',
254
            name           => 'Completed',
255
            ui_method_name => 0,
255
            ui_method_name => 'Mark completed',
256
            method         => 0,
256
            method         => 'mark_completed',
257
            next_actions   => [ ],
257
            next_actions   => [ ],
258
            ui_method_icon => 0,
258
            ui_method_icon => 'fa-check',
259
        },
259
        },
260
        KILL => {
260
        KILL => {
261
            prev_actions   => [ 'QUEUED', 'REQREV', 'NEW' ],
261
            prev_actions   => [ 'QUEUED', 'REQREV', 'NEW' ],
Lines 384-389 sub available_actions { Link Here
384
    return \@available_actions;
384
    return \@available_actions;
385
}
385
}
386
386
387
sub mark_completed {
388
    my ( $self ) = @_;
389
    $self->status('COMP')->store unless ( $permitted );
390
    return {
391
        error   => 0,
392
        status  => '',
393
        message => '',
394
        method  => 'mark_completed',
395
        stage   => 'commit',
396
        next    => 'illview',
397
    };
398
}
399
387
sub backend_confirm {
400
sub backend_confirm {
388
    my ( $self, $params ) = @_;
401
    my ( $self, $params ) = @_;
389
402
(-)a/ill/ill-requests.pl (-1 / +11 lines)
Lines 160-165 if ( $op eq 'illview' ) { Link Here
160
            $params->{illrequest_id});
160
            $params->{illrequest_id});
161
    }
161
    }
162
162
163
} elsif ( $op eq 'mark_completed' ) {
164
    my $request = Koha::Illrequests->find($params->{illrequest_id});
165
    my $backend_result = $request->mark_completed($params);
166
    $template->param(
167
        whole => $backend_result,
168
        request => $request,
169
    );
170
171
    # handle special commit rules & update type
172
    handle_commit_maybe($backend_result, $request);
173
163
} elsif ( $op eq 'generic_confirm' ) {
174
} elsif ( $op eq 'generic_confirm' ) {
164
    my $request = Koha::Illrequests->find($params->{illrequest_id});
175
    my $request = Koha::Illrequests->find($params->{illrequest_id});
165
    $params->{current_branchcode} = C4::Context->mybranch;
176
    $params->{current_branchcode} = C4::Context->mybranch;
166
- 

Return to bug 7317