forked from CGM_Public/pretix_original
Accounting report: Allow subclasses to skip tables (#5616)
This commit is contained in:
@@ -858,31 +858,37 @@ class ReportExporter(ReportlabExportMixin, BaseExporter):
|
|||||||
|
|
||||||
for c in currencies:
|
for c in currencies:
|
||||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||||
|
s = self._table_transactions(form_data, c)
|
||||||
|
if s:
|
||||||
story += [
|
story += [
|
||||||
Spacer(0, 3 * mm),
|
Spacer(0, 3 * mm),
|
||||||
FontFallbackParagraph(_("Orders") + c_head, style_h2),
|
FontFallbackParagraph(_("Orders") + c_head, style_h2),
|
||||||
Spacer(0, 3 * mm),
|
Spacer(0, 3 * mm),
|
||||||
*self._table_transactions(form_data, c),
|
*s
|
||||||
]
|
]
|
||||||
|
|
||||||
for c in currencies:
|
for c in currencies:
|
||||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||||
|
s = self._table_payments(form_data, c)
|
||||||
|
if s:
|
||||||
story += [
|
story += [
|
||||||
Spacer(0, 8 * mm),
|
Spacer(0, 8 * mm),
|
||||||
FontFallbackParagraph(_("Payments") + c_head, style_h2),
|
FontFallbackParagraph(_("Payments") + c_head, style_h2),
|
||||||
Spacer(0, 3 * mm),
|
Spacer(0, 3 * mm),
|
||||||
*self._table_payments(form_data, c),
|
*s
|
||||||
]
|
]
|
||||||
|
|
||||||
for c in currencies:
|
for c in currencies:
|
||||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||||
|
s = self._table_open_items(form_data, c)
|
||||||
|
if s:
|
||||||
story += [
|
story += [
|
||||||
Spacer(0, 8 * mm),
|
Spacer(0, 8 * mm),
|
||||||
KeepTogether(
|
KeepTogether(
|
||||||
[
|
[
|
||||||
FontFallbackParagraph(_("Open items") + c_head, style_h2),
|
FontFallbackParagraph(_("Open items") + c_head, style_h2),
|
||||||
Spacer(0, 3 * mm),
|
Spacer(0, 3 * mm),
|
||||||
*self._table_open_items(form_data, c),
|
*s
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@@ -892,13 +898,15 @@ class ReportExporter(ReportlabExportMixin, BaseExporter):
|
|||||||
):
|
):
|
||||||
for c in currencies:
|
for c in currencies:
|
||||||
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
c_head = f" [{c}]" if len(currencies) > 1 else ""
|
||||||
|
s = self._table_gift_cards(form_data, c)
|
||||||
|
if s:
|
||||||
story += [
|
story += [
|
||||||
Spacer(0, 8 * mm),
|
Spacer(0, 8 * mm),
|
||||||
KeepTogether(
|
KeepTogether(
|
||||||
[
|
[
|
||||||
FontFallbackParagraph(_("Gift cards") + c_head, style_h2),
|
FontFallbackParagraph(_("Gift cards") + c_head, style_h2),
|
||||||
Spacer(0, 3 * mm),
|
Spacer(0, 3 * mm),
|
||||||
*self._table_gift_cards(form_data, c),
|
*s,
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user