Lines 3744-3753
sub CalcDateDue {
Link Here
|
3744 |
# starter vars so don't do calculations directly to $datedue |
3744 |
# starter vars so don't do calculations directly to $datedue |
3745 |
my $potential_datedue = $datedue->clone; |
3745 |
my $potential_datedue = $datedue->clone; |
3746 |
my $library_close = $datedue->clone; |
3746 |
my $library_close = $datedue->clone; |
3747 |
my $dayofweek = $datedue->local_day_of_week - 1; |
3747 |
my $dayofweek = $datedue->day_of_week - 1; |
|
|
3748 |
my $tomorrow_dayofweek = $dayofweek + 1; |
3749 |
# If it's Sunday and tomorrow would be == 7, make tomorrow 0 (Days are stored as 0-6) |
3750 |
if ( $tomorrow_dayofweek > 6 ) { $tomorrow_dayofweek = 0; } |
3748 |
my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek }); |
3751 |
my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek }); |
3749 |
my @close = undef; |
3752 |
my @close = undef; |
3750 |
my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek+1 }); # get open hours of next day |
3753 |
my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $tomorrow_dayofweek }); # get open hours of next day |
3751 |
my @open = undef; |
3754 |
my @open = undef; |
3752 |
if ( $todayhours->close_time and $tomorrowhours->open_time ) { |
3755 |
if ( $todayhours->close_time and $tomorrowhours->open_time ) { |
3753 |
@close = split( ":", $todayhours->close_time ); |
3756 |
@close = split( ":", $todayhours->close_time ); |
3754 |
- |
|
|