Skip to content

Commit

Permalink
Order overview PDF: Fix date filter
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Jan 15, 2024
1 parent c6196f9 commit 6cf8c7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pretix/plugins/reports/exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import copy
import tempfile
from collections import OrderedDict, defaultdict
from datetime import timedelta
from decimal import Decimal

from dateutil.parser import parse
Expand Down Expand Up @@ -303,7 +304,7 @@ def _filter_story(self, doc, form_data, net=False):
Paragraph(_('{axis} between {start} and {end}').format(
axis=_('Event date'),
start=date_format(d_start, 'SHORT_DATE_FORMAT') if d_start else '–',
end=date_format(d_end, 'SHORT_DATE_FORMAT') if d_end else '–',
end=date_format(d_end - timedelta(hours=1), 'SHORT_DATE_FORMAT') if d_end else '–',
), self.get_style()),
Spacer(1, 5 * mm)
]
Expand All @@ -315,7 +316,7 @@ def _get_data(self, form_data):
else:
d_start, d_end = None, None
if form_data.get('subevent_date_range'):
sd_start, sd_end = resolve_timeframe_to_dates_inclusive(now(), form_data['subevent_date_range'], self.timezone)
sd_start, sd_end = resolve_timeframe_to_datetime_start_inclusive_end_exclusive(now(), form_data['subevent_date_range'], self.timezone)
else:
sd_start, sd_end = None, None
return order_overview(
Expand Down

0 comments on commit 6cf8c7d

Please sign in to comment.