PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | site/views/search/view.html.php +11 -1 1.8.13 → 1.8.16 View file →
@@ -315,9 +315,19 @@
315 315 * is already set to 23:59:59 (VCM Connector may be responsible), so no seconds should be added or the restriction end date
316 316 * will be the day after, and if after the check-in time, it may be included.
317 317 */
318 318 $end_operator = date('Y-m-d', $restr['dfrom']) != date('Y-m-d', $restr['dto']) && substr((string) $restr['dto'], -1, 1) != 9 ? 82799 : 0;
319 - //
319 +
320 + /**
321 + * Adjust at runtime the restriction end date in case we have records written by third-party
322 + * dynamic pricing systems that last for one day, where the date-from and date-to are identical.
323 + *
324 + * @since 1.18.16 (J) - 1.8.16 (WP)
325 + */
326 + if ($restr['dfrom'] == $restr['dto'] && !$end_operator) {
327 + $end_operator = 82799;
328 + }
329 +
320 330 if ($restr['dfrom'] <= $restrcheckin[0] && ($restr['dto'] + $end_operator) >= $restrcheckin[0]) {
321 331 // restriction found for this date range based on arrival date, check if compliant
322 332 $restrictions_affcount++;
323 333 if (strlen((string)$restr['wday'])) {