Lines 3826-3835
sub CalcDateDue {
Link Here
|
3826 |
# starter vars so don't do calculations directly to $datedue |
3826 |
# starter vars so don't do calculations directly to $datedue |
3827 |
my $potential_datedue = $datedue->clone; |
3827 |
my $potential_datedue = $datedue->clone; |
3828 |
my $library_close = $datedue->clone; |
3828 |
my $library_close = $datedue->clone; |
3829 |
my $dayofweek = $datedue->local_day_of_week - 1; |
3829 |
my $dayofweek = $datedue->day_of_week - 1; |
|
|
3830 |
my $tomorrow_dayofweek = $dayofweek + 1; |
3831 |
# If it's Sunday and tomorrow would be == 7, make tomorrow 0 (Days are stored as 0-6) |
3832 |
if ( $tomorrow_dayofweek > 6 ) { $tomorrow_dayofweek = 0; } |
3830 |
my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek }); |
3833 |
my $todayhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek }); |
3831 |
my @close = undef; |
3834 |
my @close = undef; |
3832 |
my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $dayofweek+1 }); # get open hours of next day |
3835 |
my $tomorrowhours = Koha::Library::Hours->find({ branchcode => $branch, day => $tomorrow_dayofweek }); # get open hours of next day |
3833 |
my @open = undef; |
3836 |
my @open = undef; |
3834 |
if ( $todayhours->close_time and $tomorrowhours->open_time ) { |
3837 |
if ( $todayhours->close_time and $tomorrowhours->open_time ) { |
3835 |
@close = split( ":", $todayhours->close_time ); |
3838 |
@close = split( ":", $todayhours->close_time ); |
3836 |
- |
|
|