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 596-611 sub current_holds { Link Here
596
    return Koha::Holds->_new_from_dbic($hold_rs);
596
    return Koha::Holds->_new_from_dbic($hold_rs);
597
}
597
}
598
598
599
=head3 holds
600
601
=cut
602
603
sub holds {
604
    my ( $self ) = @_;
605
    my $hold_rs = $self->_result->reserves->search;
606
    return Koha::Holds->_new_from_dbic($hold_rs);
607
}
608
609
=head3 stockrotationitem
599
=head3 stockrotationitem
610
600
611
  my $sritem = Koha::Item->stockrotationitem;
601
  my $sritem = Koha::Item->stockrotationitem;
(-)a/t/db_dependent/Circulation.t (-1 / +1 lines)
Lines 2668-2674 subtest 'Cancel transfers on lost items' => sub { Link Here
2668
    is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Items holding branch is the transfers origin branch before it is marked as lost' );
2668
    is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Items holding branch is the transfers origin branch before it is marked as lost' );
2669
2669
2670
    #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch
2670
    #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch
2671
    ModItem( { itemlost => 1 }, $item->biblionumber, $item->itemnumber );
2671
    $item->itemlost(1)->store;
2672
    LostItem( $item->itemnumber, 'test', 1 );
2672
    LostItem( $item->itemnumber, 'test', 1 );
2673
    ($datesent,$frombranch,$tobranch) = GetTransfers($item->itemnumber);
2673
    ($datesent,$frombranch,$tobranch) = GetTransfers($item->itemnumber);
2674
    is( $tobranch, undef, 'The transfer on the lost item has been deleted as the LostItemCancelOutstandingTransfer is enabled');
2674
    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