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

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

Return to bug 24239