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

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

Return to bug 25348