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

(-)a/C4/Circulation.pm (-1 / +19 lines)
Lines 1558-1563 sub AddIssue { Link Here
1558
                $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1558
                $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1559
1559
1560
            }
1560
            }
1561
1562
            # Check if we need to use an exact due date set by the ILL module
1563
            if ( C4::Context->preference('ILLModule') ) {
1564
                # Check if there is an ILL connected with the biblio of the item we are issuing
1565
                my $ill_request = Koha::Illrequests->search({
1566
                    biblio_id => $item_object->biblionumber,
1567
                    borrowernumber => $borrower->{'borrowernumber'},
1568
                    completed => undef,
1569
                    date_due => { '!=', undef },
1570
                })->next;
1571
1572
                if ( $ill_request and length( $ill_request->date_due ) > 0 ) {
1573
                    my $ill_dt = dt_from_string( $ill_request->date_due );
1574
                    $ill_dt->set_hour(23);
1575
                    $ill_dt->set_minute(59);
1576
                    $datedue = $ill_dt;
1577
                }
1578
            }
1579
1561
            $datedue->truncate( to => 'minute' );
1580
            $datedue->truncate( to => 'minute' );
1562
1581
1563
            my $patron = Koha::Patrons->find( $borrower );
1582
            my $patron = Koha::Patrons->find( $borrower );
1564
- 

Return to bug 24239