Changeset:
        7e4376b7d270
        
https://sourceforge.net/p/mrbs/hg-code/ci/7e4376b7d270734e4162149d46d42e4d538a640d
Author:
        Campbell Morrison <[email protected]>
Date:
        Sat Aug 27 14:44:51 2016 +0100
Log message:

Fixed bug whereby bookings for the last slot were not being displayed properly 
in the month view

diffstat:

 web/month.php |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 08e75881e217 -r 7e4376b7d270 web/month.php
--- a/web/month.php     Sat Aug 27 14:38:38 2016 +0100
+++ b/web/month.php     Sat Aug 27 14:44:51 2016 +0100
@@ -93,7 +93,7 @@
 {
   global $tbl_entry;
   global $weekstarts, $view_week_number, $show_plus_link, 
$monthly_view_entries_details;
-  global $enable_periods, $morningstarts, $morningstarts_minutes;
+  global $enable_periods, $morningstarts, $morningstarts_minutes, $resolution;
   global $approval_enabled, $confirmation_enabled;
   global $is_private_field;
   global $user;
@@ -115,8 +115,8 @@
   for ($day_num = 1; $day_num<=$days_in_month; $day_num++)
   {
     $start_first_slot = get_start_first_slot($month, $day_num, $year);
-    $start_last_slot = get_start_last_slot($month, $day_num, $year);
-    $entries = get_entries_by_room($room, $start_first_slot, $start_last_slot);
+    $end_last_slot = get_start_last_slot($month, $day_num, $year) + 
$resolution;
+    $entries = get_entries_by_room($room, $start_first_slot, $end_last_slot);
 
     // Build an array of information about each day in the month.
     // The information is stored as:
@@ -169,7 +169,7 @@
       $d[$day_num]["data"][] = get_booking_summary($entry['start_time'],
                                                    $entry['end_time'],
                                                    $start_first_slot,
-                                                   $start_last_slot);
+                                                   $end_last_slot);
     }
   }
 

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to