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

(-)a/C4/Circulation.pm (-3 / +5 lines)
Lines 3778-3787 sub CalcDateDue { Link Here
3778
    # starter vars so don't do calculations directly to $datedue
3778
    # starter vars so don't do calculations directly to $datedue
3779
    my $potential_datedue = $datedue->clone;
3779
    my $potential_datedue = $datedue->clone;
3780
    my $library_close = $datedue->clone;
3780
    my $library_close = $datedue->clone;
3781
    my $dayofweek = $datedue->local_day_of_week - 1;
3781
    my $dayofweek = $datedue->day_of_week - 1;
3782
    my $tomorrow_dayofweek = $dayofweek + 1;
3783
    # If it's Sunday and tomorrow would be == 7, make tomorrow 0 (Days are stored as 0-6)
3784
    if ( $tomorrow_dayofweek > 6 ) { $tomorrow_dayofweek = 0; }
3782
    my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek });
3785
    my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek });
3783
    my @close = undef;
3786
    my @close = undef;
3784
    my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek+1 }); # get open hours of next day
3787
    my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $tomorrow_dayofweek }); # get open hours of next day
3785
    my @open = undef;
3788
    my @open = undef;
3786
    if ( $todayhours->close_time and $tomorrowhours->open_time ) {
3789
    if ( $todayhours->close_time and $tomorrowhours->open_time ) {
3787
        @close = split( ":", $todayhours->close_time );
3790
        @close = split( ":", $todayhours->close_time );
3788
- 

Return to bug 6796