* Calendar/Categrory report: Fix miscalculation of multidays events because of wrong week number

This commit is contained in:
Hadi Nategh 2017-01-06 14:48:13 +01:00
parent c7089cadd9
commit 3e4d1acfa2

View File

@ -107,8 +107,8 @@ class calendar_category_report extends calendar_ui{
$day_timestamp = strtotime($day_index); $day_timestamp = strtotime($day_index);
// week number // week number
$week_number = date('W', $day_timestamp); $week_number = ltrim(date('W', $day_timestamp), '0');
$previous_week_number = $week_number == 1? ($events_log[$user_id]['53']? 53: 52): $week_number -1; $previous_week_number = $week_number == 1? ($events_log[$user_id]['53']? 53: 52): $week_number -1;
// check if multidays event starts before start range // check if multidays event starts before start range
$is_over_range_event = $day_timestamp< $event['end'] && $start_range > $event['start']; $is_over_range_event = $day_timestamp< $event['end'] && $start_range > $event['start'];