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

(-)a/C4/Circulation.pm (-1 / +3 lines)
Lines 3085-3092 sub AddRenewal { Link Here
3085
                                AND itemnumber=?"
3085
                                AND itemnumber=?"
3086
        );
3086
        );
3087
3087
3088
        eval{
3088
        $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber );
3089
        $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber );
3089
        if ( $sth->err ){
3090
        };
3091
        if( $sth->err ){
3090
            Koha::Exceptions::Checkout::FailedRenewal->throw(
3092
            Koha::Exceptions::Checkout::FailedRenewal->throw(
3091
                error => 'Update of issue# ' . $issue->issue_id . ' failed with error: ' . $sth->errstr
3093
                error => 'Update of issue# ' . $issue->issue_id . ' failed with error: ' . $sth->errstr
3092
            );
3094
            );
(-)a/t/db_dependent/Circulation.t (-2 / +6 lines)
Lines 3694-3700 subtest 'AddReturn should clear items.onloan for unissued items' => sub { Link Here
3694
3694
3695
subtest 'AddRenewal and AddIssuingCharge tests' => sub {
3695
subtest 'AddRenewal and AddIssuingCharge tests' => sub {
3696
3696
3697
    plan tests => 12;
3697
    plan tests => 13;
3698
3698
3699
3699
3700
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
3700
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
Lines 3737-3742 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
3737
3737
3738
    # Check the item out
3738
    # Check the item out
3739
    AddIssue( $patron->unblessed, $item->barcode );
3739
    AddIssue( $patron->unblessed, $item->barcode );
3740
3741
    throws_ok {
3742
        AddRenewal( $patron->borrowernumber, $item->itemnumber, $library->id, undef, {break=>"the_renewal"} );
3743
    } 'Koha::Exceptions::Checkout::FailedRenewal', 'Exception is thrown when renewal update to issues fails';
3744
3740
    t::lib::Mocks::mock_preference( 'RenewalLog', 0 );
3745
    t::lib::Mocks::mock_preference( 'RenewalLog', 0 );
3741
    my $date = output_pref( { dt => dt_from_string(), dateonly => 1, dateformat => 'iso' } );
3746
    my $date = output_pref( { dt => dt_from_string(), dateonly => 1, dateformat => 'iso' } );
3742
    my %params_renewal = (
3747
    my %params_renewal = (
3743
- 

Return to bug 26457