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

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

Return to bug 6796