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

(-)a/C4/Circulation.pm (-1 / +1 lines)
Lines 2907-2913 sub AddRenewal { Link Here
2907
                branchcode        => $branchcode,
2907
                branchcode        => $branchcode,
2908
                description       => 'Renewal of Rental Item '
2908
                description       => 'Renewal of Rental Item '
2909
                  . $biblio->title
2909
                  . $biblio->title
2910
                  . " $item->barcode",
2910
                  . " " . $item->barcode,
2911
            }
2911
            }
2912
        )->store();
2912
        )->store();
2913
    }
2913
    }
(-)a/t/db_dependent/Circulation.t (-7 / +4 lines)
Lines 2531-2546 subtest 'Cancel transfers on lost items' => sub { Link Here
2531
    #Check transfer exists and the items holding branch is the transfer destination branch before marking it as lost
2531
    #Check transfer exists and the items holding branch is the transfer destination branch before marking it as lost
2532
    my ($datesent,$frombranch,$tobranch) = GetTransfers($item->{itemnumber});
2532
    my ($datesent,$frombranch,$tobranch) = GetTransfers($item->{itemnumber});
2533
    is( $tobranch, $library_2->{branchcode}, 'The transfer record exists in the branchtransfers table');
2533
    is( $tobranch, $library_2->{branchcode}, 'The transfer record exists in the branchtransfers table');
2534
    my $itemcheck = GetItem($item->{itemnumber});
2534
    my $itemcheck = Koha::Items->find($item->{itemnumber});
2535
    is( $itemcheck->{holdingbranch}, $library_2->{branchcode}, 'Items holding branch is the transfers destination branch before it is marked as lost' );
2535
    is( $itemcheck->holdingbranch, $library_2->{branchcode}, 'Items holding branch is the transfers destination branch before it is marked as lost' );
2536
2536
2537
    #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch
2537
    #Simulate item being marked as lost and confirm the transfer is deleted and the items holding branch is the transfers source branch
2538
    ModItem( { itemlost => 1 }, $biblio->{biblionumber}, $item->{itemnumber} );
2538
    ModItem( { itemlost => 1 }, $biblio->{biblionumber}, $item->{itemnumber} );
2539
    LostItem( $item->{itemnumber}, 'test', 1 );
2539
    LostItem( $item->{itemnumber}, 'test', 1 );
2540
    ($datesent,$frombranch,$tobranch) = GetTransfers($item->{itemnumber});
2540
    ($datesent,$frombranch,$tobranch) = GetTransfers($item->{itemnumber});
2541
    is( $tobranch, undef, 'The transfer on the lost item has been deleted as the LostItemCancelOutstandingTransfer is enabled');
2541
    is( $tobranch, undef, 'The transfer on the lost item has been deleted as the LostItemCancelOutstandingTransfer is enabled');
2542
    $itemcheck = GetItem($item->{itemnumber});
2542
    $itemcheck = Koha::Items->find($item->{itemnumber});
2543
    is( $itemcheck->{holdingbranch}, $library_1->{branchcode}, 'Lost item with cancelled hold has holding branch equallying the transfers source branch' );
2543
    is( $itemcheck->holdingbranch, $library_1->{branchcode}, 'Lost item with cancelled hold has holding branch equallying the transfers source branch' );
2544
};
2544
};
2545
2545
2546
subtest 'CanBookBeIssued | is_overdue' => sub {
2546
subtest 'CanBookBeIssued | is_overdue' => sub {
Lines 2924-2931 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
2924
    );
2924
    );
2925
    my $item = Koha::Items->find( $item_id );
2925
    my $item = Koha::Items->find( $item_id );
2926
2926
2927
    my $items = Test::MockModule->new('C4::Items');
2928
    $items->mock( GetItem => $item->unblessed );
2929
    my $context = Test::MockModule->new('C4::Context');
2927
    my $context = Test::MockModule->new('C4::Context');
2930
    $context->mock( userenv => { branch => $library->id } );
2928
    $context->mock( userenv => { branch => $library->id } );
2931
2929
2932
- 

Return to bug 21206