Skip to content

Commit

Permalink
Fix leave calculation if leave was on Monday in vancouver
Browse files Browse the repository at this point in the history
Signed-off-by: ccremer <[email protected]>
  • Loading branch information
ccremer committed Dec 20, 2022
1 parent c54e308 commit ead5a67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/timesheet/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (r *ReportBuilder) filterLeavesInTimeRange() []model.Leave {
tz := r.getTimeZone()
from := split.DateFrom
date := odoo.Midnight(from.In(tz))
if odoo.IsWithinTimeRange(date, r.from, r.to) && date.Weekday() != time.Sunday && date.Weekday() != time.Saturday {
if odoo.IsWithinTimeRange(date, r.from, r.to) {
split.DateFrom.Time = odoo.LocalizeTime(split.DateFrom.Time, tz)
split.DateTo.Time = odoo.LocalizeTime(split.DateTo.Time, tz)
filteredLeaves = append(filteredLeaves, split)
Expand Down

0 comments on commit ead5a67

Please sign in to comment.