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

(-)a/C4/Circulation.pm (-1 / +3 lines)
Lines 3039-3046 sub AddRenewal { Link Here
3039
                                AND itemnumber=?"
3039
                                AND itemnumber=?"
3040
        );
3040
        );
3041
3041
3042
        eval{
3042
        $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber );
3043
        $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber );
3043
        if ( $sth->err ){
3044
        };
3045
        if( $sth->err ){
3044
            Koha::Exceptions::Checkout::FailedRenewal->throw(
3046
            Koha::Exceptions::Checkout::FailedRenewal->throw(
3045
                error => 'Update of issue# ' . $issue->issue_id . ' failed with error: ' . $sth->errstr
3047
                error => 'Update of issue# ' . $issue->issue_id . ' failed with error: ' . $sth->errstr
3046
            );
3048
            );
(-)a/t/db_dependent/Circulation.t (-2 / +6 lines)
Lines 3756-3762 subtest 'AddReturn should clear items.onloan for unissued items' => sub { Link Here
3756
3756
3757
subtest 'AddRenewal and AddIssuingCharge tests' => sub {
3757
subtest 'AddRenewal and AddIssuingCharge tests' => sub {
3758
3758
3759
    plan tests => 12;
3759
    plan tests => 13;
3760
3760
3761
3761
3762
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
3762
    t::lib::Mocks::mock_preference('item-level_itypes', 1);
Lines 3799-3804 subtest 'AddRenewal and AddIssuingCharge tests' => sub { Link Here
3799
3799
3800
    # Check the item out
3800
    # Check the item out
3801
    AddIssue( $patron->unblessed, $item->barcode );
3801
    AddIssue( $patron->unblessed, $item->barcode );
3802
3803
    throws_ok {
3804
        AddRenewal( $patron->borrowernumber, $item->itemnumber, $library->id, undef, {break=>"the_renewal"} );
3805
    } 'Koha::Exceptions::Checkout::FailedRenewal', 'Exception is thrown when renewal update to issues fails';
3806
3802
    t::lib::Mocks::mock_preference( 'RenewalLog', 0 );
3807
    t::lib::Mocks::mock_preference( 'RenewalLog', 0 );
3803
    my $date = output_pref( { dt => dt_from_string(), dateonly => 1, dateformat => 'iso' } );
3808
    my $date = output_pref( { dt => dt_from_string(), dateonly => 1, dateformat => 'iso' } );
3804
    my %params_renewal = (
3809
    my %params_renewal = (
3805
- 

Return to bug 26457