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

(-)a/C4/Circulation.pm (-3 / +5 lines)
Lines 3725-3734 sub CalcDateDue { Link Here
3725
    # starter vars so don't do calculations directly to $datedue
3725
    # starter vars so don't do calculations directly to $datedue
3726
    my $potential_datedue = $datedue->clone;
3726
    my $potential_datedue = $datedue->clone;
3727
    my $library_close = $datedue->clone;
3727
    my $library_close = $datedue->clone;
3728
    my $dayofweek = $datedue->local_day_of_week - 1;
3728
    my $dayofweek = $datedue->day_of_week - 1;
3729
    my $tomorrow_dayofweek = $dayofweek + 1;
3730
    # If it's Sunday and tomorrow would be == 7, make tomorrow 0 (Days are stored as 0-6)
3731
    if ( $tomorrow_dayofweek > 6 ) { $tomorrow_dayofweek = 0; }
3729
    my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek });
3732
    my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek });
3730
    my @close = undef;
3733
    my @close = undef;
3731
    my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek+1 }); # get open hours of next day
3734
    my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $tomorrow_dayofweek }); # get open hours of next day
3732
    my @open = undef;
3735
    my @open = undef;
3733
    if ( $todayhours->close_time and $tomorrowhours->open_time ) {
3736
    if ( $todayhours->close_time and $tomorrowhours->open_time ) {
3734
        @close = split( ":", $todayhours->close_time );
3737
        @close = split( ":", $todayhours->close_time );
3735
- 

Return to bug 6796