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

(-)a/Koha/StockRotationItem.pm (-4 / +4 lines)
Lines 202-215 sub advance { Link Here
202
    my $stage = $self->stage;
202
    my $stage = $self->stage;
203
    my $new_stage;
203
    my $new_stage;
204
    if ( $self->indemand && !$self->fresh ) {
204
    if ( $self->indemand && !$self->fresh ) {
205
        $self->indemand(0)->store;                          # De-activate indemand
205
        $self->indemand(0);                                  # De-activate indemand
206
        $new_stage = $stage;
206
        $new_stage = $stage;
207
    }
207
    }
208
    else {
208
    else {
209
        # New to rota?
209
        # New to rota?
210
        if ( $self->fresh ) {
210
        if ( $self->fresh ) {
211
            $new_stage = $self->stage->first_sibling || $self->stage;
211
            $new_stage = $self->stage->first_sibling || $self->stage;
212
            $self->fresh(0)->store;                         # Reset fresh
212
            $self->fresh(0);                                 # Reset fresh
213
        }
213
        }
214
        # Last stage?
214
        # Last stage?
215
        elsif ( !$stage->last_sibling ) {
215
        elsif ( !$stage->last_sibling ) {
Lines 229-235 sub advance { Link Here
229
    }
229
    }
230
230
231
    # Update stage and record transfer
231
    # Update stage and record transfer
232
    $self->stage_id( $new_stage->stage_id )->store;          # Set new stage
232
    $self->stage_id( $new_stage->stage_id );                 # Set new stage
233
    $self->store();
233
    $item->homebranch( $new_stage->branchcode_id )->store;   # Update homebranch
234
    $item->homebranch( $new_stage->branchcode_id )->store;   # Update homebranch
234
    $transfer = try {
235
    $transfer = try {
235
        $item->request_transfer(
236
        $item->request_transfer(
236
- 

Return to bug 24446