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

(-)a/C4/Circulation.pm (-6 / +2 lines)
Lines 3034-3046 sub AddRenewal { Link Here
3034
        # Update the issues record to have the new due date, and a new count
3034
        # Update the issues record to have the new due date, and a new count
3035
        # of how many times it has been renewed.
3035
        # of how many times it has been renewed.
3036
        my $renews = ( $issue->renewals || 0 ) + 1;
3036
        my $renews = ( $issue->renewals || 0 ) + 1;
3037
        my $sth = $dbh->prepare("UPDATE issues SET date_due = ?, renewals = ?, unseen_renewals = ?, lastreneweddate = ?
3037
        my $sth = $dbh->prepare("UPDATE issues SET date_due = ?, renewals = ?, unseen_renewals = ?, lastreneweddate = ? WHERE issue_id = ?");
3038
                                WHERE borrowernumber=?
3039
                                AND itemnumber=?"
3040
        );
3041
3038
3042
        eval{
3039
        eval{
3043
        $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $borrowernumber, $itemnumber );
3040
            $sth->execute( $datedue->strftime('%Y-%m-%d %H:%M'), $renews, $unseen_renewals, $lastreneweddate, $issue->issue_id );
3044
        };
3041
        };
3045
        if( $sth->err ){
3042
        if( $sth->err ){
3046
            Koha::Exceptions::Checkout::FailedRenewal->throw(
3043
            Koha::Exceptions::Checkout::FailedRenewal->throw(
3047
- 

Return to bug 26457