From 13833b05b1bfa05fe1308fc5a11456572770bfae Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 8 Jul 2025 17:21:43 +0200 Subject: [PATCH] PDF editor: Add variable for price including bundles (Z#23197864) (#5284) --- src/pretix/base/pdf.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pretix/base/pdf.py b/src/pretix/base/pdf.py index dd1541d26..f9a2429c5 100644 --- a/src/pretix/base/pdf.py +++ b/src/pretix/base/pdf.py @@ -159,8 +159,17 @@ DEFAULT_VARIABLES = OrderedDict(( "editor_sample": _("123.45 EUR"), "evaluate": lambda op, order, event: money_filter(op.price, event.currency) }), + ("price_with_bundled", { + "label": _("Price including bundled products"), + "editor_sample": _("123.45 EUR"), + "evaluate": lambda op, order, event: money_filter(op.price + sum( + p.price + for p in op.addons.all() + if not p.canceled and p.is_bundled + ), event.currency) + }), ("price_with_addons", { - "label": _("Price including add-ons"), + "label": _("Price including add-ons and bundled products"), "editor_sample": _("123.45 EUR"), "evaluate": lambda op, order, event: money_filter(op.price + sum( p.price