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

(-)a/Koha/Checkout.pm (-1 / +1 lines)
Lines 137-143 sub claim_returned { Link Here
137
                )->store();
137
                )->store();
138
138
139
                my $ClaimReturnedLostValue = C4::Context->preference('ClaimReturnedLostValue');
139
                my $ClaimReturnedLostValue = C4::Context->preference('ClaimReturnedLostValue');
140
                C4::Items::ModItem( { itemlost => $ClaimReturnedLostValue }, undef, $self->itemnumber );
140
                $self->item->itemlost($ClaimReturnedLostValue)->store;
141
141
142
                my $ClaimReturnedChargeFee = C4::Context->preference('ClaimReturnedChargeFee');
142
                my $ClaimReturnedChargeFee = C4::Context->preference('ClaimReturnedChargeFee');
143
                $charge_lost_fee =
143
                $charge_lost_fee =
(-)a/Koha/Item.pm (-10 lines)
Lines 603-618 sub current_holds { Link Here
603
    return Koha::Holds->_new_from_dbic($hold_rs);
603
    return Koha::Holds->_new_from_dbic($hold_rs);
604
}
604
}
605
605
606
=head3 holds
607
608
=cut
609
610
sub holds {
611
    my ( $self ) = @_;
612
    my $hold_rs = $self->_result->reserves->search;
613
    return Koha::Holds->_new_from_dbic($hold_rs);
614
}
615
616
=head3 stockrotationitem
606
=head3 stockrotationitem
617
607
618
  my $sritem = Koha::Item->stockrotationitem;
608
  my $sritem = Koha::Item->stockrotationitem;
(-)a/t/db_dependent/Circulation.t (-1 / +1 lines)
Lines 3007-3013 subtest 'Cancel transfers on lost items' => sub { Link Here
3007
    is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Items holding branch is the transfers origin branch before it is marked as lost' );
3007
    is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Items holding branch is the transfers origin branch before it is marked as lost' );
3008
3008
3009
    #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch
3009
    #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch
3010
    ModItem( { itemlost => 1 }, $item->biblionumber, $item->itemnumber );
3010
    $item->itemlost(1)->store;
3011
    LostItem( $item->itemnumber, 'test', 1 );
3011
    LostItem( $item->itemnumber, 'test', 1 );
3012
    ($datesent,$frombranch,$tobranch) = GetTransfers($item->itemnumber);
3012
    ($datesent,$frombranch,$tobranch) = GetTransfers($item->itemnumber);
3013
    is( $tobranch, undef, 'The transfer on the lost item has been deleted as the LostItemCancelOutstandingTransfer is enabled');
3013
    is( $tobranch, undef, 'The transfer on the lost item has been deleted as the LostItemCancelOutstandingTransfer is enabled');
(-)a/t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t (-3 / +2 lines)
Lines 68-78 subtest 'after_biblio_action() and after_item_action() hooks tests' => sub { Link Here
68
            qr/after_item_action called with action: create, ref: Koha::Item/,
68
            qr/after_item_action called with action: create, ref: Koha::Item/,
69
            'AddItem calls the hook with action=create';
69
            'AddItem calls the hook with action=create';
70
70
71
    warning_like { C4::Items::ModItem({ location => 'shelves' }, $biblio_id, $item->itemnumber); }
71
    warning_like { $item->location('shelves')->store; }
72
            qr/after_item_action called with action: modify, ref: Koha::Item/,
72
            qr/after_item_action called with action: modify, ref: Koha::Item/,
73
            'ModItem calls the hook with action=modify';
73
            'ModItem calls the hook with action=modify';
74
74
75
    warning_like { C4::Items::DelItem({ itemnumber => $item->itemnumber }); }
75
    warning_like { $item->delete; }
76
            qr/after_item_action called with action: delete/,
76
            qr/after_item_action called with action: delete/,
77
            'DelItem calls the hook with action=delete, item_id passed';
77
            'DelItem calls the hook with action=delete, item_id passed';
78
78
79
- 

Return to bug 23463