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

(-)a/C4/SIP/ILS/Item.pm (+3 lines)
Lines 265-270 sub sip_circulation_status { Link Here
265
    elsif ( Koha::Checkouts::ReturnClaims->search({ itemnumber => $self->{_object}->id, resolution => undef })->count ) {
265
    elsif ( Koha::Checkouts::ReturnClaims->search({ itemnumber => $self->{_object}->id, resolution => undef })->count ) {
266
        return '11';    # claimed returned
266
        return '11';    # claimed returned
267
    }
267
    }
268
    elsif ( $self->{itemlost} ) {
269
        return '12';    # lost
270
    }
268
    elsif ( $self->{borrowernumber} ) {
271
    elsif ( $self->{borrowernumber} ) {
269
        return '04';    # charged
272
        return '04';    # charged
270
    }
273
    }
(-)a/t/db_dependent/SIP/Transaction.t (-2 / +6 lines)
Lines 399-405 subtest checkin_withdrawn => sub { Link Here
399
};
399
};
400
400
401
subtest item_circulation_status => sub {
401
subtest item_circulation_status => sub {
402
    plan tests => 3;
402
    plan tests => 4;
403
403
404
    my $library  = $builder->build_object( { class => 'Koha::Libraries' } );
404
    my $library  = $builder->build_object( { class => 'Koha::Libraries' } );
405
    my $library2 = $builder->build_object( { class => 'Koha::Libraries' } );
405
    my $library2 = $builder->build_object( { class => 'Koha::Libraries' } );
Lines 450-454 subtest item_circulation_status => sub { Link Here
450
    is( $status, '11', "Item circulation status is claimed returned" );
450
    is( $status, '11', "Item circulation status is claimed returned" );
451
451
452
    $claim->delete;
452
    $claim->delete;
453
454
    $item->itemlost(1)->store();
455
    $sip_item = C4::SIP::ILS::Item->new( $item->barcode );
456
    $status = $sip_item->sip_circulation_status;
457
    is( $status, '12', "Item circulation status is lost" );
453
};
458
};
454
$schema->storage->txn_rollback;
459
$schema->storage->txn_rollback;
455
- 

Return to bug 25348