mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Accounting report: Allow subclasses to skip tables (#5616)
This commit is contained in:
@@ -858,50 +858,58 @@ class ReportExporter(ReportlabExportMixin, BaseExporter):
|
||||
|
||||
for c in currencies:
|
||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||
story += [
|
||||
Spacer(0, 3 * mm),
|
||||
FontFallbackParagraph(_("Orders") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*self._table_transactions(form_data, c),
|
||||
]
|
||||
s = self._table_transactions(form_data, c)
|
||||
if s:
|
||||
story += [
|
||||
Spacer(0, 3 * mm),
|
||||
FontFallbackParagraph(_("Orders") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*s
|
||||
]
|
||||
|
||||
for c in currencies:
|
||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||
story += [
|
||||
Spacer(0, 8 * mm),
|
||||
FontFallbackParagraph(_("Payments") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*self._table_payments(form_data, c),
|
||||
]
|
||||
s = self._table_payments(form_data, c)
|
||||
if s:
|
||||
story += [
|
||||
Spacer(0, 8 * mm),
|
||||
FontFallbackParagraph(_("Payments") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*s
|
||||
]
|
||||
|
||||
for c in currencies:
|
||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||
story += [
|
||||
Spacer(0, 8 * mm),
|
||||
KeepTogether(
|
||||
[
|
||||
FontFallbackParagraph(_("Open items") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*self._table_open_items(form_data, c),
|
||||
]
|
||||
),
|
||||
]
|
||||
s = self._table_open_items(form_data, c)
|
||||
if s:
|
||||
story += [
|
||||
Spacer(0, 8 * mm),
|
||||
KeepTogether(
|
||||
[
|
||||
FontFallbackParagraph(_("Open items") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*s
|
||||
]
|
||||
),
|
||||
]
|
||||
if (
|
||||
self.is_multievent
|
||||
and self.events.count() == self.organizer.events.count()
|
||||
):
|
||||
for c in currencies:
|
||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||
story += [
|
||||
Spacer(0, 8 * mm),
|
||||
KeepTogether(
|
||||
[
|
||||
FontFallbackParagraph(_("Gift cards") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*self._table_gift_cards(form_data, c),
|
||||
]
|
||||
),
|
||||
]
|
||||
s = self._table_gift_cards(form_data, c)
|
||||
if s:
|
||||
story += [
|
||||
Spacer(0, 8 * mm),
|
||||
KeepTogether(
|
||||
[
|
||||
FontFallbackParagraph(_("Gift cards") + c_head, style_h2),
|
||||
Spacer(0, 3 * mm),
|
||||
*s,
|
||||
]
|
||||
),
|
||||
]
|
||||
|
||||
doc.build(story, canvasmaker=self.canvas_class(doc))
|
||||
f.seek(0)
|
||||
|
||||
Reference in New Issue
Block a user