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

(-)a/C4/Circulation.pm (-1 / +19 lines)
Lines 1544-1549 sub AddIssue { Link Here
1544
                $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1544
                $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1545
1545
1546
            }
1546
            }
1547
1548
            # Check if we need to use an exact due date set by the ILL module
1549
            if ( C4::Context->preference('ILLModule') ) {
1550
                # Check if there is an ILL connected with the biblio of the item we are issuing
1551
                my $ill_request = Koha::Illrequests->search({
1552
                    biblio_id => $item_object->biblionumber,
1553
                    borrowernumber => $borrower->{'borrowernumber'},
1554
                    completed => undef,
1555
                    date_due => { '!=', undef },
1556
                })->next;
1557
1558
                if ( $ill_request and length( $ill_request->date_due ) > 0 ) {
1559
                    my $ill_dt = dt_from_string( $ill_request->date_due );
1560
                    $ill_dt->set_hour(23);
1561
                    $ill_dt->set_minute(59);
1562
                    $datedue = $ill_dt;
1563
                }
1564
            }
1565
1547
            $datedue->truncate( to => 'minute' );
1566
            $datedue->truncate( to => 'minute' );
1548
1567
1549
            my $patron = Koha::Patrons->find( $borrower );
1568
            my $patron = Koha::Patrons->find( $borrower );
1550
- 

Return to bug 24239