Skip to content

Commit

Permalink
Merge branch 'BULAC' Ajoute l'option days_mode dans calculate_deadlin…
Browse files Browse the repository at this point in the history
…e, nécessaire pour koha v20.11.x
  • Loading branch information
jsicot committed Mar 11, 2021
2 parents 39f131e + 6982007 commit 534541d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Koha/Plugin/Fr/UnivRennes2/WRM/lib/Koha/WarehouseRequest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ sub archive {

sub calculate_deadline {
my ( $self, $days_to_keep ) = @_;
my $calendar = Koha::Calendar->new(branchcode => $self->branchcode);
my $calendar = Koha::Calendar->new(branchcode => $self->branchcode,
days_mode => C4::Context->preference('useDaysMode') );
my $deadline = DateTime->now( time_zone => C4::Context->tz() );
while ( $days_to_keep > 0 ) {
$deadline = $calendar->next_open_days( $deadline, 1 );
Expand Down

0 comments on commit 534541d

Please sign in to comment.