diff --git a/VERSIONS_HOTLINE/111308 b/VERSIONS_HOTLINE/111308 new file mode 100644 index 0000000000000000000000000000000000000000..d8555e1b813f306d4c14877814b658131d8229b0 --- /dev/null +++ b/VERSIONS_HOTLINE/111308 @@ -0,0 +1 @@ + - ticket #111308 : Drive : Correction de la sélection des dates lorsque la fiche bibliothèque contient des horaires. \ No newline at end of file diff --git a/library/Class/Bib.php b/library/Class/Bib.php index b752ce541b704c9bb6fcc82ba5128ca4ace148db..d78de69e89bf230167e613db1d8d382bbcdb6c38 100644 --- a/library/Class/Bib.php +++ b/library/Class/Bib.php @@ -957,7 +957,7 @@ class Class_Bib extends Storm_Model_Abstract { public function getOuvertureOnDate($time, $used_for = Class_Ouverture::USED_FOR_LIBRARY) { - if ($this->hasHoraire()) + if ($used_for !== Class_Ouverture::USED_FOR_DRIVE && $this->hasHoraire()) return null; if ($ouverture = Class_Ouverture::findFirstBy(['jour' => date('Y-m-d', $time), diff --git a/tests/scenarios/DriveCheckOut/DriveCheckOutBookingTest.php b/tests/scenarios/DriveCheckOut/DriveCheckOutBookingTest.php index ef9f3018744a98070a76e507a9ed23dd49e2dde6..8a2663d29223f5514814b63df5b56bec6821b720 100644 --- a/tests/scenarios/DriveCheckOut/DriveCheckOutBookingTest.php +++ b/tests/scenarios/DriveCheckOut/DriveCheckOutBookingTest.php @@ -100,6 +100,7 @@ abstract class DriveCheckOutBookingTestCase extends AbstractControllerTestCase { 'libelle' => 'Hotel-Dieu', 'closed_on_holidays' => false, 'enable_drive' => 1, + 'horaire' => 'Ouvert tous les lundis, mardi et mercedi', 'ouvertures' => [ Class_Ouverture::chaqueLundi('00:00', '00:00', '12:00', '18:00') ->beDrive(),