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

(-)a/C4/Circulation.pm (-1 / +19 lines)
Lines 1472-1477 sub AddIssue { Link Here
1472
                $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1472
                $datedue = CalcDateDue( $issuedate, $itype, $branchcode, $borrower );
1473
1473
1474
            }
1474
            }
1475
1476
            # Check if we need to use an exact due date set by the ILL module
1477
            if ( C4::Context->preference('ILLModule') ) {
1478
                # Check if there is an ILL connected with the biblio of the item we are issuing
1479
                my $ill_request = Koha::Illrequests->search({
1480
                    biblio_id => $item_object->biblionumber,
1481
                    borrowernumber => $borrower->{'borrowernumber'},
1482
                    completed => undef,
1483
                    date_due => { '!=', undef },
1484
                })->next;
1485
1486
                if ( $ill_request and length( $ill_request->date_due ) > 0 ) {
1487
                    my $ill_dt = dt_from_string( $ill_request->date_due );
1488
                    $ill_dt->set_hour(23);
1489
                    $ill_dt->set_minute(59);
1490
                    $datedue = $ill_dt;
1491
                }
1492
            }
1493
1475
            $datedue->truncate( to => 'minute' );
1494
            $datedue->truncate( to => 'minute' );
1476
1495
1477
            my $patron = Koha::Patrons->find( $borrower );
1496
            my $patron = Koha::Patrons->find( $borrower );
1478
- 

Return to bug 24239